Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
3
One way of doing this is to use a condition:
Parameters:
MyValue:
Type: String
Value: ''
Conditions:
MyValueExists: !Not [ !Equals [!Ref MyValue, '']]
Resources:
Resource:
Type: AWS::Something
Properties:
Key: !If [MyValueExists, !Ref MyValue... |
As I knew, I can use ImportValue to reference value from another cloudformation stack in part of Resources.
NetworkInterfaces:
- GroupSet:
- Fn::ImportValue:
Fn::Sub: "${NetworkStackNameParameter}-SecurityGroupID"
AssociatePublicIpAddress: 'true'
DeviceIndex: '0'
DeleteOnTermination: 'true'
SubnetId:... | how to use ImportValue in parameters? |
EBS volumes are exposed as NVMe block devices on instances built on the Nitro System.
On an older instance type you might see something like:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 160G 0 disk
└─xvda1 202:1 0 160G 0 part /
On a Nitro-based instance you'll see something similar... |
I am trying to attach an EBS volume on EC2 (RHEL) instance. This is how my attach-volume command looks like:
aws ec2 attach-volume --volume-id vol-xxxxxxxxxxxxxxxxx --instance-id i-yyyyyyyyyyyyyyyyy --device /dev/sdf
{
"AttachTime": "2021-12-02T19:30:13.070000+00:00",
"Device": "/dev/sdf",
"InstanceId": "i... | correctly specifying Device Name for EBS volume while attaching to an ec2 instance and identifying it later using Device name |
A pull is nothing more than a fetch followed by a merge.
Hard to say without having more info on your commit tree, but you should be able to git checkout the develop branch, git merge with test (or whatever commit you're trying to merge with), and then git push your local develop branch to the remote repo's develop br... |
I have two branches develop and test.
test is behind develop which was created few weeks back.
I have created a pull request for test and my team member merged it.
Now I want to push the same change to develop branch.
I tried cherry-pick but it didn't work.
Is there anyway, I can pull the same pull request to develop ... | how to merge a pull request in two branches? |
According tothis answer, it seems as though it might be because of log files getting too large. Try run the command OP mentioned in their answer, in order to find all large files:sudo find / -type f -size +10M -exec ls -lh {} \; | I recently ran a report on my EC2 server and was told that it ran out of space. I deleted the csv that was partially generated from my report (it was going to be a pretty sizable one) and randf -hand was surprised to get this output:Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 7.0G 718M 91% ... | How to clean up aws ec2 server? |
Controllers aren't cached in Symfony. There is no time consuming logic involved in reading controllers (it's just PHP code anyway).
When deploying to production server, always make sure to clear the cache using the cache:clear command. Also make sure to remove the app_dev.php file and any other, not used, PHP file in ... |
I use Symfony 2.8.
I modified a controller file and I loaded the changes on the production server, I can see the changes without the need to use php app/console cache: clear and without use app_dev.php.
If I modify a Twig file everything does not happen and I have to clean the cache to transport the changes from app_d... | Symfony does not cache changes on controllers |
1
The code runs fine with both GCC (4.9) and Clang. GCC 4.8.2 fails. VC++ 2013 fails as well.
Here is a minimalistic code example.
What compiler (and of course version) are you using?
Share
Improve this answer
Follow
... |
Suppose I have the following:
struct Base {
virtual ~Base() noexcept = default;
...
};
struct Singleton
: public Base {
void* operator new(size_t sz) noexcept { return instance(); }
void operator delete(void* ptr) noexcept {
// the body is supposed to be empty since new() doesn't allocate
++delete... | C++: Overloading delete on a polymorphic singleton class |
Since your script resides in yourpublic_htmldirectory you can usewgetfor your Cron Jobwget -O - -q https://yoursite.com/wallboard/update.php-O -output is written to the standard output in this case it will go to the email address you specify in CPanel-qquiet mode | As implied in the title, the Cron Job is supposed to execute a php file (update.php, to be specific). The php file then writes to a csv file stored in the same directory.I have the time set to * * * * * so that it executes every minute. The command is written as follows:
php -q /home//public_html/wallboard/update.... | Setting up a Cron Job on CPanel to executes a PHP script |
No, docker-compose alone won't achieve this. Managing containers across multiple hosts is generally the job of schedulers.The Docker Ecosystem: Scheduling and Orchestrationis an older article, but should give an introduction.The scheduler provided by Docker is called Swarm.Use Compose with Swarmis a good place to start... | I have to create containers in multiple host. I have a dockerfile for each container. I found that docker-compose can be used to run multiple containers from a single yaml file. I have to run containerA in HostA, containerB in HostB and so on.. is it possible to achieve this using docker-compose ? or what is the best w... | Is it possible to create container in multiple host using a single docker compose file? |
Remove the specific commit-id:
git rebase --onto commit-id^ commit-id
and then forcibly push to GitHub:
git push --force-with-lease
Read git-rebase documentation and git-push documentation for more information.
|
This question already has answers here:
Remove specific commit
(17 answers)
Closed 2 years ago.
l couldn't find a way to delete a commit and remove it from Github history and git l... | is there anyway to delete or remove a git commit by specific commit id [duplicate] |
If you look at the officialtomcat docker image, it runsCMD ["catalina.sh", "run"]That is enough tostarts tomcat in the foreground, displaying the logs on the console.But, as you said, that might not populate catalina.out.Analternative would be:CMD service tomcat start && tail -f /var/lib/tomcat/logs/catalina.outShareFo... | Docker container can only to daemon mode: I runcatalina.shto start the tomcat.But the problem is my log will not appear incatalina.out.I can look at `docker logs , but this certainly cannot run in a production environment.I would like to ask how, in production environment, can I have the Tomcat log stored in the docume... | docker tomcat Log issue |
Yes, this can be done by writing a Job Summary in your workflow:
The simplest way to do that is to append any valid markdown content to the file referenced by the $GITHUB_STEP_SUMMARY environment variable.
echo "### Hello world! :rocket:" >> $GITHUB_STEP_SUMMARY
You can do the same thing from PowerShell:
"### Hello ... |
I have a requirement where I need to print information in the actions tab when the workflow runs is there a way to do that?
| Is there a way to show message in the actions tab in github actions workflow |
Had the same issue.
Commented out this line and the code was working fine again:DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'Found out it was because, even if i had already restarted my PC, one of Environmental variable I was referencing was improperly set:AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACC... | I am trying to make a blog app using django and python. I am also trying to use s3 buckets for storage and heroku for deployment.I am follow a tutorial online by coreymschafer. I am doing everything exactly as the tutorial, yet i am getting that error. I have no idea what to do. Please help!I have also installed boto3 ... | ValueError at / (Required parameter name not set) |
this should work:kubectl get namespace -l app.kubernetes.io/name=phoenics \
-o jsonpath="{range .items[*]}{.metadata.labels.app\.kubernetes\.io/created-by}{'\n'}{end}"ShareFollowansweredSep 1, 2022 at 21:38ericfossasericfossas1,96199 silver badges1414 bronze badges1In my case I wanted to to get a label from the nodes s... | I want to write a kubectl command to query all the namespace and then collect the value of a specific lable.{
"apiVersion": "v1",
"items": [
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration... | Kubectl json path select a field with special characters |
Given your expansion in the comments above:I know which images go to which folder, but its a big listI suggest putting that list in a text file, and using find and replace (orawk?) to transform that list intomod_redirectrules, e.g.Redirect /images/games/oldname /images/games/8/oldnameThen paste those into a configurati... | I had a folder that contained 15000 images, i decided to put them in 10 folders.The initial folder url where i had my 15000 images was :www.mysite.com/images/games/And the new folders' urls are :www.mysite.com/images/games/1/
www.mysite.com/images/games/2/
www.mysite.com/images/games/3/
www.mysite.com/images/game... | Redirect images from folder to folder |
1
You don't need explicit links anymore. Network should link all containers on the same user defined network. Compose creates a default network for you , based on the project name.
Share
Improve this answer
Follow
... |
I've a simple compose file, where I've three services A, B and C. Both A and B depends on C (i.e. have links to C). Here a simplified excerpt from docker-compose.yml:
kafka:
image: spotify/kafka
environment:
ADVERTISED_PORT: 9092
ports:
- "2181:2181"
- "9092:9092"
ServiceA:
image: elsoufy/myimage
... | Multi-host Docker compose application on Swarm |
7
Is this expected case?
Possibly, considering the Kubernetes Garbage collection policy for images:
Kubernetes manages lifecycle of all images through imageManager, with the cooperation of cadvisor.
The policy for garbage collecting images takes two factors into consid... |
I have k8s cluster with three workers and when I explicitly creates the pod, corresponding docker images get downloaded to worker. When I explicitly deletes the pods corresponding docker images are still present on worker nodes. Is this expected case?
| How does Docker image clean up works on kubernetes? |
What there be a performance hit when I add this to my .htaccess file?Possibly, if you have thousands or tens of thousands of user agent strings to match against. Apache has to check this rule on every request.or should I add it to my PHP file instead?No Apache's parsing of .htaccess will still be quicker than a PHP pro... | What there be a performance hit when I add this to my.htaccessfile:HOWTO stop automated spam-bots using .htaccessor should I add it to myPHPfile instead?or leave it out completely? Because spammers mightfake their useragentanyway?Would it also make sense to prevent users from accessing your website via aproxy server? I... | Blocking automated spam bots via htaccess or PHP? |
I suggest making sure that you have the proper scopes set up within your cluster for the service account to pull the image.Hereis an article that provides step by step instructions on how to grant users permission to pull a image from a registry.ShareFollowansweredSep 7, 2018 at 20:38JasonJason63833 silver badges1010 b... | I am facing same issue on pulling docker image from private GCR it throws errorFailed to pull image "gcr.io/{PROJECT_ID}/{IMAGE:TAG}:latest": rpc error: code = Unknown desc = Error response from daemon: repository gcr.io/{PROJECT_ID}/{IMAGE:TAG} not found: does not exist or no pull accessSolution which I tried but stil... | Kubectl Failed to pull docker image from private gcr.io repo |
Edit: I took a look at yourRakefile:deploy_branch = "master"must bedeploy_branch = "gh-pages".Let's fix this# go to site root
cd /your/folder
# be sure to be on the source branch
git checkout source
# make a backup (Shit happens)
cp -rp . ../save.alperunal
# remove the gh-pages branch on github
git push origin --del... | I have setup Octopress on my github account. I have 3 branchs; source, master, gh-pages. When i add a new blog post, generates locally but does not updates on my github account's gh-pages branch. I have tried to commit, push into gh-pages branch, but i get "nothing to commit, working directory clean" message. | Octopress update gh-pages branch |
Because item host(in ingress.yml) cannot be empty or wildzard (*.example.com).Make sure your host such as test.example.com(if u don't have dns, please config it in your local hosts),then testcurl -I http://test.example.com/test/login.jspthen u will seeSet-Cookie: route=ebfcc90982e244d1d7ce029b98f8786b; Expires=Sat, 03... | I have a v1.8.4 deployment running nginx ingress controller. I had an ingress which works fine. But now I am trying to enable sticky sessions in it. I usedkubectl edit ing myingto add these annotations:nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/session-cookie-hash: md5
nginx.ingress.kubern... | Enabling sticky sessions with nginx ingress, not working |
I don't know of any official spec which defines the Nandroid backup format. (That doesn't mean there isn't one; it just means I don't know of one.)
But I think I know what the first-ever Nandroid backup tool was.
I've tried a Google advanced search, restricted by date. I've also tried an XDA advanced search of certa... |
Background
If you want to write a tool which can back up an Android device, you must choose a format in which to store the backups. You can roll your own format, or you can conform to a pre-existing standard.
If you choose to conform to a pre-existing standard, there are various common backup formats you can choose f... | Is there an official spec defining the "Nandroid" backup format? If not, what was the first-ever tool which could create such backups? |
I use SDB on a couple of large-ish applications. The 10 GB limit per domain does worry me, but we are gambling on Amazon allowing this to be extended if we need it. They have a request form on their site if you want more space.
As far as cross domain joins, don't think of SDB as a traditional database. During the m... |
I thought that I could use SimpleDB to take care of the most challenging area of my application (as far as scaling goes) - twitter-like comments, but with location on top - till the point when I sat down to actually start implementing it with SDB.
First thing, SDB has a 1000 bytes limitation per attribute value, which... | What's the point of using Amazon SimpleDB? |
According to cognito docs (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-refresh-token)By default, the refresh token expires 30 days after your app user signs in to your user pool. When you create an app ... | I'm working on creating a serverless website using ReactJS, with AWS Amplify for authentication, and AWS Cognito for the user pool.I'm trying to get the site to sign users out if they haven't been active on the site for an hour (or if they close the tab and don't go back to the site for an hour). However, my users cont... | AWS Amplify user session doesn't expire in ReactJS |
1
If you are uncomfortable working from the command prompt you could look into installing a GUI for git. Otherwise use cd to navigate to your chosen folder and run the other commands from there.
Share
Improve this answer
Follow
... |
How do I do these steps on windows and what tool should I use. I've downloaded and installed Git.
Open a terminal and navigate to the folder you want to have your code in. Your AndroidStudioProjects folder, which can usually be found in your user directory, is a fine location.
Clone the repository into the folder usi... | Confused on Github instructions on Udacity for Sunshine App |
The best way to add tags is to use the Prometheus service discovery. This keeps these tags out of your application code and keeps it from being concerned about where it exists.However sometime if you absolutely need those extra tags (due to the service having extra insight that Prometheus service discovery isn't surfac... | My Java application exposes Prometheus metrics. I want to add extra tags to each metric so when they are scraped I can use those tags in a query. | How can I add common tags to all my Prometheus Metrics using the Java Client |
It's not the cleanest way to do it I guess, but I had the same problem as you and I changed:$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"to$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
bioni... | I tried to install Docker on Kubuntu 19.10.I used these steps to install:https://docs.docker.com/install/linux/docker-ce/ubuntu/During step 2, after added repository and key I got this messagePackage containerd.io is not available, but is referred to by another package.
This may mean that the package is missing, has be... | I can't install Docker because containerd.io has no installation candidate |
You can set the cookie and do a full redirect of the URL to make sure cookie is available when PHP code runs:RewriteCond %{HTTP_COOKIE} !^.*fullsite=yes [NC]
RewriteRule ^ %{REQUEST_URI} [L,R,CO=fullsite:yes:.example.com]ShareFollowansweredJun 16, 2014 at 13:50anubhavaanubhava771k6666 gold badges582582 silver badges649... | I need to get cookie value on first load of page, I know cookie can be retrieved on second load.I need this as I want to redirect based on cookie value set by server htaccss file.I set cookie this way in htaccess file.RewriteRule ^ - [CO=fullsite:yes:.example.com]I want to fetch the value in php. I know only this way b... | How to get cookie set by htaccess file on first load |
When a Lambda resides in AWS network it is able to use the internet to connect to these services, however once it joins your VPC outbound internet traffic is also routed through your VPC. As there is presumably no outbound internet connectivity the Lambda is unable to reach the internet.If your function needs internet ... | My AWS Lambda function code works fine when I run it outside of an Amazon Virtual Private Cloud (Amazon VPC). However, when I configure my function to connect to a VPC, I get function timeout errors. How do I fix these?def get_db_connection_config():
# Create a Secrets Manager client.
session = boto3.session.Se... | Trying to connect to Boto3 Client from AWS Lambda and Receiving Timeout |
If exec command wasn't enabled on the task when it was created, and it's running in Fargate instead of EC2, then there's no way to connect to it like you are trying to do.Are the docker images in ECR? You should be able to examine the ECS task definitions to see where the Docker images are, then pull down the Docker im... | My team inherited an AWS ECS Cluster with multiple linked containers running on it, but without the source code (yeah, I know...). We need to connect to one of the running containers and execute a few commands in it. Here's what we tried:connecting to the container instance, but there's no associated instance with the ... | Connect to a running container in AWS ECS Cluster |
I'm guessing you mean to a remote Docker Daemon? You can use Docker Contexts to be able to run all of the standard Docker commands remotely.
Once you have a context setup for the VM Docker Daemon, you can do for example:
docker ps, docker top and so on, like this:
docker --context <VM's context name> top
If you just m... |
I'd like to know what processes run in VM with Docker Daemon on a Windows 10 host.
How could I connect to the VM and list those processes?
| How to see all processes running on Docker Daemon VM on Windows 10 |
In case you are using CoreDNS 1.10.1, rolling back to 1.10.0 has helped me.https://github.com/docker/for-win/issues/13768 | I have the problem noted elsewhere regarding pods running in Docker Desktop via WSL:Could not resolve hostIn my specific case:Could not resolve host: Could not resolve host: login.microsoftonline.comReadingothersuchcases, here's what I've tried:quit Docker Desktopterminated WSL usingnet stop LxssManagerwsl -l -vreveale... | Docker Desktop running pods on WSL cannot resolve host name |
It's because you're using Linux commands in Powershell.
To export PROXY_IP you can use:$PROXY_IP=(minikube service -n kong kong-proxy --url | select -first 1)select -first 1behaves the same ashead -1.Then to set it as environment variable you can use:[Environment]::SetEnvironmentVariable("PROXY_IP", "$PROXY_IP") | I am trying to set an environment variable with the IP address at which Kong is accessible that will be used to actually send requests into the Kubernetes cluster. Installed Kong Kubernetes Ingress Controller Without Database. But always getting this error. Can anyone please help? Thanks in advance. | Setting environment variable with the IP address at which Kong is accessible to send requests into the Kubernetes cluster |
The below Action in a regular .NET Core 2.2 Web Api controller works for me:
[HttpGet]
public string Get()
{
return HttpContext.Connection.RemoteIpAddress.ToString();
}
However, you mentioned you are using nginx (I assume as reverse proxy) and that changes where to get the IP address information from. When we use... |
I have a JavaScript ajax call to my web api controller. I need to get their wan ip address when they make that call.
I have seen many examples for MVC but I am using asp.net core and the methods there do not work. The value(s) are always null.
This is js:
$.ajax({
url: "/my server ip",
type: "POST",
cont... | Get clients wan ip adddress when api controller is called |
The standard mechanism is not tosshinto containers, but to connect to a container usingdocker exec. Given a container Id like3cdb7385c127you can connect (akasshinto it) withdocker exec -it 3cdb7385c127 shor for a full login shell if you have bash available in containerdocker exec -it 3cdb7385c127 bash -lYou can stillss... | This is my docker compose fileversion: '2'
# based off compose-sample-2, only we build nginx.conf into image
# uses sample site from https://startbootstrap.com/template-overviews/agency/
services:
proxy:
build:
context: .
dockerfile: nginx.Dockerfile
ports:
- '80:80'
web:
image: http... | How to ssh into the services create using docker-compose |
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost/MyProject/index/$ [NC]
RewriteRule ^(.*)$ http:localhost/index.php [R=301,L]hope this will help... coz I did not try it on my local environment. | Considerhttp://localhost/MyProject/This is the root urlWhen accessing this i want to alter the url tohttp://localhost/MyProject/Apps/The url should look like above but should executehttp://localhost/MyProject/index.phpThat is i just want to add the word 'Apps' to the url. There is no folder named 'Apps'... | How to add a word after my root URL for every request? |
Clone your repository from github into a different location (so we don't accidentally mess something up on your actual desktop).
cd foo/bar
git clone ssh://... ./new-meteor-app
Now let's use git mv and git rm to fix it.
cd new-meteor-app
git mv desktop/generator-media-app/* .
git rm -r desktop
git commit
That should... |
Should be a really basic question, but I'm pretty stumped by it for some reason.
I have a project called generator-meteor-app, and it's located on my computer at /desktop/generator-meteor-app. I initialized a git repo in the generator-meteor-app folder, but when I pushed the files to github it's for some reason it is... | move git repo down a level/directory |
Using a service mesh will make your life easier. It takes care of certificate maintenance.Referhttps://istio.io/latest/docs/tasks/security/authentication/mtls-migration/https://linkerd.io/2/features/automatic-mtls/ShareFolloweditedFeb 3, 2021 at 10:47answeredFeb 3, 2021 at 8:37Tummala DhanviTummala Dhanvi3,17722 gold b... | How do I ensure that all deployed services within self managed k8 cluster should talk to each other in https only and not allow http call within? | Kubernetes https communication |
19
View Forks
Head to the project and click Insights, then Forks. This will show you a paginated table of all the forks.
You can filter the table by period and repository type and then sort based on stars, recent updates, open issues and open pull requests.
There is a "Swi... |
How can I view the forks that originated FROM another fork? The project I'm looking at has a ton of forks to the point where Github can't even show all of them already but I wanted to see the forks from a certain fork, if that makes sense.
For example:
Original Project
'-> Fork 1
'-> Fork 2
'-> Fork 2a
'... | How do I view the forks of a fork on Github? |
0
This was all my mistake! I was using a backup email address as my user.email and GitHub was flagging that not the other user's no-reply address. Once I changed my user.email to my no-reply the push went through (after running a git commit --amend plus a flag for changing ... |
Is it possible to use a no-reply address (like [email protected]) in a co-authored-by commit trailer if the account holder has selected the "Block command line pushes that expose my email" option? In my testing it seems that that option is all or nothing, as in, you can select that and block both your primary address ... | GitHub co-authored-by with private noreply address |
This is most likely an issue with leftover docker images. You should check:available space withdf -havailable inodes withdf -iThe most common solution for this issue is toremove unused docker imageswithdocker image prune -a:WARNING! This will remove all images without at least one container associated to them.
Are you ... | I have a zookeeper pod that somehow went to Crashloopbackoff and now no matter what I do , it is not coming up even though there is enough space on the node.Remaining space in node : 46GSpace requested by my pod : 2000MiI am able to see this in the logs of the pod===> Configuring ...
[Errno 28] No space left on device
... | kubernetes pod does not use space even when there is space on the node |
1
I think I know the issue now. The fact that it's returning 404 and processing your script tells me that the error_page is what's doing the 'rewrite' to get the request to /index.php. An error_page to a non-named location will transform the request into a GET, so the err... |
I have nginx 1.0.2 installed on Ubuntu 11 with php 5.3.5 running with FPM/FastCGI.
On a codeigniter applilcation of mine i get the following problem.
I have a simple login form with a username and password field. When I submit the form the $_POST array is empty. So is $this->input->post('username') and $this->input->... | Post array always empty on CodeIgniter application running on nginx |
34
Having two app = Flask(__name__) in the code can cause this problem.
That was my case, I removed one and kept the one in the app's folder's __init__.py, and it worked
Share
Improve this answer
Follow
ed... |
I am trying to follow the instructions from the following tutorial:
Tutorial
I downloaded the code from the following repo:
Repo
However when I run it locally and try to add something to the database, I get the following error:
builtins.KeyError
KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS'
When I tried to read the trac... | Flask, SQLAlchemy : KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS' |
Istio Gateway receives the traffic, and the routing from there will be handled by VirtualService configuration. For your non-www to www traffic routing, the same question was raised in Istio discussion forum, so that may be of your help.https://discuss.istio.io/t/simply-redirecting-non-www-to-www/3370As to getting all ... | I am using istioingress gateway. How can I redirect non-www traffic to www?apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: my-gateway
namespace: some-config-namespace
spec:
selector:
app: my-gateway-controller
servers:
- port:
number: 80
nam... | istio redirect non-www traffic to www |
On your production server, in your WordPress index.php file, at the top, you can temporarily putecho(exec("whoami"));die();Then browse to your WordPress site and see what user was running. On Ubuntu, mine waswww-data.This was useful for me for:Can I install/update WordPress plugins without providing FTP access? | I'm trying to setup Wordpress to be able to install plugins via SFTP (SSH) on a Centos 6 VPS.I've been able to modifywp-configso it uses the right credentials withuseras my SFTP user.Now I have a permission related problem, as if I do achmod 777on mywp-contentfolder I'm able to install, but with the normal permissions ... | How do I know which linux user Wordpress uses for plugin installation |
Since your query already has some parameters, append[QSA]to the end of the RewriteRule.RewriteRule ^search/(.*)/(.*)/$ /index.php?page=Search&Country=$1&Region=$2 [QSA,L] | I have several URLs which are dealt with by rewrite rules. Basically I want to add some $_GET-vars to a rewritten URL.Say I have:http://www.domain.com/search/the-netherlands/overijssel/I would like to add some extra data to the URL like:http://www.domain.com/search/the-netherlands/overijssel/?custom_var=1My RewriteRule... | Add $_GET-vars to a rewritten URL |
A token you create has all your privileges. Neither is it possible to gain privileges by using a token instead of username/password, nor to restrict a tokens' privileges. In SonarQube tokens and username/password are much alike - both tell the server who you are and what you are allowed to do.A solution in your case mi... | My developers are making use of theIntelliJ SonarLint pluginto connect to our SonarQube server and perform local analysisTo connect to the server they need to provide a token, so I want to create a single token which can be shared across all developers. I want this token to have minimal privileges i.e. to only allow th... | How to limit the permissions of a token? |
That's not possible out of the box. You can write a workflow that runs on a PR and fails if the source branch is not dev. Then add this workflow as a required check in the branch protection rule for the main branch.
|
I'm looking for methods to protect main branch by preventing branches except dev branch from pull request merge to main branch. But I could not find a way to it. Is there any way for it? or is it possible using Github Action?
| Allowing only certain branches to PR merge to main(master) branch |
You could try something like this. I place it in its own go routine so that it is non blocking and addition code can run below it. Often times in conjunction with a serverticker := time.NewTicker(5 * time.Minute)
go func(ticker *time.Ticker) {
for {
select {
case <-ticker.C:
// do something every 5... | I need to set a task for specific time with Golang. For example job has ending time so I need to change some rows on table. I searched for it but I could only find periodic tasks with Cron. I don't want to set a cron to check database in every 5 minutes.jasonlvhithas a library namedgocronfor Cron on Golang but I don't ... | Run function only once for specific time Golang |
The new Appfabric 1.1 has read-through and write-behind features which has guaranteed persistence of your cache.
Read through - If a requested item doesn't exist in the cache, the data can be loaded from backend store and then inserted into cache. With a read-through provider, the cache detects the missing item and c... |
I have some objects and classes that I'm currently saving into HttpContext.Cache but I want to make these persistent even when the app pool is recycled or even when the machine has been restarted.
I tried looking into using AppFabric or Memcached but they seemed focused on distributed cache and not so much local cache... | What framework should I use to get a persistent cache? |
As already noted in the comments, it's as simple asgit remote set-url origin https://github.com/contributor/project-name.gitAn alternative you may want to consider is to create a second remote for the fork.git remote add fork https://github.com/contributor/project-name.gitIf you want to keep the fork up-to-date with th... | On github, I've forked a project from its original sourceoriginal/project-nameso now I have a remote repo on githubmyusername/project-name. I would now like to switch my github repo to use a contributors forkcontributor/project-name. How can I do this? | Change git remote origin |
I can see 2 main issues here:You should avoid redirecting toindex.phpfor real file/dir/link.Don't use/as the starting slash in target URL otherwise it will not be relative your RewriteBaseChange your code to this:RewriteBase /naranjeshaltd/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Rewrit... | This is the original URLhttp://localhost/naranjeshaltd/index.php?url=homeand I want redirect it tohttp://localhost/naranjeshaltd/homeI have tried this htaccess code but it is redirecting page tohttp://localhost/xamppOptions +FollowSymLinks
RewriteEngine on
RewriteBase /naranjeshaltd
RewriteRule ^(.*)$ /index.php?url=$... | .htaccess Redirecting to wrong page |
0
You need to expose port 8000 from your Docker container as well as port 8080. You must expose multiple ports from your Docker container for multiple web services on different ports.
docker run -p 8080:8080 -p 8000:8000
Official documentation
Share
... |
I'm trying to use service workers inside a web app using Webpack and Docker.
Everything I made for the moment is working well (service worker, webpack config, worker registration...)
Actually my app is running inside a Docker container, in this container I can start my webpack build to create all my JS files.
But now ... | Use service workers with Webpack dev-server inside Docker container |
Your assumption is wrong - std::cout cannot prevent memory leak. The reason might be that with console output your cycle runs orders of magnitude slower than without it. You may try to measure console output time and try to disassemble the resulting executables and find out that in both cases the memory is actually al... |
I made a loop to try and run out of memory. Here's the weird part. When I run it like this, it works as expected and eats up the RAM, and goes over 1gb in seconds.:
while(true){
int *pointer66 = new int;
}
However, when I add a cout like this, RAM usage stays consistent (it increases slowly dude to the console rec... | When creating a loop of new pointers, outputting the dereferenced pointer doesn't increase memory usage |
This is a very valid concern. Firstly, there is no seamless migration like there is from Postgres to Aurora. Following, needs to be considered:How to do it: You will have to take a dump of your aurora db and then import it into postgres.Because of 1 above; you cannot have concurrent CURD operations running on your auro... | I am considering using AWS Aurora, however I am concerned for being locked into AWS indefinitely. So I am wondering how difficult it would be to transfer data from Aurora to my own Postgres database.
Thanks! | Migration from AWS Aurora to a local Postgres 9.6 database |
You can pushgit post-hookto Github. Instead, you can use Github'sWebhooks | I have been attempting to use hooks to automatically pull the updated repo from github to my remote web server. This is the code on the post-receive hook:cd /home/[my username]/document_root/[github repo name]/
git pull origin masterI expect this to run when there is a new commit from my development machine that syncs ... | Automatically Sync Local Github Repository with Directory on Server |
Usek8s.core.v1.Secret.get(pulumiName, secretName)(secretNamecan contain thenamespace/as prefix).Every Pulumi resource has aget()method.For example: Get thetokenfrom akubernetes.io/service-account-token:import * as k8s from "@pulumi/kubernetes";
type KubernetesSecretData = { [key: string]: string }
const namespace =... | I have a service with an inline plaintext config that requires certain information that is stored in Kubernetes secrets. What@pulumi/kubernetesAPI method can be used to access raw kubernetes secret values? | Pulumi: retrieve kubernetes secret value |
Sure, you can make it whatever string you want, it just has to be a string. The thing youcan'tdo istest.json: []since that's an array. The fact that your string happens to be valid JSON is not something K8s knows or cares about. | Does the following configuration for configMap create the test.json file of typeempty arrayorstring []kind: ConfigMap
apiVersion: v1
metadata:
name: myconfigmap
data:
test.json: |-
[]The convertor to JSON suggests string:{
"kind": "ConfigMap",
"apiVersion": "v1",
"metadata": {
"name": "mycon... | Can a configMap of type array be created in Kubernetes |
For Dashboard Could not locate thatindex-pattern issueandDashboard time-frameissue resolved by below steps.In problem visualized section replaced theidwithnew index pattern idandsavedit that's all. Now able to view my dashboard.Evendata in between time range viewissue also resolved by changingTime field: '@timestamp' t... | I am usingELK - 7.10.1Version.Throughlog-stashinitially i have uploaded18-Jan-2021 and 19-Jan-2021 csv datatoElasticsearchfurther i have visualized and created dashboard inKibana. Again today i have did the below.Deleted the index patterndata-1and deleted fromSaved Objectssections as well.I have uploaded my csv file da... | Kibana Dashboard says could not locate that index-pattern |
2
You should do a merge without commit like follow:
git checkout prod-branch
git merge --no-commit uat-branch
git restore properties-file
git commit
Share
Improve this answer
Follow
answered Jul... |
We have have a repository wherein we have branches specific to environment, Dev, UAT, PROD..
Each environment has a file which contains specific set of configurations.. We cannot make this file as a property file or as a template file..
When we raise a Pull Request for the code to merge from dev --> UAT or dev --> PR... | Git excluding files while Pull Request |
In IIS you can define HTTP Headers.
Within IIS click your images folder. Then click HTTP Response Headers. Then Set Common Headers...
From here you can check Expire Web Content and after how much time you choose. You can also do this for JS and CSS. Be careful which files you apply this too. Also if you set a very far... |
I have the report from YSlow:
(no expires) http://static3.scirra.net/avatars/128/40cfdcbd1b1ec1842e199c97c4b85a4a.png
(And a lot more similar). In my web.config though, I have:
<system.webServer>
<staticContent>
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode... | No expires header |
3
here is how you can build and deploy docker image on AWS
building the docker
choose the appropriate docker image,
your modules are still npm modules, you can choose Node docker image.
Build the react application, npm run build which will produce the build directory with... |
I am developing an application with React and Redux also I want to deploy this app to AWS, Can someone suggest me way to build docker images? Also I need to build image for build or entire src folder ? Why I need Nginx?
| How Can I Build docker image of react application? |
That metric is the same you are right it will the count of POD restart.Number of times the container has restarted. Sampled every 60 seconds.
After sampling, data is not visible for up to 120 seconds.Read more at :https://cloud.google.com/monitoring/api/metrics_kubernetesOrYou can use Prometheus to get the metrics and ... | We have an application deployed on GKE with a total of 10 pods running and serving the application.
I am trying to find the metrics using which I can create an alert when my Pod goes down or is there a way to check the status of Pods so that I can set up an alert based on that condition?I explored GCP and looked into t... | Monitoring Kubernetes Pods in Google Cloud |
Workaround: Adding -Dsonar.host.url=http://my.server:9000to mvn command works for meShareFollowansweredOct 23, 2015 at 12:01KaiKai12644 bronze badges2Works fine for me, since we're using Teamcity templates.–FrankOct 26, 2015 at 11:53Just in case if some one stumbles up on this. I had same error with latest SonarQube ( ... | After upgrading my POMs to sonar-maven-plugin:2.7 the configuration does not work any more. My configuration in settings.xml is like this:<profile>
<id>sonar</id>
<properties>
<sonar.jdbc.url>jdbc:postgresql://my.server:5432/sonar</sonar.jdbc.url>
<sonar.jdbc.driverClassName>org.postgresql.Driver</sonar.jdb... | sonar.host.url not working with sonar-maven-plugin:2.7 |
Release notes:https://raw.github.com/git/git/master/Documentation/RelNotes/1.8.3.2.txthttps://raw.github.com/git/git/master/Documentation/RelNotes/1.8.3.1.txthttps://raw.github.com/git/git/master/Documentation/RelNotes/1.7.12.4.txtAnd in particular:https://raw.github.com/git/git/master/Documentation/RelNotes/1.8.0.txtW... | When you "Install Command Line Tools" from the Github.app, you get symlink'd Git binaries pointing inside the Github.app, like so:/usr/local/bin/git -> /Applications/GitHub.app/Contents/Resources/git/bin/git
$ git --version
git version 1.8.3.1Meanwhile OSX/Xcode has it's own flavor:$ /usr/bin/git --version
git version ... | are there any core differences in the various Git binaries available for OSX? |
1
org.apache.spark.mllib.clustering.VectorWithNorm.toDense(KMeans.scala:612)
That's the problem. The cluster centres are converted to a dense representation, and then broadcasted to all the executors. This will not scale with thousands of features, which is your case. Chec... |
I am using spark's k-means clustering under Ml module and I am programming in PySpark. The module works well until 200 clusters but it gives OutOfMemoryError once I go past 300 clusters and more. My
data contains 200k objects and 25k features for each object. I am following the guidelines mentioned under the class pys... | Spark k-means OutOfMemoryError |
I know this is an old question, but I got this error as well on Windows 10 64 bit and the solution was:Download git-credential-winstore.exe and install it inc:\Program Files\Git(the default location for 64 bit Git install)Launch BINGW64Run this command:./git-credential-winstore -i "C:\Program Files\Git\bin\git.exe"It t... | I'm trying to set up the password caching utility that GitHub recommends for Windows 7 at the bottom ofthis page, and can't understand what the problem is (causing the program to stop working requiring me to close it).I googled the error message and found a question with a very similar error (here),Unhandled Exception:... | GitHub's password cache helper error |
Yes, Java offers three types of indirect references which are sensitive to memory usage.
A cache can use a SoftReference that will be cleared before the process raises an OutOfMemoryError. As long as there is plenty of memory, however, the SoftReference will prevent its referent from being garbage collected.
|
I have a method that create some heavy objects as cache. This objects are rarely accessed, but expensive and slow to process, and are initialized only on demand. Then on use my application, for instance, I could request about three heavy object like that, and reuse them, but too is possible that I run it once and it o... | Unset instance when have few memory |
I had forgotten to install php5-curl on my server.
|
I have been working with amazon S3 for media storage for a e-commerce site but I ran into this error and have no idea how to fix it:
Use of undefined constant CURLE_COULDNT_RESOLVE_HOST - assumed 'CURLE_COULDNT_RESOLVE_HOST'
Its coming from CurlBackoffStrategy witch is, as the documentation states:
Strategy used to ... | PHP AWS SDK throwing unknown error |
Constant variables accessed by immediate constants (constants in the opcode) or indexed constants (accessed via ldc instruction) are accessed by (bank, offset) pair, not by address. These reads go through the immediate constant and index constant caches. On some chips these are the same cache. Examples of constant acc... |
Instead of passing lots of arguments to a kernel, I use a __constant__ variable. This variable is an array of structures which contains many pointers to data in global (these pointer would be a list of arguments); an array for the multiple different datasets to call a kernel on. Then the kernel accesses this array and... | CUDA __constant__ deference to global memory. Which cache? |
I found another answer that explains part of what is going on here. I'll give a summary based on that answer:
When using NDB, entities are stored in a context cache, and the context cache is part of your memory usage.
From the documentation, one would expect that memory to be released upon the completion of an HTTP ... |
I'd expect the memory usage of my app engine instances (Python) to be relatively flat after an initial startup period. Each request to my app is short lived, and it seems all memory usage of single request should be released shortly afterwards.
This is not the case in practice however. Below is a snapshot of instanc... | App Engine instance memory constantly increasing |
update latest geckodriverdownload latest firefox tarball and follow this stephttps://tecadmin.net/install-firefox-on-linux/3.Install the official Firefox Beta PPA$ sudo apt-add-repository ppa:mozillateam/firefox-next4.Run apt-get update$sudo apt-get updateInstall firefox and xvfb (the X windows virtual framebuffer) pac... | I am trying to run selenium using cron.import os
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from pyvirtualdisplay import Display
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilit... | Error: GDK_BACKEND does not match available displays; Running Selenium using Crontab |
I think that your issue was reported here:TextView cursor blink GPU rendering unusualas the description appears to match your flame graph.The Google engineer that closed the issue asworking as intendedstated:This is actually working as intended - since the CPU is at very low
load (no animations running or any work be... | This is a problem that has me struck with confusion. I was profiling an app I am developing and noticed that whenever I stopped scrolling a RecyclerView the GPU profile started accusing horrible stats. I could not understand why this was happening, nothing on the screen appeared to be updating until I noticed something... | Deplorable GPU rendering profile only with just the cursor blinking |
This happened to me when I was building multiple applications that were sometimes sharing the same port. I fixed it by switching to a different port:module.exports = {
devServer: {
port: 8081
}
} | I am trying to run a vue-cli project using https.As per the instructions hereHow to run Vue.js dev serve with https?I've added thehttpssetting to thevue.config.jsas per below:module.exports = {
devServer: {
https: true
}
}When I run the app it correctly runs as https://localhost:8080 however Chrome throws... | How to run Vue-cli project using https on Windows |
The behavior of your browser is correct. TheLocation:response header has no meaning for status code 404 (compare14.30 Locationand10.4 Client Error 4xx).Therefore the response's hypertext body is displayed in the browser - as specified by the HTTP specs for code 404 (see10.4.5 404 Not Found).To allow changing the HTTP r... | I'm currently moving to an nginx server. I tried putting this in my 404 ErrorDocument named404.php:If I now try to accesshttp://mydomain.com/404.php, this works as expected: It redirects me to Google. But once I try to accesshttp://mydomain.com/iDoNotExist, the 404 ErrorDocument is shownwithout redirecting meto Google.... | Redirect instead of 404 Error page - Status Code not working (Nginx) |
What they are saying is that the servers are signed using a common CA (like Verisign, Thwate etc). All you need to do is trust that CA (you do this by importing the CA's trusted root certificate).You will need to find out which CA is being used and then check your cacerts file to see if you already trust the CA (appare... | We have a Java web application running inside GlassFish 3 web server.Our application connects to a LDAP server for authentication. Now customer is running LDAP on SSL i.eldaps.So we fetched the certificate from their LDAP server and added it to our trusted certificate. But still we sometime gets:exception is javax.net.... | Setting up SSL in Java 6 (GlassFish 3 server) |
You should upgrade to nginx 1.7.3 or higher.Feature: weak entity tags are now preserved on response modifications, and strong ones are changed to weak. | If I setup nginx to use gzip, it removes any etag header.The reasoning behind this is that the same resource cannot be byte-for-byte identical given that gzip has various compression levels.But nginx also removes a weak etag, which just means that the resources are semantically equivalent. This seems like incorrect beh... | nginx - missing etag when gzip is used |
On high level we can get this from kubectl$ kubectl describe resourcequota -n my-namespaceName: compute-resources
Namespace: default
Resource Used Hard
-------- ---- ----
limits.cpu 12 48
limits.memory 1024M 120Gi
requests.cpu 250m 24
requests.memory 512M ... | Is there a way to get the memory consumption per namespace on Kubernetes? | Kubernetes -> Memory consumption per namespace |
The ConcurrentQueue<T> that is used by default by BlockingCollection<T> contains a memory leak in .Net 4.0. I'm not sure this is the problem you're observing, but it could be.
It should be fixed in the upcoming .Net 4.5.
|
I implemented Producer/Consumer pattern with BlockingCollection for my experiment.
PerformanceCounter c = null;
void Main()
{
var p =System.Diagnostics.Process.GetCurrentProcess();
c = new PerformanceCounter("Process", "Working Set - Private", p.ProcessName);
(c.RawValue/1024).Dump("start");
var bloc... | Why GC does not collect unused objects? |
Try this... it does not rely on any other modules... Change the user/pass to you service ones in your account and change thevpnServerto whatever one you want to use.#!/usr/bin/env node
// Screengrab generator
// outputs a JSON object with a base64 encoded image of the screengrab
// eg;
const puppeteer = require('pupp... | I have a Puppeteer app running on a Windows Server. That server's IP address is blocked by some of the sites it has been crawling, so it needs a new one. I have a NordVPN account but have been informed via Server Fault that if I were to run the NordVPN app that I would lose remote desktop access at its static IP (https... | Is it Possible to Connect to NordVPN Via Puppeteer on a Windows Server? |
Once the dump command completes it drops it's connection, also implicitly dropping any locks if not done explicitly. So no, there's nothing separate you need to do. | I've been reading up on how to do mysql dumps / backups.
It sounds like to ensure that you get all data, you really should run with the option --lock-all-tables. What's not clear to me is if I need to run anything afterwards to unlock?I'm going to try to run the following command:mysqldump --lock-all-tables -u root -... | mysqldump --lock-all-tables |
Use copy_to and copy_from
f = open('t.txt', 'wb')
conn = psycopg2.connect(database='source_db')
cursor = conn.cursor()
cursor.copy_to(f, 'source_table')
conn.close()
f.close()
f = open('t.txt', 'r')
conn = psycopg2.connect(database='target_db')
cursor = conn.cursor()
cursor.copy_from(f, 'target_table')
conn.close... |
I'm trying to transfer a large data (15 B) from one database (postgresql) to other with python/psycopg2 on docker. My docker has 4 GB of memory and is getting out of memory.
What I am doing wrong?
cursor = conn.cursor()
cursor.execute('select * from schema.table')
for row in cursor:
tp = tuple(map(lambda x: x.enc... | Python psycopg2 - Work with large data |
TheLflag simply means to stop applying any rules that follow. Given the same URL,http://example.com/foo/bar?q=blah, and given the rules:RewriteRule ^foo -
RewriteCond %{REQUEST_URI} !^/bar.php
RewriteRule ^(.*)$ /bar.php?z=$1The first rule gets applied and the URI gets passed through unchanged (via the-target). The r... | Can someone give me an example when to use [L] flag? I'm learning about mod_rewrite moudle in .htaccess file and can't find out when to this flag. | When to use [L] flag in mod_rewrite |
Why dont you do package update/install and copy certificates in the Dockerfile?Dockerfile...
RUN apt-get update && apt-get -y install whatever
COPY ./local/certificates /usr/local/share/my-certificates
RUN your-command-for-certificatesdocker-compose.ymlversion: "3.7"
services:
your-service:
build: ./dirShareFol... | I'm trying to put some commands in mydocker-composefile to be ran in my container and they don't work.I map a volume from host to container where I have a Root certificate, all I want to do is to run this commandupdate-ca-certificates, so it will updates the directory /etc/ssl/certs with my cert in the container, howe... | docker-compose execute command |
Yes, you can use AVX. It doesn't depend on a graphics card.ShareFollowansweredJul 26, 2011 at 14:30A FogA Fog4,47011 gold badge3131 silver badges3232 bronze badgesAdd a comment| | From everything I've read, the i5 2500K processor disables it's integrated graphics if it detects an external GPU. I've got a motherboard that doesn't have an integrated video port so I have to add a PCI video card. I can't find any video cards that don't have a dedicated GPU. Does that mean that in order to use the... | Can you use the the AVX instructions with an i5 2600K if your motherboard doesn't include a video card? |
As discussed in the comments, I think that uploading the file to S3 is the best option. As far as I know, it's not possible to stop Elastic Beanstalk from destroying an ec2 instance, unless you want to get rid of all of the scaling and instance failure/autoreplacement features.One option I don't know much about may be ... | My Laravel app allows users to upload images. Currently, when the user uploads their images, they are stored in a temporary location on the server. A cron job then modifies the uploaded images (compresses them, etc.), and uploads them to S3. Any temporary files older than 48 hours that failed to upload to S3 are delete... | AWS temporary files before uploading to S3? |
I had the same error, after 15 min of debugging. Turns out all it needs is asudo:)Check outManage Docker as a non-root userto get rid of the sudo prefix. | I am getting an error message saying I can't connect to the docker daemon. I have looked into other people's answers who have had similar issues but it hasn't helped. I am running the version of Ubuntu 15.10. I will try to provide all the info I have.root@# docker-compose -f docker-compose-deps.yml up -d
ERROR: Coul... | Docker-Compose can't connect to Docker Daemon |
I am wondering why can't you have a wrapper script file (say shell or bat) around the "Dockerfile" to do these steps
docker build -t my-registry/<username>/<image>:<version> .
docker login my-registry
docker push <image>
What is it so specific about "Dockerfile". I know, this is not addressing the question that you a... |
For the use case where a Dockerfile needs to be built for each platform it's on (a bit niche I know), is there a way possible for it to push itself to the registry, i.e. calling docker push from within the Dockerfile?
Currently, this is done:
docker build -t my-registry/<username>/<image>:<version> .
docker login my-r... | Can a Dockerfile push itself to a registry? |
It is easy enough to curl asingle file from a git repocurl -L -O github.com/user/repository/raw/branch/filenameSince you have nodejs, you can usechriso/curlrequest, a node wrapper forcurl.npm install curlrequest
raw.githubusercontent.com/lodash/lodash/master/lodash.js
curl.request({ url: 'https://raw.githubusercontent... | I want to download a file in git repo without clone it.For examplelodashgit repo :https://github.com/lodash/lodash/in that git there is filelodash.js:https://github.com/lodash/lodash/blob/master/lodash.jsI have try usingnodegitbut still need to clone all files first.How to downloadlodash.jsfile only in git repo using n... | How to download file in git repo using nodejs? |
Turns out you cannot just sign a certificate like this and expect it to work, I had to properly sign using ca;$ openssl ca -config openssl.cnf -in cert.csr -out cert.pem
$ openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.pem
Enter Export Password:
Verifying - Enter Export Password:I just grabbed this opens... | I am unable to work out what is going wrong with this;$ openssl genrsa -out sign.key 4096
$ openssl req -x509 -new -nodes -key sign.key -sha256 -days 1825 -out sign.pem
...
$ openssl pkcs12 -export -out sign.pfx -inkey sign.key -in sign.pem
Enter Export Password:
Verifying - Enter Export Password:
$ openssl genrsa -out... | Making pfx from certificates with openssl giving "No certificates matches private key" |
The solution was just to comment Derby settings and uncomment MySql settings in sonar.properties :) | I've installed Sonar 1.8 plugin to Jenkins, according to the instructions form the official site, but build fails with the exception:java.lang.ClassNotFoundException: com.mysql.jdbc.DriverThere are no dependencies to the Sonar or MySql in the pom.xml. It was working with default settings (Derby DB), but fails with MySq... | java.lang.ClassNotFoundException: com.mysql.jdbc.Driver when running Sonar against Maven project on Jenkins |
Add an environment variable to your ff section of the Docker Compose file (and you can remove the link):
ff:
container_name: ff
image: selenium/node-firefox
environment:
- HUB_PORT_4444_TCP_ADDR=hub
expose:
- "5555"
Compose version 2 uses a different style of networking. From the upgrading guide:
env... |
I have a docker-compose file that I upgraded from version 1 to version 2.
It set ups a simple Selenium hub with a firefox node.
When I set it up as version 1 it launches fine. When I set it up with version 2 the ff container returns "Not linked with a running Hub container" and exits.
As I researched it and understood... | Containers are not linked with docker-compose version 2 |
The 'size' argument is not about memory reserved for anything. It is about the size of each allocation as returned by kmem_cache_alloc.
It may be there will be memory shortage in general, in which case, depending on flags pased to kmem_cache_alloc, the kernel may try to free some by e.g. shrinking caches.
|
I create a slab cache by kmem_cache_create(... size), then allocate memory from this cache by kmem_cache_alloc().
After I have allocated memory for "size" times, what happen if I call kmem_cache_alloc() to allocat size + 1th memory? Return NULL or extend cache implicitly?
| What happen if kmem_cache has no free memory for allocating? |
It may not be possible for all provided content on your HTTP server, but you can simply change the name of the file to update a file on the client side from the server. At that point, the browser will download the new content.
Sometimes, for websites with less traffic it is far more functional to set the cache to a mu... |
I am learning about apache and its various modules, currently i am confused about mod_expires. What i read so far is that using this module we can set future expiry header for static files so that browser need not to request them each time.
I am confused about the fact that if some one change css/js or any image file ... | mod_expires in apache htaccess |
You need to down sample large images
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 8;
Bitmap preview_bitmap = BitmapFactory.decodeStream(is, null, options);
Also take a look at Displaying Bitmaps Efficiently for more info.
|
I want to display a thumbnail size image and a text as a list view item. But all the images coming from the server are of a larger size. This is leading to an out of memory error. I am using network Image view to display the images. Will the memory contain the large sized image or the re-sized image? Can I avoid these... | Images in a list view produces out of memory |
In short: you are hitting the API rate limit, because you don't auth against it.The Github API has a very low rate limit, so if you install lots of packages it will at some point fail and ask you for your login/password.If you prefer to not provide your GitHub credentials to Composer, you can manually create a token us... | Is anyone else having an issue gedmo/doctrine-extensions installing via composer?The repository is public so I am not sure why it's saying it is a private repoCloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new?scopes=... | gedmo/doctrine-extensions asking for a token when installing via composer |
Not sure if you can link only one specific row... however, youcancustomize the link on each row (or cell) based on the values of the cells in that row.Here's some documentation related to that:https://grafana.com/docs/grafana/latest/panels-visualizations/configure-data-links/#data-links | I want to link the dashboards for each row in the table in my Grafana dashboard, which has a table visualisation. I tried using a data link, but it is linking to the entire table when I only wanted it for one row.I tried using a data link, but it inserted the entire table when I only wanted it for one row.A specific r... | How add a grafana data link to the paricular word in table |
0
If git is already tracking these files, then you will have to git rm them then add them back.
There is the possibility that another .gitignore - either global or in that directory is overriding the settings, see man page entry for precendence:
order of precedence, from ... |
I'm using git to upload my local files to amazon web service and I'm having this issue:
I've added a folder (images/members) to the gitinore file but it gets deleted on AWS when I do a git push. I just want to ignore any files and sub-folder under the images/members folder since the application create dynamic folders... | Folder deleted on remote host AWS using git |
CallCreateFileMappingorVirtualProtectorVirtualAllocpassing one of thePAGE_EXECUTE_XXXprotection flags. Themmapfunction is used for file mappings and soCreateFileMappingis the closest Windows analogue.ShareFollowansweredMay 21, 2013 at 18:56David HeffernanDavid Heffernan606k4242 gold badges1.1k1.1k silver badges1.5k1.5k... | I know that Linux supports themmapsystem command for being able to define a block of executable memory. How do you do the same thing in windows? I imagine there is some windows equivalent function that does the same thing, maybe? | How do you define a block of executable memory in windows? |
Disclaimer: this code has many potential flaws so I expect few iterations to get to the root cause.Parameters mismatch:# defined with one parameter
def get_features(comment):
...
# called with two
... get_features(comment, word_features), ...Suboptimal word lookup:# set(comment) executed on every iteration
for wor... | The training portion of my code can handle data in the order of magnitude of10^4but given that my whole dataset consists of ~500,000 comments I would like to train it with much more data. I seem to run out of memory when running the trainer with 100,000 reviews.Myget_featuresfunction seems to be the culprit.data = get_... | Memory Error when training Multinomial Naive Bayes model |
The problem come when you config your swarm subnet conflict with your subnets in VPC. You must change your swarm subnet different CIDR.
|
The company I'm working for recently decided to deploy a new application with docker swarm on AWS using EC2 instances. We set up a cluster of three EC2 instances as nodes (one manager, two workers) and we use stack to deploy the services.
The problem is that one of the services, a django app, runs into a timeout when... | Docker Service in Swarm cannot connect to AWS RDS when a port is published |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.