Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Always drain the node before removing it:kubectl drain $NODEDraining evicts every pod in the node and cordons it, so no new pods will be scheduled in it.You can use these parameters to 'force' draining, overriding some restrictions:kubectl drain $NODE --force=true --delete-local-data=true --ignore-daemonsets=trueFind f... | I've a running kubernetes(v1.11.1) cluster consisting of three nodes. I need to remove a node from the cluster properly. What should be the proper way to do that?
I've used kubeadm to create the cluster. | Securely shutdown a node from kubernetes cluster |
Deployment is the most common option to manage a Pod or set of Pods. These are normally used instead of ReplicaSets as they are more flexible and creating a Deployment results in a ReplicaSet - seehttps://www.mirantis.com/blog/kubernetes-replication-controller-replica-set-and-deployments-understanding-replication-optio... | I want to deploy a single Pod on a Node to host my service (like GitLab for the example). The problem is : a Pod will not be re-created after the Node failure (like a reboot). The solution(s) : Use a StatefulSet, ReplicaSet or DaemonSet to ensure the Pod creation after a Node failure. But what is the best for this case... | StatefulSet, ReplicaSet or DaemonSet. What is the best for a single Pod? |
I have gone with inling the JSON.Couple of maybe useful hints for those that end up here.Bucket names: Buckets should be named all in lowercase. If not, some s3/s3api operations work (mb,put-bucket-policy), but not others(put-bucket-website) Seehttp://support.rightscale.com/09-Clouds/AWS/FAQs/FAQ_0094_-_What_are_valid_... | I am trying to useput-bucket-policyto add a policy to an s3 bucket via the aws s3api (Windows).I am using precisely the policy code given herehttp://docs.aws.amazon.com/AmazonS3/latest/dev/AccessPolicyLanguage_UseCases_s3_a.htmlunder "Granting Permission to an Anonymous User" with my bucket name substituted in.I am get... | MalformedPolicy error using aws s3api |
I noticed that this question has gotten at least some viewers over the past bit. I was able to do this with the following commands.000_dd:
command: echo “noswap”#dd if=/dev/zero of=/swapfile bs=1M count=3072
001_mkswap:
command: echo “noswap”#mkswap /swapfile
002_swapon:
command: echo “noswap”#swapon /swapfile
01... | I'm trying to install nvm on my Elastic Beanstalk instance because our rails application requires node 6.9.5, currently node 4 exists on the instance. I'm running the commands01_node_install:
command: "sudo yum install make glibc-devel gcc patch openssl-devel c++"
02_node_install:
command: "curl https://raw.git... | Installing nvm on Elastic Beanstalk |
1
Check first if you have the github-oauth Jenkins plugin installed, as described in "Use the Jenkins OAuth plug-in to securely pull from GitHub", from Walker Rowe.
That would allow to register your Jenkins server as an application which can then access GitHub resources:
... |
I have been using Git Plugin in Jenkins to pull the source code from the GitHub repository.
I have been using UserName and Password for authentication
However, GitHub has announced
Deprecation Notice: GitHub will discontinue password authentication to
the API. You must now authenticate to the GitHub API with an A... | How to use github oAuth token with Git plug-in Jenkins |
server {
location = /admin { # its good to block the admin alone too
allow 127.0.0.1;
deny all;
try_files $uri $uri/ /index.php;
}
location ^~ /admin/ { # block anything beginning with /admin/
allow 127.0.0.1;
deny all;
try_files $uri $uri/ /index.php;
... |
I have a folder named admin which is in the var/www/html directory.
I want to access that folder from the public internet ie allows access only from localhost.
For that
1) Created a file whitelist-admin in the sites-available directory and added the following.
server{
location ~ /admin/.*\.php$ {
allow 127.0.0.... | Nginx :allow folder access only from localhost |
My current guess: the purpose ofCommandandArgsis the same as inEntrypointandCmdin regular Docker containers.Argsare just appended to theCommand:POST /services/create
{
"Name": "test",
"TaskTemplate": {
"ContainerSpec": {
"Image": "ubuntu",
"Command": ["echo", "foo"],
"Args": ["bar"]
}
}... | There's two distinct parameters in the/services/createendpoint, calledCommandandArgs. The description says:Command(array of string) – the command to be run in the imageArgs(array of string) – arguments to the commandI was puzzled by the fact thatCommandis an array: if the command arguments can be passed to it (which se... | In Docker service creation API endpoint, what's the purpose for Command and Args parameters? |
I think the second approach is better, as by using this the object will not be unnecessary in the memory. when ever you want to use is create it and destroy it once you have done with object.
|
I am confused that which approach of the below is better?
Create and keep an object in memory.
Create an object when needed and destroy it after that.
There may be situations when we may need same object multiple time. Like side menu or some other modal class.
We can either create singleton object and keep the obje... | Keeping an object or creating new one when require. Which is better? |
I have come across this issue a while back, and I think the issue is with the headers.
In the MDN docs, it is statedherethat other than for the simple requests, we'll get preflighted requests withOPTIONSmethod. There are 3 main headers that we need to send in response in your caseAccess-Control-Allow-Origin: http://loc... | I have a question about cors implementation in django.
Having a problem with setting the correct cors values.
My deployment is on docker.
I have a deployed 3 containers:backend: Django + DRF as backend (expose 8000 port)Nginxto server my backend (use exposed 8000 port and set it to 1338)frontendReact app used with ngin... | Cors problem with nginx/django from react app on docker |
There's a check inside of docker-compose for whether the network is used, and if it's unused, it skips creating the network:
$ cat docker-compose.net-only.yml
version: '2'
networks:
test1:
test2:
$ docker-compose -f docker-compose.net-only.yml --verbose up
.....
WARNING: compose.network.from_services: Some netwo... |
I've been playing with Docker-Compose for the last few days to see if it would simplify my Docker Container and Network building process.
I'm pretty happy with it, but ran into a problem when I wanted to create a few 'Networks' that didn't get used by any 'Services' (yet).
The reason I want this behavior was to have a... | Can I use Docker-Compose to create Networks without Containers |
Note: I'm guessing because of theother question you askedthat you are trying to create an ingress on a manually created cluster withkubeadm.As described inthe docs, in order for ingress to work, you need to installingress controllerfirst. An ingress object itself is merely a configuration slice for the installed ingres... | I create a ingress to expose my internal service.apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: app-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: example.com
http:
paths:
- path: /app
backend:
servic... | Ingress without ip address |
You want to remove the leading slash:RewriteCond %{HTTP_HOST} ^blog\.domain\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.blog\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/blog/$1 [R=301,L]
# no slash---^And make the+a*. URI's that are sent through rules in htaccess files have the leading slash stripped o... | I'm combining a main site at www.domain.com, and an old wordpress blog at blog.domain.com, into one completely new Wordpress install. I have exported and imported all the old blog posts so that they now live under wwww.domain.com/blog//I am trying to create one rewrite rule that will map all the old blog posts to their... | Trying to redirect blog.domain.com to www.domain.com/blog/ |
I just inspected the network request and found this. Maybe it'll helphttps://hub.docker.com/v2/search/repositories/?query=alpineSo I think the answer to your question is justhub.docker.com/v2, but reading theAPI v2 Roadmap, it isn't too clear on what all the endpoints and their supported parameters are (the Docker Hub ... | Would someone know the equivalent URIs that are in v1:registry.hub.docker.com/v1/
index.docker.io/v1/of what they are now for the public Internet sites in v2?I've checked docs.docker.com/registry/spec/api/ for such URIs and on this site but everything keeps pointing back to a v1 address.Goal here is in python to sear... | Public Docker v2 API Endpoints |
You have to generate SSL cert file by configuring like openssl in Apache. Then you have to configure in httpd.conf file.
You can find these step by step in the following link.How do I allow HTTPS for Apache on localhost?ShareFollowansweredOct 29, 2018 at 15:39karthykarthy111 bronze badgeAdd a comment| | https://www.youtube.com/watch?v=Zdl68h_N2lcI followed this link. I tried to make HTTP to HTTPS in local apache and I got it hashttps://localhost but I want to makehttps://localhost. when I enter this address its says un-secure connection. but I want to enter this address without any warning.
And I need to know how to... | how to make localhost http to https |
Don't know if it will exactly solve your problem, but have you investigated using Windows NLB?http://en.wikipedia.org/wiki/Network_Load_Balancing_ServicesIt possibly supports custom load balancing logic | I want to implement my own policy for DNS look up on Windows platform (Server 2008), in more details, the customization I mean is when there is a request to look up IP for a host name comes for DNS server, my own customization logics (inside DNS) will be called (e.g. find a low working load machine) and return the IP a... | DNS customization development on Windows? |
A tag is a fixed name for a single commit. It is an independent concept and tags have no relation to branches. It is not possible to do what you want to do.
Behind the scenes:
commit: abc123def456
branch "next": "refs/heads/next" -> "abc123def456"
branch "v1": "refs/tags/v1" -> "abc123def456"
|
I have two branches in my repo: master and next.
How can I tag version per branch?
I mean when I check the next branch and go to tags tab, I want to show the next tag's.
Right now I use:
git tag v1.0 next
git push origin --tags
But tab show the v1.0 for both: master and next. I expected to see this tag only when I... | How to tag per branch? |
Minikube is officially single-node at the moment. There's a discussion about this limitation athttps://github.com/kubernetes/minikube/issues/94But it seems people havefound ways to do it with VirtualBoxand there are other ways to run amulti-node cluster locally. Otherwise I'd suggest creating a cluster with one of the ... | I have MiniKube running on my Windows 10 machine. I would like to add an additional node to the cluster.I have a Centos VM running on a different host that has k8s installed. How to I get thekubectrl join commandto run on the VM from the master node running on my Windows machine?Do I need to install an overlay network ... | Adding nodes to a Windows Minikube Kubernetes Installation - How? |
At the time of writing this answer, there is no built-in way of explicitly notifying the reviewer when their changes have been addressed.As Adil B mentioned, the best workaround is probably just to @ the reviewer in a comment so they get a notification. | On GitHub, when a colleague leaves a review on my PR and "Requests Changes", is there a way for me to mark the PR with "changes made"?This should ideally send a notification to the reviewer to let them know that they can look again at the PR. | How can I inform a reviewer that their comments have been addressed |
0
For problems like that I normally implement my custom history stack and map the back button to it.
document.addEventListener('backbutton', backHistory, false);
EDIT:
I want to say, is that I implement my own history mechanism, every link in the app that is clicked is ad... |
So I'm currently trying to figure out a way to fully reload a page of an Android Cordova webview app when that page is navigated to via the Android back button.
Currently, when the back button is clicked, the app will open a cached version of the page with all user input still in the input fields. We need the fields t... | 'onpageshow' not triggering on Android WebView app |
That's not how you usually do it. The normal workflow is to create a separate key for every machine/user and add it separately.
In github you only place the public key (usually there is some comment after identifying the key) - but for login you need the private part, which is not on github.
The folder you show a scre... |
I have 2 laptops. On first one I've created a SSH key in GitBash (locally) and successfully added the key on Github, and established the connection.
Now I need to get this SSH key from Github and insert it locally on second laptop into GitBash. How can I do it?
Locally in folder ".ssh" I have 2 files:
those 2 files
Bu... | How to replace SSH key in local Git Bash |
This is the code you'll need in your .htaccess file:Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteBase /
# To redirect http:://www.mysite.co.uk/ to http:://mysite.co.uk/
RewriteCond %{HTTP_HOST} ^www\.(mysite\.co\.uk)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# To redirect /mysub/foo to http... | I've searched everywhere and used some examples but they don't meet my specific needs, hence why I'm asking here if anyone can please help? I know the http:: below isn't correct, it's just because I can't post links here.I'd like to redirect http:://www.mysite.co.uk/ to http:://mysite.co.uk/whilst alsobeing able to red... | Create a 301 redirect in .htaccess for folder to subdomain AND redirect www to non-www |
3
GitHub has disabled using passwords for authentication over HTTP in favor of personal access tokens. This is because while personal access tokens are restricted to only certain access, if a password is compromised, then it allows access to the entire account, including t... |
Can someone tell me what causes or how to fix authentication issues when trying to commit files to my GitHub? Everytime I put in my username and password after trying a commit it says it's the wrong credentials. I've tried my username password email password and both won't allow me to commit using tortoise SVN. I'm ab... | TortoiseSVN commit to Github Authentication |
Lots of good questions! To answer them one by one.
Yes, your general understanding is right - that's one way to use Git. For a more detailed explanation of a workflow like this, check out Git-Flow: here and here. The branches are typically called master and develop. In addition to that, you will be working with featur... |
I am a web-developer.
I am currently working as follows:
connected via FTP to the site directory on the server => download project (part of project) => develop new modules => uploaded complete modules (few files) to the server. My colleagues are developing other modules on this site and use the same algorithm.
I know ... | Few questions about working with Git |
The first part of your rule set is working fine, the missing www. is added correctly. For the second part you only need a simple rule to remove the index.html without using any additional condition:Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.co.uk [NC]
RewriteRule ^(.*)$ http://www.domain.... | I have noticed that search engines have been crawling both the domain.co.uk and www.domain.co.uk versions of a web site that I've recently developed.
Using .htaccess I have been able to setup http 301 redirects so that:http://domain.co.ukis redirected tohttp://www.domain.co.ukandhttp://www.domain.co.uk/index.htmlis re... | Using .htaccess to redirect domain.co.uk/index.html to www.domain.co.uk |
2
If you are on RHEL6 or your glibc is newer than 2.10 (you can check with rpm -q glibc). It's due to the missing of MALLOC_ARENA_MAX.
In RHEL 6, the malloc of glibc (>=2.10) has a new arena allocator which allows each thread to be able to allocate its own arena. And the m... |
I have a basic python program that makes a ton of threads (2000), processes something, then writes it out.
I've narrowed down my code to be similar to this (with 2k threads):
URL fetch thread example on:
http://www.ibm.com/developerworks/aix/library/au-threadingpython/
Except inside my class I literally do nothing (g... | python threading memory usage 64 bit vs 32 bit |
VPC Peering works much the same way as how Public Subnets connect to the Internet Gateway -- the Route Tables define how traffic goes in/out of the Subnets.
For VPC Peering to work:
Invite & Accept the peering connection (Done)
Create a Route table in each VPC that points to the Peering connection for the other VPC's... |
I am running Tableau Server on our EC2 instance in VPC A. Meanwhile, I created a postgres RDS in another VPC B. Now I want to establish the connection between the Tableau Server and RDS. CIDR of RDS VPC is 172.31.0.0/16 and that of EC2 VPC is 10.0.0.0/16.
According to A DB Instance in a VPC Accessed by an EC2 Instance... | Why can't I connect AWS RDS instance from EC2 instance in another VPC after peering |
1
Do you really need two different declarations for very same php processing? I would stick with one and only differentiate the root using alias on /product for example:
server {
listen *:80;
server_name example.com;
index index.html index.htm index.php;
... |
I have two apps. One is simple php file and the other is a zend framework app. I am using Nginx. It is working for simple php app which is accessible via example.com/.
For the ZF3 app, nginx is working only for parent route and none of the child routes are working. The parent route is accessible via example.com/produ... | ZF3 on nginx only working for parent route |
Just guessing. I would do it that way.
# Maybe not necessary to redirect from /my-app to /my-app/.
location ~ ^/my-app$ {
set $myargs $args; # workaround to encode spaces in query string!
return 303 $scheme://$server_name/my-app/$is_args$myargs;
}
location /my-app/ { # works mostly with ... |
I have an angular app, my-app, which I build locally with ng build --prod and serve with Nginx dockerized, the Dockerfile is:
FROM nginx:alpine
COPY /dist/my-app /usr/share/nginx/html
EXPOSE 80
As long as I launch a container based on an image build with this Dockerfile, it works.
Though, I need to put another Nginx... | Nginx reverse proxy + Angular served by Nginx |
36
You could consider using socat. It solved my problem, which seem to be similar.
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock &
This allows you to access your macOS host Docker API from a Docker container using: tcp://[host IP address]:2375
On m... |
I'm runner Docker for OSX, and having trouble getting the Docker remote API to work.
My situation is this:
Docker daemon running natively on OSX (https://www.docker.com/products/docker#/mac, so not the boot2docker variant)
Jenkins running as docker image
No I want to use the Jenkins docker-build-step plugin to bui... | Access Docker daemon Remote api on Docker for Mac |
For caching the result of a method execution and returning it for subsequent calls serialization is not needed.
The most likely reason it needs to be Serializable is that when you cache some data in a clustered environment changes made to the cached data on one node would have to be replicated on other nodes of the cl... |
I am working on ibm websphere commerce (wcs). In this framework we have an option to cache our command class, basically they are just a java classes. While having a new cache entry i got to know that these java classes must be serializable (implement the java.io.Serializable interface). Why is that?
is it like caching... | how serializable is releated to caching a java/command class? |
14
+25
You are using the path parameter incorrectly.
path - A list of files, directories, and wildcard patterns to cache and restore. See @actions/glob for supported patterns.
Instead of setting path to the resolve file it should point ... |
I am trying to cache the SPM packages on GitHub Actions with cache action, I am following this example:
- uses: actions/cache@v2
with:
path: Myproject.xcworkspace/xcshareddata/swiftpm/Package.resolved
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os ... | SPM cache not working on github actions, any ideas? |
@peak has already pointed out the problem with your query, and here is the solution based on the insight he provided:
[ (.data[] | {time: .[0], x: .[1], y: .[2]}) + {id: .info.id} ]
See it online on jqplay.org
|
I have a json file where a time series in stored under data key and and an object id is in info key:
{info:
{id: abc},
data:[
[10, 5, 3],
[12, 6, 4],
# 5000 list items
]
}
I would like to flatten the json and produce something similar to:
[
{id: abc, time: 10, x: 5, y: 3},
{id: abc, time: 12, x: 6, y: 4... | jq produces memory overflow |
1
I am not expert on networks. But after reading your post, it appears that you do need a DNS config like this:
A -> slarti (or IP)
CNAME jenkins.slarti -> slarti
CNAME gitlab.slarti -> slarti
CNAME servlet.slarti -> slarti
CNAME web.slarti -> slarti
This is what I have d... |
I am running different services in Docker Containers on my Ubuntu server (14.04 Trusty Tahr) at home. My currently Setup at the moment is as following:
Jenkins jenkins.slarti
Gitlab and leanlabs.io under gitlab.slarti
Java Servlet Webserver under servlet.slarti (apache tomcat)
"Normal" Webserver under web.slarti (ng... | Setup subdomains in docker environment |
Well, feeling silly to answer my own question but I found out the answer so maybe I will save a few minutes to the next person that runs into it.The answer is very simply: in the manifest.xml file, create a remote tag with the fetch specifying ssh as the transport and "git" as the username. Here is an example:<remote n... | I am trying to set up a private repository of Android source code while hosting the git trees on github as private repos.I have no problem changing the manifest.xml file to point to public git trees hosted on github in the same way that CynagonMod does, but when trying to point to private repos I get the following erro... | How to set up an Android source repo while hosting the git trees as private repositories on github? |
Basically, you'll want to point all your domains to the same directory (maybe using a wildcard in yourvhosts) and then setupurlrewrite; look atthis questionfor an example, and it can be in a .htaccess file or Apache configuration.All requests that come in will go to the same gateway.php and you can extract the current... | I have been looking for a while now to find a solution to accomplish the following system.I would like to build a PHP system on, let's say, domainA. On this domainA I will allow an administrator to 'create' a new website. This website contains only of pieces of text, which are all stored in a database. This, I know how... | Manage multiple websites from one domain |
Yes, you can.Afteramplify initandamplify add hostRunamplify add apiChooseRESTChooseCreate a new Lambda functionDon't chooseCRUD function for Amazon DynamoDB tableChooseServerless express function (Integration with Amazon API Gateway)At your project./amplify/backend/function, you’ll see your lambda express. And then you... | I am considering using AWS Amplify to create a backend for my app(s). I was hoping to use OrientDB which I have set up on an EC2, but all the examples and tutorials for Amplify only mention DynamoDB. Before I spend a lot of time learning how to use Amplify, is it possible to connect to any type of DB that can be instal... | AWS Amplify database options |
3
Did you create the template from an existing t2.micro instance? I had the same problem when I did that. The problem went away when I created a new template from scratch, i.e. manually selecting the AMI and instance type etc.
Share
Improve this answer
... |
I'm trying to create an autoscaling group from a launch configuration which was created from an ec2 AMI. However, in the second step, 'Configure Settings', I get an error message when I click 'Next'. I tried reviewing my first step but could not find anything on CpuOptions nor could I find anything about CpuOptions in... | create autoscaling group from launch configuration error: The t2.micro instance type does not support specifying CpuOptions |
Why this works?
There are two ways to answer your question:
Technical Answer:
Your code has an Undefined Behavior.
It dereferences a NULL or a deleteed pointer. As per the C++ standard both invoke Undefined Behavior. It works or not is pointless.
Undefined behavior means that any behavior is possible and it may or may... |
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Why the below piece of code is not crashing , though i have deleted the object?
Today i found out that i know nothing about C++ memory management. Please take a... | Why it works? C++ memory management [duplicate] |
As far as I can suggest based on the information you've given you have the following options:a. Build a newer image of the Nginx image as yourBASEimage and copy all your source code to that image. Then reference that image in the KubernetesDeployment.ORb. Add your source code to aConfigMapand mount that in as a volume.... | I have 2 pods inside a single deployment yaml of kubernetesone for code base and php-fpm togetherone for nginxhow to share the code base folder to nginx ?i dont expect to see any answer that using init command to copy the folder from pod to podEDIT
i also try to split frontend service (nginx) and backend service (fpm a... | How to share code base between Kubernetes pods? |
At this moment of this post AWS doesn't support EBS with ECS withecsTaskExecutionRole. The workaround is to have a bash script loaded at login which fetches the env variables from KMS | When trying to deploy my multi-docker application through beanstalk with a dockerrun.aws.json file, where it has secrets, I get an error that I have to specify an executionRoleArn. When I'm looking at the file, it IS defined.I tried moving it to different spot inside the file, tried to define taskRoleArn too, nothing r... | Why do I get an error about executionRoleArn not being specified when it's clearly specified in the file? |
The error message is telling you that you need to update your local repository before it can successfully push anything to the remote server. The reason: the other machine has previously pushed to the remote server, which makes it the most recent update to the repository.The scenario generally works as thus:User A an... | I have two computers at home, one with Windows and one with Linux and I have one big repository called Work that I put on Git. But I work with this remote from both computers. I have created the repository initially on one and create the git repository (on bitbucket) from there. And I was able to make commit, push or p... | I work with git with two computers and can't push the commit from both |
You have one SQLAlchemy session per Worker and probably use 2 Workers with uwsgi. SQLAlchemy caches results per session, so session of worker 1 returns the new results, because you have added the records with this worker, but the session of worker 2 is not updated and returns only the old records.
Solution: don't crea... |
I have web server (512 RAM) with:
FLASK + SQLAlchemy (SQLite) -> uWSGI -> Nginx
PROBLEM: Sqlalchemy returns different results of the SELECT command (query.all).
Example:
Added a few records in the database.
I reload the page: new records have not returned (but old returned).
Reload the page: all the records returned... | Sqlalchemy returns different results of the SELECT command (query.all) |
We were having the same issue after upgrade our puppeteer and MacOS. One solution we have is to instruct puppeteer to use our ownChromeinstead of the bundledchromiumby specifying theexecutablePath. Below is a Typescript snippet how we specify it. Same thing if you use vanillaJS.Sometimes that still is not enough, we ha... | I have a node application that uses puppeteer to test a web site. Up until we updated to latest puppeteer 1.12.2 we had no problem.Node launches puppeteer on timerOn every launch, system asks: "Do you want to the application Chromium.app to accept incoming network connections"In the Firewall tab of the "Security and Pr... | Puppeteer/chromium on Mac chronically prompting "accept incoming network connection?" |
301 redirect is exactly what nginx shall do with that rewrite rule: because you put $scheme://$subdub at the replacement part, nginx will do a 301, ignoring that "break" flag.If the replacement string begins with http:// then the client will be redirected, and any further rewrite directives are terminated.Are you tryin... | I want to achieve the following:Request Host:http://example.com.proxy.myserver.comShould be rewritten tohttp://example.comand passed to a squid server via nginx proxypass.server {
listen 80;
server_name ~^(?.*)\.proxy\.myserver\.com$;
location / {
rewrite ^ $scheme://$subdub break;
proxy_set_header X-Rea... | Rewrite nginx host and proxypass to squid |
In:- nane: "CONNECT_STATUS_STORAGE_TOPIC"
value: "connect-status"nane:should have an "m".When the error message saysspec.template.spec.containers[0].env[15].nameyou can find the first (zero-indexed) container definition, and within that the sixteenth (zero-indexed) environment variable, which has this typo.ShareFollo... | I am trying to create a Helm chart for kafka-connect. For the testing purpose and to find out where I am exactly wrong I am not using the secrets for my access key and secret access key.My helm chart is failing with the error:helm install helm-kafka-0.1.0.tgz --namespace prod -f helm-kafka/values.yaml
Error: release lo... | Helm chart failing with Required value |
I think, instead ofRewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]you should have something likeRewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]do have the rewrite rule match. Your link is currently produced by the third rule.ShareFolloweditedDec 14, 2011 at 11:32Lightness Races in Orbit382k7777... | I'm using Codeigniter and followingthese instructionsto force ssl but all requests are being redirected tohttp://staging.example.com/index.php/https:/staging.example.comMy.htaccessis:### Canonicalize codeigniter URLs
# Enforce SSL https://www.
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}... | Force https://www. for Codeigniter in htaccess with mod_rewrite |
I'm not sure if there is a way to restrict access to specific parts of the history. It's also probably not a great idea to delete the history because you may want to refer to it later.
If your students don't need access to any of the commit history, and you are just trying to avoid copy/pasting code into a new repo, t... |
When creating course programming assignments I often work in a Github repo. These repos usually contain commits that have the solution to the assignment. Since I don't want to make those commits available to the class is there a way to prohibit access to the commit history?
Right now I end up having to create a br... | How do I easily prohibit access to a Github repository's commit history? |
You need to make an HTTPS request instead of HTTP. Authentication always needs to use SSL.You are also using the wrong URL's. As per their docs (https://developer.github.com/v3/auth/#basic-authentication) you need to set your basic authentication to the following path:https://api.github.com/userAnd make your repo req... | I'm trying to use basic authentication inGithub api. I wrote something like this:require 'httpclient'
request = HTTPClient.new
request.set_basic_auth("http://api.github.com/authorizations", "my_username", "my_password")
request.get "http://api.github.com/user/repos"and expect it returns the repos of a user. However, i... | Basic authentication in Github api with http request in Ruby? |
I would recommend you to take a look on the product calledHazelcastalthough its not a distributed cache per se, its rather a data grid which is very scalable and very easy to use.BTW it could be better if you could tell us what are the requirements, there are a lot of open source products that may fit your needs...Hop... | What is the best open source distributed cache that can be used in Java?I thought it was EHCache, but apparently it can be scaled on multiple nodes only when using Terracotta Server Array, which is a commercial product.My goal is to build caches for streaming data in real-time with a certain delay, and my actual estima... | Open-source Distribued Cache for Java |
Your approach is correct, except for the size length in the inner loop: it should length * sizeof(int) or sizeof(**grid):
grid_state[i] = malloc(length * sizeof(**grid));
memcpy(grid_state[i], grid[i], length * sizeof(**grid));
The cause for the unsettling error is the subarrays are allocated too smal... |
I'm trying to copy a 2-d array of ints to a temporary 2-d array of ints and return it. I've had a go at it below, but I get a pretty suspicious malloc error. I tried inspecting it with valgrind, but couldn't find anything useful
int **get_grid_state(int **grid, int height, int length) {
int **grid_state;
int i... | How do I copy a 2d array into a temporary 2d array and return it? |
If you rebase and then force push, you need to try and restore the previous master HEAD which was overwritten by the new (and shorter) history.Checkgit reflog: you should see your old commit before rebase.Or See "Does github remember commit IDs?": you can query the push events to get back an old commit that way.In both... | Repo:sumitridhal/n-th-digit-of-eCount shown in github profile and commit count in repository not matching.
Due to this some of latest commits are missing from repository.
Is there any way i can retrieve all my commits? | Repository commit count wrong |
Your commands did not delete.git/modules/ng/css/lib/submodule-nameDo delete that subfolder first (internal to the.gitrepo folder),Make sure your secondgit submodule adddid not re-introduce a.gitmodules(if yes, remove it first)and then try again to add your submodule. | I'm having an issue adding my submodule back to my project after previously deleting it. When I try to add the submodule everything works perfectly up until I push my changes, git complains:remote: Git submodules detected, installing:
remote: No submodule mapping found in .gitmodules for path 'ng/css/lib/submodule-name... | Git Submodule Won't Delete |
Objects in C++ often have destructors that need to run at the end of their lifetime.delete[]makes sure the destructors of each element of the array are called. But doing thishas unspecified overhead, whiledeletedoes not. This is why there are two forms of delete expressions. One for arrays, which pays the overhead and ... | Every time somebody asks a question aboutdelete[]on here, there is always a pretty general "that's how C++ does it, usedelete[]" kind of response. Coming from a vanilla C background what I don't understand is why there needs to be a different invocation at all.Withmalloc()/free()your options are to get a pointer to a ... | Why does the delete[] syntax exist in C++? |
For me this was annoying too and i have solved this by simply unticking the check box Start Docker Desktop when you login. This setting can be found if you right click on the whale in the tray and then go to settings > general.
If i now want to use Docker i have to manually start it.
You can also go to windows service... |
Every time i start my computer, the Docker.Service service is loaded into my memory.
System: Windows 10 Pro 1903, Docker 2.0.0.3
I tried to avoid this by:
Disabling docker in the task manager startup tab
Disabling it in the Docker for Desktop itself
Removing all docker related entries from the Run / RunService folde... | How to remove Docker.Service from startup |
As with prime security issues around allowing an app to do such a change - my best guess would be that the winRT is not designed to allow apps to modify Remote Desktop settings on a given machine.You can ask the user to do the changes manually: To see if remote desktop is enabled at all, just check for whether the Term... | There are several VPN Client applications on iOS and Android environments. Is there any way to build a VPN Client for the Windows 8 RT apps?I've found discussion here:http://social.technet.microsoft.com/Search/en-US/windows?query=vpn&rq=meta:Search.MSForums.ForumID(fc9915fa-bd55-4c15-9a72-9956efee4a7c)+site:microsoft.c... | Does Windows 8 RT have a way to setup VPN configuration settings in an app? |
You've correctly diagnosed the problem: not all rules have technical debt definitions.SonarQube Findbugs Plugin v3.3 was released on 1 Sept 15 and the description includes "Fix missing SQALE debt", so it may be what you want.From the commit comments of the SonarQube Checkstyle Plugin, v2.3 includes an update to the SQA... | I'm using SonarQube 4.5.4 to run analysis on my JAVA project and then loading the results into SonarQube. SonarQube is showing the issues, but for few issues technical debt is blank.
When I pullout reports using Sonar webservice api I get issues with blank debt for certain rulesFollowing are 2 sample rules for which de... | SonarQube showing some issues with Technical debt as "blank" |
The signal should be of type float32, not float64:x_gpu = gpuarray.to_gpu(signal.astype(np.float32)) | Hi I am attempting to a simple 1D-FFT transform on a signal. This is what I tried:import numpy as np
from scipy.signal import hilbert, chirp
duration = 1.0
fs = 400.0
samples = int(fs*duration)
t = np.arange(samples) / fs
signal = chirp(t, 20.0, t[-1], 100.0)import pycuda.autoinit
from pycuda import gpuarray
import nu... | How to do a 1-D fft using pycuda? |
At first. Task Scheduling not available in laravel 4, you need use newest version.At second. What a path/home/mysite/public_html/protected/app/start/artisan? Can you show application folder structure?Howeverartisanits file in application root folder in default installation. For sample - my application placed in\var\www... | I am trying to set cron for a command or controller action but it seemed to be not working for me. Please see below what I have triedI have been trying to set up scheduler as per your instructions with no result.When I try:1. /usr/local/bin/php /home/mysite/public_html/protected/app/start/artisan cron:runit gives error... | cron scheduler in laravel 4 |
solved it. just changed the syntax:<!--#include file="header.txt" -->to<?php include 'header.txt'; ?>and all works fine.ShareFollowansweredMay 16, 2015 at 18:28midknytemidknyte60733 gold badges77 silver badges1919 bronze badgesAdd a comment| | I built a jquerymobile website (/mobile/) on my host and it works great. Moved it to the client's host and it's not loading, just see a grey loading circle in the middle.I'm using includes on the websites and for my host had to add these lines to the .htaccess file to make it work:AddType text/html .shtml
AddHandler se... | includes not working |
This (untested) code might solve your problem. It limits its input to 1,000,000 bytes per read, to reduce its maximum memory consumption.
Note that this code returns the first million characters from each line. There are other possibilities for how to deal with a long line:
return the first million characters
return ... |
I need to scan two large txt files (both about 100GB, 1 billion rows, several columns) and take out a certain column (write to new files). The files look like this
ID*DATE*provider
1111*201101*1234
1234*201402*5678
3214*201003*9012
...
My Python script is
N100 = 10000000 ## 1% of 1 billion rows
with open("myFile.tx... | Skip a long line when reading a big file to avoid MemoryError? |
The-iswitch has its meaning. It requires the path to your key:sshpass -p passphrase scp -i ~/.ssh/id_rsa pi@ipadress:/home/pi/filename /home/flash/mylog.logor leave it out completely, if it is in the default location:sshpass -p passphrase scp pi@ipadress:/home/pi/filename /home/flash/mylog.log | I am trying to write a cronjob using scp.But scp is not working correctly.PATH=/usr/sbin:/usr/bin:/sbin:/bin:/bin/bash:/usr/bin/ssh:/usr/bin/scp
scp -i pi@ipadress:/home/pi/filename /home/flash/mylog.logscp command works fine when I run it from terminal without password.My log file has nothing in it(it is blank).How sh... | SCP command not working in Crontab |
0
I have the same problem. The only solution I found is to reinstall docker every time I log in. It seems to work fine until I restart the computer.
It is a very bad solution but it's the best that I've got so far.
Share
Improve this answer
... |
I've tried installing Docker and so far I've never been able to use it on my Ubuntu machine:
when I try to start Docker Desktop it only shows Docker Desktop stopped... for an indefinite amount of time. There sometimes shows up randomly an Alert with the messages "Unable to calculate image disk size" for a second or so... | docker won't start! I'm stuck on "Docker Desktop stopped |
GraphQL API v4You can get user count & organization count usingGraphQL API v4:{
user: search(type: USER, query: "type:user") {
userCount
}
org: search(type: USER, query: "type:org") {
userCount
}
}Try it in the explorerwhich gives :{
"data": {
"user": {
"userCount": 24486303
},
"org"... | UsingGitHub API, how can I count the total number of users/organizations at the time of the request?UsersandOrganizationsAPI responses do not containlastLink header.Note: FollowingnextLink header until the last one, is not a solution for me because of therate limitsfor a free account. | GitHub API get total number of users/organizations |
There is no container available with the namefriendlyhelloas you are simply running the container usingdocker run -p 4000:80 friendlyhello, herefriendlyhellois the name of the image, and not the container's name.Eitherrun that container by giving it a name like below:-docker run -p 4000:80 --name SOMENAME friendlyhello... | I'm trying to stop and remove a docker - container.I started with docker turorial part1, now part2 from here:https://docs.docker.com/get-started/part2/#run-the-appI copied souce from there. and its also available here:https://gist.github.com/sl5net/8b510bc0d3e00c474575e010003406c1Here you could see how my console looks... | Docker Error: No such container: friendlyhello |
Persistent Volumes have access semantics. on GCE I'm assuming you are using a Persistent Disk, which can either be mounted as writable to a single pod or to multiple pods as read-only. If you want multi writer semantics, you need to setup Nfs or some other storage that let's you write from multiple pods.In case you are... | I've done quite a bit of research and have yet to find an answer to this. Here's what I'm trying to accomplish:I have an ELK stack container running in a pod on a k8s cluster in GCE - the cluster also contains a PersistentVolume (format: ext4) and a PersistentVolumeClaim.In order to scale the ELK stack to multiple pods... | How Do I Make A Persistent Volume Accessible to Multiple Kubernetes Pods? |
When you choose Edit > Refactor > Convert to Objective-C ARC, a sheet opens with a list of your project's targets. Click the disclosure triangle next to a target to show a list of source files. From there you can choose the files to convert to ARC.
|
I've discovered some inconsistencies when using the ARC migration tool multiple times on the whole project.
For example:
- (void)dealloc {
[ivar release], ivar = nil;
}
The first iteration convertis this to:
- (void)dealloc {
ivar = nil;
}
The second iteration gets rid of -dealloc alltogether. Assuming that ... | Is there a way to use the ARC migration tool on a per-file basis only? |
@mustaccio was correct.The Docker Hub website allows you to login with either your username OR your email, and the website does not require a case-correct username.docker loginDOESrequire a case-correct username, andDOES NOTwork with your email address.When I signed up I chose a camel-cased username e.g.:MyUsernameDock... | Copy/pasting my username and password into the Docker Hub website works fine.The password is long, but does not contain shell-breaking symbols.Copy/pasting those same credentials into command-linedocker loginresults in anincorrect username or passworderror. I have tried passing the credentials interactively (both copy/... | Credentials do not work for "docker login" |
This is not presently supported. If you send a PR, it can be added. | I'm tring to run snmp-exporter (Prometheus) with static context-engine-id (SNMP v3 option).
But I cannot find that setting in "SNMP Exporter Config Generator".
(https://github.com/prometheus/snmp_exporter/tree/master/generator)How to configure context-engine-id in snmp-exporter/snmp-exporter-config-gen ?
(Or not suppo... | Using static context engine ID with SNMP Exporter (Prometheus) |
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
Improve this ... |
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 |
3
I think you should use this to send messages from the backend to your clients.
To send a callback message to the client, use:
POST
https://{api-id}.execute-api.us-east-1.amazonaws.com/{stage}/@connections/{connection_id}
https://docs.aws.amazon.com/apigateway/latest... |
I have a nodejs websocket AWS lambda endpoint (Api Gateway) set up and it connects and can echo messages back. During initial connection, I save the endpoint and connection_id to a database. That gets saved just fine. If I open a browser client, and connect to the websocket endpoint, I can connect successfully, and se... | Can you send a message to a websocket client from a non-websocket lambda? |
Custom Sender Lambda Triggers is the way to use 3rd party notification service providers.
Cognito docs are lacking at the moment (steps are missing, Lambda code has to be fixed after copying from the example, no instructions of how to deploy with CloudFormation, ...).
High level overview of the steps:
Create a symmet... |
I have tried to invoke the custom message function to send emails through SendGrid, well it worked but I don't have a way to stop AWS from sending through their emails. I have tried to set the messageAction to "SUPPRESS" but another problem arises. There is no such support for self-registration since messageAction is ... | Configure Cognito to send emails through third party such as SendGrid the proper way |
You could clone your GitHub repo (in command-line, outside Eclipse), and:
git mv everything under MyProjectName in the root folder of that repo
git add, git commit and git push that move.
import that .eclipse (now move under the root of the local git repo) in a new Eclipse workspace.
|
I have the following problem with EGit 3.4.2.201412180340-r in Eclipse Luna Service Release 1a (4.4.1), using GitHub (which should be mostly irrelevant):
I have a example java project set up that is configured with EGit and is connected to a GitHub Repository. I commited a few example changes to master and pushed them... | EGit - Project subfolder in repository |
You can use gitsubmodules. You will create a repository for each module, then, under a centralized repository (which will act as the folder) you can have folders that point to other repositories.The way to adding submodules is:$ git submodule add https://github.com/username/modulenameRepeat this for each of the modules... | Closed. This question isopinion-based. It is not currently accepting answers.Want to improve this question?Update the question so it can be answered with facts and citations byediting this post.Closed7 years ago.Improve this questionWe're (our team of developers) considering of picking up a really big project that we t... | What are viable alternatives to github's lack of a proper folder structure? [closed] |
iptables is the userland interface to the Linux netfilter engine (IPv4)ip6tables is the userland interface to the Linux netfilter engine (IPv6)99% of the Linux firewalls are no more than wrappers arround iptables/etc/sysconfig/iptables (in your example) is generated in the script by iptables-savethere are millions of i... | I tried to stick with one flavor of linux, but have somehow gotten into CentOs, Fedora and Amazon Linux mix. (Amazon linux is lowest priority as it has its own firewall thru console)Goal: Configure firewall for CentOS and Fedora (15-17) using a common script (BASH or PUPPET)Confusion:Fedora 17 seems to use new "firewal... | Centos/fedora/amazon linux: iptables best practice |
Looks okay. One thing that comes to mind is the once-a-day schedule interval, which sometimes confuses because the first run will start at the end of the interval, i.e. the next day. Since you set your start_date to more than one day ago, that shouldn't be a problem.To find a solution, we would need more information:Co... | I'm not able to run airflow DAG by scheduler. I have checked multiple threads here on forum, but I'm still not able to find the root cause. Of course DAG slider is set to ON. Below you can find DAG information:with DAG(
dag_id='blablabla',
default_args=default_args,
description='run my DAG',
... | Why airflow scheduler does not run my DAG? |
What if I allocate 100 GB, but only for one day? Will that be the same cost as having the 100 GB for the whole month, or just 1/30th of that?
I've read the FAQ too but let me tell you that if Amazon charged me the $0.10 with a monthly rate I'd be broke by now. I spin up (and spin down) ebs-backed servers several tim... |
With Amazon Elastic Block Store, you only pay for what you use. Volume storage is charged by the amount you allocate until you release it, and is priced at a rate of $0.10 per allocated GB per month.
This is priced per month. Other things are priced per hour (and that means that if you use something for two minutes,... | Amazon EBS pricing: monthly? daily? hourly? |
As it happens in these cases, I was actually editing a wrong configuration file that didn't get loaded by Nginx.Adding the following to the right file did the trick:fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_connect_timeout 600; | I am having issues with a long-running PHP script:<?php
sleep(70); # extend 60s
phpinfo();Which gets terminated every time after 60 seconds with a response504 Gateway Time-outfrom Nginx.When I inspect the Nginx errors I can see that the request times out:... [error] 1312#1312: *2023 upstream timed out (110: Connection ... | Nginx + Php-fpm fastcgi upstream timed out |
Try anInstallation Access Token. I can't remember the specifics but I used that link to set myself up. | I have a JavaScript file that needs to use the GitHub API to get the contents of a file stored in a repository.I am usingGitHub.jsto access the API, and it shows the following method for authentication:// basic auth
var gh = new GitHub({
username: 'FOO',
password: 'NotFoo'
/* also acceptable:
token: 'MY_... | Best way to authenticate with GitHub.js? |
I would suggest just a GET request (you just need a ping to indicate that the PC is on) sent periodically to maybe a Django server and if you query a page on the Django server, it shows a webpage indicating the status of each.In the Django server have a loop where the time each GET is received is indicated, if the time... | I have two PCs and I want to monitor the Internet connectivity in both of them and make it available in a page as to whether they're currently online and running. How can I do that?I'm thinking of a cron job that gets executed every minute that sends a POST to a file located in a server, which in turn would write the c... | How to monitor the Internet connectivity on two PCs simultaneously? |
You could shut off default pushes viagit config push.default nothingor for stronger protection on a specific remote you could break pushes to that remote entirely by e.g.git config remote.origin.pushurl "you really didn't want to do that"ShareFollowansweredApr 22, 2012 at 17:19jthilljthill57k55 gold badges8080 silver ... | This question already has answers here:Git: Set up a fetch-only remote?(5 answers)Closed8 years ago.I have read/write access to a repo on GitHub. I have a local clone of that repo. I'd like to be able to pull changes from that remote, but I should never push changes to it.Is there a way I can mark the remote as read-... | Can I mark a GIT remote as read only? [duplicate] |
You may want to try removing the A record and redirecting the root to www. | I'm having a problem using Facebook object debugger (https://developers.facebook.com/tools/debug/og/object/) to scrape information from my page and i'mgetting the error "Could not resolve the hostname into a valid IP address." as you can see bellowThis website hosted in Azure, as an Web App.Everything looks ok on the d... | Azure Web app - Could not resolve the hostname into a valid IP address |
You can useorg.eclipse.egit.github.core.service.IssueServicefor fetching all issues of a given repo.See anexample in this question, where you will get thepagesof issues:IssueService service = new IssueService(client);
Map<String, String> params = new HashMap<String, String>();
params.put(IssueService.FILTER_STATE, Issu... | I want to list all issues into all repository under all organizations.
I tried this code:GitHubClient client = new GitHubClient(host);
client.setCredentials(user_name, password);
RepositoryService repository = new RepositoryService(client);
IssueService issues = new IssueService(client);
... | List all issues in repository |
Aurora is also a type of Amazon RDS based on MySQL.
How did you migrate data from RDS (which one?) to Aurora on RDS? Did you use Amazon DMS to migrate data between Mysql/MariaDB/Aurora RDS to Aurora RDS? You said you restored a snapshot - (it's impossible to restore Aurora from non-Aurora snapshot).I had a performance... | Closed. This question needs to be morefocused. It is not currently accepting answers.Want to improve this question?Update the question so it focuses on one problem only byediting this post.Closed2 years ago.Improve this questionI have created one instance of Amazon Aurora in Sydney Region and restored my RDS snapshot o... | Amazon Aurora is slow compare to Amazon RDS [closed] |
2
Make sure when your fastcgi settings in monoserve are pointing to a valid path.
fastcgi-mono-server2 /applications=www.domain1.xyz:/**:/var/www/www.domain1.xyz**/ /socket=tcp:127.0.0.1:9000
/var/www/www.domain1.xyz/ must point to the root directory of your web app.
... |
I want to set up a Mono ASP.NET on Nginx, but it seems the index priority does not work.
If I use the example from http://www.mono-project.com/FastCGI_Nginx as following:
location / {
root /srv/www/htdocs/;
index index.htm index.html default.aspx Default.aspx;
fastcgi_index Default.aspx;
... | FastCGI and Nginx wrong index files priority |
10
while installation, choosing python3 worked well for me. Choose the "To install the AWS CLI version using the bundled installer" from here: https://docs.aws.amazon.com/cli/v1/userguide/install-macos.html
sudo /usr/local/bin/python3 awscli-bundle/install -i /usr/local/a... |
I'm trying to download the AWS CLI tools onto my mac. The error message is pretty clear Unsupported Python version detected: Python 2.7 To continue using this installer you must use Python 3.6 or later. The issue I'm having is that aliasing python to python3 isn't working. For some reason, after aliasing, the installe... | AWS CLI not working because of unsupported Python version |
I would useMSDeploy. This is the successor toApplication Center 2000. This will allow you to build packages (files, GAC assemblies, DB, COM...) and push them from DEV --> QA -- PROD. This way, you would ensure a full deployment, and you could archive the logs to meet the audit requirements. | My team recently received the results of an External Audit and we must correct one item.They want us to change the way we move code to our production environment.
We currently use source control and a ticketing system for all code changes and move requests etc..The problem comes in with how the code is pushed to our pr... | Tool to Audit Code Moves to production Web Servers? |
Inside additional parameters, try adding this:-Dsonar.lanauge=c#If it doesn't work, try using command line runner instead of a TeamCity plugin:Step 1:Download and installSonarQube MSBuild runner from here.Step 2:Create a command line runner in your project build steps in TeamCity with commands below,don't forget to re-... | I am trying to setup SonarQube for a C# project, using Teamcity. The problem is that no C# files gets analyzed.Can you please double check my configuration and let me know if I might have missed anything ? I am all out of ideas on why it does not analyse any C# files.If you need any additional info please let me know a... | How to configure Teamcitys SonarQube Runner to analyze C# files |
As noted in the error message, you are unable to connect to your MySQL server in Azure because the firewall rules are not setup correctly to allow your IP address to access the server. As a result, your app/client cannot connect to the newly created server. Read more aboutfirewall settings in Azureand use either thepor... | After creating a new server in the Azure Database for MySQL service, I get the following error when trying to connect to it. The server has been created since I see a notification on the Azure portal to the effect and can also view the server details on the Azure portal.Client with IP address<ipv4 address>is not allowe... | Unable to connect to my newly created MySQL server in Azure |
I fixed the very same problem by installing AND enabling php-apcu on my ubuntu machine.sudo apt-get install -y php-apcuDON'T forget to enable the module:sudo phpenmod apcuDouble check that php-apcu is loaded in the command line version of your php config. Try to run the following on the command linephp -i | grep apcuI ... | I'm using PHP7.0.8 and the doctrine cache (with APCU) in my symfony project. When I call function from my controllers which use this cache, no problems, It works fine !But when I create a command file which use a repository which use the doctrine cache, and when I run this command on my shell, I've the error :[Symfony\... | Symfony 2 - Attempted to call function "apcu_fetch" from namespace "Doctrine\Common\Cache" |
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp_unisol/
RewriteRule ^img/([^/]+)$ images/$1 [L]
</IfModule>Put this in the.htaccessfile in thewp_unisoldirectory. | I'm trying to hide the original image path from my WordPress site. wherever it does not work. but other rules are work properly.I had tried likeRewriteRule ^wp_unisol/img/([^/]+)$ wp_unisol/images/$1 [L]but it is not working.when I check on .htaccess checker it shows true.I need image path like bellowOriginal Path:http... | how to hide original image path using htaccess |
I'm not an expert (so please check to confirm) but I believe there will be an UPGRADE mechanism where a regular HTTP connection can be made, then upgraded to a WebSocket, so no existing firewall rules interfere unless they are doing aggressive application level packet inspection. Connections are still initiated by the ... | I'm extremely excited about html5's websockets spec but I have a concern.These days everyone is operating off of some network, with routers (wired/wireless) that have built in firewalls, windows has a built in firewall too.With that in mind when the server attempts to connect back to the browser that started the websoc... | Will html5 websockets be crippled by firewalls? |
1
Pass -e "REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io" in the docker run command line. It should work. I have the same questions as you regarding config.yml, etc .. I tried overriding the config.yml but I figured out it should be populated with lots of default va... |
I want to configure a local pull-through registry cache, and following this document:
https://github.com/docker/distribution/blob/master/docs/mirror.md#configuring-the-cache
It says I need to add such a section:
proxy:
remoteurl: https://registry-1.docker.io
username: [username]
password: [password]
I have sev... | How to "add" the proxy section to configure a registry as a pull-through cache? |
When you use the code t->data = data you are not copying any data to your node! All you are doing is make the node's data member point to the data that the function's argument also points to - so, if you later change that data, then you will also change the node's data. This is probably not what you intend! For exampl... |
I have this function which should copy a node in a linked list(not first of it)
struct Node {
char* data;
Node* next;
};
void Insert(Node*head, int index, char* data) {//find a is function to find needed position
Node* temp = find(head, index);
Node* t = (Node*)malloc(sizeof(Node));
t->data = (cha... | what is difference between these? |
I ended up doing like this:public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UseMetricServer(9102);
app.UseRouting();
app.UseHttpMetrics();
...
}And then for my KubernetesDeploymentI had to add both port 80 and 9102 tocontainerPorts underports.Additionally I had to... | I'm setting up a Prometheus exporter for my ASP.NET Core 3.1 app.I've imported<PackageReference Include="prometheus-net.AspNetCore" Version="4.1.1" />And this is what I have configured:public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UseRouting();
app.UseHttpMetrics();
... | Expose ASP.NET Core Prometheus metrics on another port |
The strategy is missing for the publish job. You have to define it under publish too.
Using ${{ matrix.node-version }} is invalid here without strategy:
publish:
runs-on: ubuntu-latest
# ...
steps:
# ...
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version... |
I have installed the latest version of NodeJs (v18.14.0), but it still fails to do jobs, what should I do? this is the code from my workflow and the screenshot of the error.
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versi... | Why do I always fail when I run jobs on github actions? even though I have installed the latest version of Node on my machine |
5
you can use the docker exec command to execute any command you need inside the container.
For instance, to list all running processes inside a container:
docker exec <my container> ps aux
or to display the content of a file
docker exec <my container> cat /etc/resolv.conf... |
I'm having docker containers in Linux server, I need know how to get details of applications, services and its status inside the containers. Which command do I need to execute to get those details.
For example:
A container contains tomcat server. I need to get the details of tomcat server and its status(whether the se... | How to get services and its status inside the docker containers? |
5
You should be able to use the steps in the linked document in the reverse order as well:
Create an empty repository at github.com
Create a clone of the enterprise repository on your local.
Add github.com as a remote reference on your local clone.
Push all references to t... |
We have a few repositories and forks on a trial version of Github Enterprise. I want to evaluate how to migrate from Github enterprise to Github.com (into a paid for organization, say)
The only resource I found was how to perform the migration in the opposite direction
https://help.github.com/enterprise/2.0/admin/arti... | Migrate from github enterprise to github.com |
You need to specify the network to be created as well:version: '2.1'
services:
mysql_db:
image: mysql:latest
networks:
db:
ipv4_address: 172.17.0.44
volumes:
- "./.mysql-data/_data:/var/lib/mysql"
restart: always
ports:
- 8555:8110
environment:
MYSQL_ROOT_PASSW... | i just try to give a static ip 172.17.0.44 to this container , like this way,but it's not working ,how to give the static ip address with "network_mode : bridge"bcoz i need to give 172.17.0 series ip for this containeri'm getting this 172.17.0 series ip when i put network mode bridgeversion: '2.1'
services:
mysql_db:
... | Docker-compose Giving static IP in network mode : bridge |
3
The error message you got was probably
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
Because the continuumio/miniconda3:latest image sets everything up for the root user only, which is not what Jenkins runs as.
To be able t... |
I'm trying to activate a conda environment in my Jenkinsfile, which was created from a Dockerbuild, but I can't figure out how to activate the environment in the shell script in my Jenkinsfile.
But this line . /opt/conda/envs/myapp-env/bin/activate fails on activating in my Jenkinsfile
Dockerfile
FROM continuumio/mini... | Activate conda environment from docker image in Jenkinsfile |
You can try something like this:import future.keywords.in
violation[{"msg": msg}] {
input.request.kind.kind == "Deployment"
some container in input.request.object.spec.template.spec.containers
not container.resources.limits.memory
msg := sprintf("Container '%v/%v' does not have memory limits", [input.... | I'm checking if key resources.limits is provided in deployment kubernetes using OPA rego code. Below is the code, I'm trying to fetch the resources.limits key and it is always returning TRUE. Regardless of resources provided or not.package resourcelimits
violation[{"msg": msg}] {
some container; input.request.... | rego opa policy to check if resources are provided for deployment in kubernetes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.