Response
stringlengths
15
2k
Instruction
stringlengths
37
2k
Prompt
stringlengths
14
160
0 At first you should add port 443 to your docker-compose like this: ports: - 80:80 - 443:443 Then you should volume /etc/nginx/nginx/files: volumes: - ./:/var/www - ./nginx/nginx.conf:/etc/nginx/nginx.conf - ./nginx/nginx/files:/etc/n...
I have a working redirect from HTTP traffic to HTTPS traffic. The environment consists of a flask application in a docker container that is being routed through an NGINX docker container. Below is the nginx.conf file. After running docker-compose up I am able to get the containers active. After running curl localhost,...
nginx redirect http to https in docker container connection refused
Yes - .htaccess works for the whole tree inside the directory. To override it's rules you have to add the given rule in a subdir and then the new .htaccess will work for the whole tree inside that subdir.
If I have a directory structure like this:- index.php - public - img - css - application - controllers - user - admin - models - views .htaccessI'm using the index.php as my front controller so all MVC classes and files are included and don't require directory access.In the .htac...
htaccess files with "deny from all" does it deny subdirectories as well?
Yes and yes, these are common race conditions. You can avoid them if by simply writing the code as var test = _cache.Get("Test"); if (test != null) { return test as string; }
MemoryCache is a thread-safe class, according to this article. But I don't understand how it will behave in a specific situation. For example I have the code: static private MemoryCache _cache = MemoryCache.Default; ... if (_cache.Contains("Test")) { return _cache.Get("Test") as string; } Can element's livin...
MemoryCache Contains() thread-safety
Based on your shown samples, could you please try following. Since you are adding web directory/folder to all uris, then have it as your very first rule and keep it at very top of your htaccess rules file.Also please make sure to clear your browser cache before testing your URLs.RewriteEngine On RewriteCond %{REQUEST_...
tell me what the problem is, let's say there is a file web/quberty/2.jpeg, I go to the link host/quberty/2.jpeg, the site produces 404, although the rule isRewriteCond %{REQUEST_URI} !^/(web) RewriteRule ^assets/(.*)$ /web/assets/$1 [L] RewriteRule ^css/(.*)$ web/css/$1 [L] RewriteRule ^js/(.*)$ web/js/$1 [L] RewriteRu...
htaccess does not open file when requested
I don't know a standart way to resolve this problem. But you can write your annotation like this:def diskcached(cachefile, saveafter=1): def cacheondisk(fn): try: with open(cachefile, 'rb') as f: cache = pickle.load(f) except: cache = {} unsaved = [0] ...
Within thefunctoolspacakge inPython3, there is alru_cache()decorator that will memo-ize your function calls.Is there a way for me to dump out this cache into a file and then load the file back into in-memory later?I couldn't find this feature in the functools documentation. What would be the recommended way to achieve ...
lru_cache dump into a file and loading back into in-memory again
Add "result:=nil;" The reason this warning was added, is explained in https://bugs.freepascal.org/view.php?id=36973
Free Pascal 3.2.0 issues a warning about a missing initialization for a function result of type TBytes: function ToBytes(const AValue: RawByteString): TBytes; begin SetLength(Result, Length(AValue)); <--- Warning if Length(AValue) > 0 then Move(AValue[1], Result[0], Length(AValue)); end; Warning: fun...
Free Pascal warning "function result variable of a managed type does not seem to be initialized"
When do you want them to fire?CREATE TRIGGER AFTER ACTIONThat runs after the action (insert update delete) being committed.INSTEAD OFfires the trigger in place of the action.One of the biggest gotchas with triggers is that they fire whenever an action is performed,even if no rows are affected. This is not a bug, and it...
Pretty general question regarding triggers in SQL server 2005.In what situations are table triggers fired and what situations aren't they?Any code examples to demonstrate would be great.I'm writing a audit based databases and just want to be aware of any situations that might not fire off the triggers that I have set u...
When do triggers fire and when don't they
You don't specify whether you're usingsonar-runnerorMavento run your analysis, but this looks like sonar.host.url may have a typo in it. Double-check that it's a valid, fully-formed URL.EDIT:For sonar-runner it's set in[install_directory]/conf/sonar-runner.propertiesFor Maven it's set in yoursettings.xmlfile
I set all properties. but when i run the sonar it shows error. While it is working with another system which have same configuration.The Error is belowerror during sonar runner executionfail to request server versionCaused by: Status returned by url:'http"//localhost:9000/api/server/version' is invalid :500
Error during sonar runner execution
Since negative lookaheads are unsupported, I broke mine out into several expressions that cover all cases. WAF lets you specify multiple expressions. It uses logical OR matching, so only one of them has to match. Using the example in the question, the solution could be...joe[^aj] joea[^n] joean[^n] joej[^e] joeje[^n]jo...
I am building a regexp for AWS WAF using a negative lookahead.joe(?!(ann|jen))However, I've got back the following error from WAF consoleWAFInvalidParameterException: Error reason: The parameter contains formatting that is not valid., field: REGEX_PATTERN_SET, parameter: joe(?!(ann|jen))It seems like the AWS WAF does n...
AWS WAF Regexp issue with lookahead
You can use SSM in environment variables likeenvironment: VariableName: ${ssm:/serverless-VariableName}and reference in your code from environment. We are using this approach.This will store SSM when you deploy your app, and reuse it without calling SSM Store for every request
I have a lot of dotnet lambda microservices using SSM parameter store for configuration purposes. It's been quite adventageous over environment variables as I'm sharing a lot of configuration across different microservices. Though recently I've started pushing the limits of it. It now affects my throughput and started ...
Caching solution for AWS SSM parameter store to be used with dotnet lambdas
I fixed this issue by switching from a custom "DHCP option set" to the default "DHCP option set" provided by AWS. I created the custom "DHCP option set" months ago and assigned it to the VPC where the EKS cluster is running...How did I get to the bottom of this?After running "kubectl get events -n kube-system", I reali...
I've got a two node Kubernetes EKS cluster which is running "v1.12.6-eks-d69f1"Amazon VPC CNI Plugin for Kubernetes version: amazon-k8s-cni:v1.4.1 CoreDNS version: v1.1.3 KubeProxy: v1.12.6There are two CoreDNS pods running on the cluster.The problem I have is that my pods are resolving internal DNS names intermittentl...
Kubernetes CoreDNS resolving names intermittently
Your compute environment will terminate if it is idle near the end of an AWS Billing Hour.Inside theCompute Environment Parameters documentationfor AWS Batch, there is a definition ofState. A compute environment is in theEnabledstate and can accept jobs from the queue. Once the compute environment is inDisabledand id...
I am running a simple java HelloWorld program using docker container in AWS Batch. I have created a managed Compute Environment with following valuesMinimum vCPUs 0Desired vCPUs 0Maximum vCPUs 256Instance types optimalOn submitting the Job, the job is executed successfully i.e. the job is submitted to the queue, the sc...
Terminate EC2 instance after AWS Batch is succeeded
Is it currently only possible to expire an entire key/value pair? As far as I know, and also according to key commands and document about expiration, currently you can set expiration only to specific key and not to it's underlying data structure. However there is a discussion on google groups about this functionalit...
Is it currently only possible to expire an entire key/value pair? What if I want to add values to a List type structure and have them get auto removed 1 hour after insertion. Is that currently possible, or would it require running a cron job to do the purging manually?
Redis: possible to expire an element in an array or sorted set?
I understand the question such that you actually want to redirect all content from one to another domain. That could be done like that:RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ RewriteRule ^ https://domainB.com%{REQUEST_URI} [QSA,R=301,END]It makes sense to start out with aR=302temporary redirect...
I have 2 domains, and need to redirect all subfolders from domain A to the same subfolder in domain B.Domain A = WordpressDomain B = Prestashop 1.7Example of what I need to accomplish:https://domainA.com/subfolder1-> 301 ->https://domainB.com/subfolder1There's a lot of subfolders in domain A, so I need my rule to be ge...
Redirect all subfolders from domain A to same subfolder in domain B
27 Maybe you don't have AppArmor installed. Try to do this: apt install apparmor -y Then restart the container. Share Improve this answer Follow edited Feb 29 at 15:02 Alexia 14.7k88 gold badges4343 ...
I install docker-ce 19.03.3, on ubuntu 19.04 following the installation procedure described on the official website. The installation worked well. But when I wanted to test by creating a container, I have this error: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be lo...
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded
Rc<T> implements impl<T> From<Box<T, Global>> so you can just use into: let trait_rc: Rc<dyn Trait> = trait_box.into(); Permalink to the playground
I have a function which receives a Box<dyn Trait> and needs to convert that into an Rc<dyn Trait> to share read-only ownership within the thread. With a Box<T> of some T: Sized, we can do Rc::new(*my_box), but unfortunately that doesn't work for unsized trait objects. Here's an oversimplified example which hopefully c...
How do you convert a Box<dyn Trait> to a Rc<dyn Trait>?
3 On top of the official Apple resources listed in the post arul linked to, here are some other good reads on the topic: Hold me, use me, free me CocoaDev.com 's Memory Management Section And for help debugging memory management problems: NSZombieEnabled Share I...
This question already has answers here: Closed 12 years ago. Possible Duplicate: Where are the best explanations of memory management for iPhone? I come from a web development background. I'm good at XHTML, CSS, JavaScript, PHP and MySQL, be...
Learn Obj-C Memory Management [duplicate]
From@Waylan's comment: GitHub documents their Markup processinghere. Note that step two — after the Markdown is converted to HTML in step one — sanitizes the HTML by:(...) aggressively removing things that could harm you and your kin—such as script tags, inline-styles, andclassoridattributes.That means Github intention...
Whenever I try it, even when using HTML and CSS withlist-style-type: none, I just can't seem to get rid of the bullet points.The farthest I managed to get was adding a<style>element, which does work but Github doesn't parse the HTML completely and the<style>element also appears as pure text, which is not the behavior I...
Creating a Table of Contents (TOC) on Github: Is there a way I can get rid of the bullet points so I can have a cleaner TOC?
You will want to add the original repo as a second remote. To do this, just run git remote add <local name> <url> so for example git remote add github https://github.com/myrepo After you have done this, you can update your repository by pulling changes from the second remote. git pull github You can read more about...
I am cloning a github repository 'A' to my local github account 'B'. Then I make a local copy of 'B' on my computer with git clone. Then I might make a change, create a pull request etc. After some time, the original repo 'A' advances, changes are being made to the repo 'A'. It is now different of my repo 'B'. Is t...
How to update a local git repository to the current state of the original github repo?
If GitHub is still using github/gollum, then, as explained in "How can you use subdirectories in a GitHub wiki checkout?", subfolders are not supported (or were buggy at the time of the fork). More recent versions of gollum/gollum supports that organization, even though recent PR (Pull Requests) are still fixing issue...
I have cloned one of my GitHub project's wiki locally, and I want to restructure the file system. By default different pages added to the wiki are all created in the parent directory: /wiki home.md wiki_page_1.md ... I want have a directory structure similar to this: /wiki /setup setup_procedures...
How to structure GitHub wiki files?
From the site: Source Limit: 50000 Bytes This limit applies to the size of your source code, not to the amount of memory the program allocates. The two are completely unrelated.
I am solving this problem. It desires a memory limit of 50000bytes . So if I allocate a 2D array of int of size 1000 X 1000 , shouldn't it exceed the memory bounds ? PS : I saw this solution to the problem and the programmer has allocated a 2D array of size m X m . And if m is equal to 1000, then I think the memory b...
Java : How is memory usage of a program calculated by a java compiler?
Generally, when you want to provide answers to interactive commands you'll do it with something like this: myCommand <<EOF some answer some other answer EOF But I'm afraid you can't use this kind of redirection / piping to provide passwords to your commands. As @Fidel pointed it out, you should check the expect...
I would like to enter the name and password for git and the password for github from a python/shell script But : echo mypasswd | hg push As : echo myname mypasswd | git push origin master Does not work
enter password/name for git and hg in python / shell
you should do the following: synchronize your copy of the remote repository git fetch Updates origin/develop change to your local develop branch git checkout develop take over the remote develop to your own git reset origin/develop --hard delete the feature branch git branch -d feature/login You should not dele...
This is what my senior mailed me. Due to the merge issue on remote ‘develop’ branch. After new release, I deleted the old ‘develop’ branch from remote and create a new one from ‘master’ branch. If you have a local develop branch, please delete local branch and it’s remote tracking branch, BUT NOT REMOTE BRANCH. Pleas...
Need GIT commands since I don't want to risk doing it
'USING CRON 20 01 * * * Asia/Kolkata'is the format you're looking for. This is how it's written according tothis page
The documentation saysUSING CRON <expr> <time_zone>but when I try to do something like'USING CRON 20 01 * * * IST'I'm getting an error that saysInvalid schedule was specified. "IST" is not a recognized time zone. Please specify time zones accepted by the TIMEZONE parameter.
Create Task in Snowflake in IST timezone
Seems like there is no overload ofAreEqualmethod for type ofint, so the parameters are being parsed toString. That's why is requires cultural parameter. Why not using that:Assert.IsTrue(((int)HttpStatusCode.OK) == statusCode);ShareFollowansweredJan 15, 2019 at 19:33AndronicusAndronicus25.7k1717 gold badges5151 silver b...
I'm having this warning S4056: Use the overload that takes a 'CultureInfo' or 'IFormatProvider' parameter when I do the assert in this line of code:Assert.AreEqual((int)HttpStatusCode.OK, statusCode);both parameters are integers and I can't overload this method to accept the FormarProvider that is required to solve thi...
Why Sonarqube is shhowing this Warning S4056: "Use the overload that takes a 'CultureInfo' or 'IFormatProvider' parameter"
To my knowledge, it is not possible to have aniptablescommand with (effectively) an OR match in it. I expect that the only way to get your desired outcome is to do two separate statements.Best of luck!
Since I a have iptables running on my router, it seems the only chain that works is the FORWARD chain to block traffic between the LAN and the internet.In these FORWARD chain rules, like...iptables -I FORWARD 1 -d 198.41.16.0/17 -j REJECT...but since the router doesn't understand the direction of traffic, I essentially...
How are do I specify both source and destination flags in the iptables FORWARD chain?
If you simply don't want the unreleased changes visible until they're released, and don't mind the intermediate commits becoming visible once they are released, then this is fairly simple. You can just treat your private branch as ... well, an ordinary branch. Just make sure the private branch name doesn't exist on gi...
there are similar questions here in stackoverflow, but none is exactly what I'm going to ask, at least none I could find. I'm starting an OSS project, and I want to share it publicly on github. But I also want to have a private remote repo in a server of mine. The public repo is for the public version of the project, ...
private and public git repos for an OSS project of mine
Putting this in case we can help others:To stop containers using specific image:docker ps -q --filter ancestor="imagename" | xargs -r docker stopTo remove exited containers:docker rm -v $(docker ps -a -q -f status=exited)To remove unused images:docker rmi $(docker images -f "dangling=true" -q)If you are using a Docker ...
Thisquestionexplains how to stop Docker containers started from an image.But if there are no running containers I get the errordocker stop requires a minimum of one argument. Which means I can't run this command in a long .sh script without it breaking.How do I change these commands to work even if no results are found...
Stopping docker containers by image name, and don't error if no containers are running
GitHub would not know how to contact "localhost" or 127.0.0.1: what GitHub would consider "localhost" would be one of their local machines / containers. You need to specify an external IP address GitHub can contact over the internet. Not just "localhost". That means your PC must expose to the internet the port 8080. T...
I am trying to configure the web hook on GitHub so that it can send the POST to http://127.0.0.1:8080/github-webhook/ My Jenkins is running on http://127.0.0.1:8080 And here is my GitHub web hook configuration: And I get the following error: My Jenkins is running for sure on http://127.0.0.1:8080/. So, that is not a...
Jenkins+Github: We couldn’t deliver this payload: Couldn't connect to server
Steps to check proper vhost configuration: Check if there is a "vhostname.conf" file in your "sites-available" directory. Then check if there is a valid symlink to that file in "sites-enabled" directory. You can create a missing site symlink bya2ensite vhostname. Open this file in an editor. It should contain something...
The issueI have installed a Wordpress. I have turned on Pretty Permalinks (Post name). Any page other than the homepage is a404 Not Found. This seems to indicate a rewrite issue.My set upUbunutu 14.04 Using localhost as my URL My apache config is/etc/apache2/sites-available/000-default.confMy wordpress is located at/va...
URL rewrite not working, a2enmod active, using Override All, .htaccess correct
It would be possible buton-premonly and not by usingcloud.So in short: it is impossible to use nodes from different regions in a single AWS cluster.However it is still possible to run clusters inmultiple zones:Kubernetes 1.2 adds support for running a single cluster in multiple failure zones (GCE calls them simply “z...
Is there any possible to create master node in one region and worker node in another region in AWS ? If yes can someone Please tell how or if no can anyone give reason for that
In kubernetes whether it is possible to create cross region cluster in aws?
${{ .. }} does string interpolation before the shell gets to see anything, so any special character in there can mess up your shell script. It's also a vector for shell injection. To fix both, set the value in the environment first, and then reference it: - name: Get waiting pull_request_id id: get_pr_id env...
I am querying the github api and then using jq to parse some values from the result - uses: octokit/[email protected] id: get_in_progress_workflow_run with: route: GET /repos/myorg/myrepo/actions/runs?page=1&per_page=20 env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - name: Get waiting pull...
Github Actions - How to handle a ) in json when passing it across steps
If the query params are important for your redirect: map $request_uri $redirect_uri { ~^/notizie(?<suffix>.*)$ /news$suffix; default $request_uri; } otherwise: map $uri $redirect_uri { ~^/notizie(?<suffix>.*)$ /news$suffix; default $uri; }
I'm using map directive for some redirect. I've to set some wildcard but it doesn't work: /notizie~* /news; I want that all urls like "/notizie/$string" should be redirect on "/news". What's wrong?
Wildcard for map redirect on Nginx
As of now, it looks like there is no other option other than pushing this data via additional function to your destination.
I have multiple Azure Cognitive Search services, distributed among different subscriptions. I would like to monitor the usage of each service, what should include:storage: current/quotano. indexes: current/quotano. indexers: current/quotano. data sources: current/quotaas I can access them through Overview/Usage pane in...
Azure Cognitive Search usage monitoring
I've just found that copying to object to itself actuallydoeschange the headers properly. I was copying it to a second file for testing purposes to avoid overwriting the original.But for some strange reason copying to a different file doesn't change the headers, but copying to the same file does.
I am using the PHP version of Amazon's AWS SDK. I have a bunch of files with anExpiresheader; I want to delete that header and add aCache-controlheader instead. Theupdate_objectfunction lets me add headers but not remove them.Theanswers on this questionsuggest you can update a file's metadata when you copy it, but I ha...
How to update metadata using Amazon S3 SDK
workaround is - rm -rf /var/lib/docker & restart docker(sometimes host reboot needed)https://github.com/docker/docker/issues/23089
Here's the situationAfter a reboot, docker was unable to restart due to a lack of space on the disk. Due to a lot of bad decisions, we're now left only with a copy of/var/lib/docker(so we're not able to run thedockerthat we would like to move to an other machine running the same OS/version of docker (1.8.3)when we try ...
How to move docker containers using device mapper to another machine without using docker commands
I was running into same issue as you after following the Jekyll guide.Christian from your comments supplieda very detailed solutionand explanation as to what's caused it.After updating to macOS 12.6 or 13.0, you might still be able to install 2.7.x and 3.x versions of Ruby with rbenv or asdf. With ruby-install, you’ll ...
I'm building a GitHub Pages site and trying to install Ruby for my Mac as describedhere. When I runruby-install ruby, I get the following:linking shared-object -test-/arith_seq/extract.bundle Undefined symbols for architecture arm64: "_rb_arithmetic_sequence_extract", referenced from: _arith_seq_s_extract in ex...
Installing ruby but getting error "linker command failed with exit code 1"
If you want to run your command quarterly (First day of Jan, April, July, October) you can use Laravel's pre-canned quarterly function:$schedule->command('YourCommandHere')->quarterly('02:00')->timezone('America/New_York');If you want to run this command every three months starting from time of implementation (ie every...
I am using laravel to schedule a job to run every 3 months at 2am, so I created:$schedule->command('clean:market-history')->cron( '0 0 0,2 ? 1/3 * *');But according to my research (by using:this reference) this indicates it will run every 3 monthsstartingin January at 2 am. I got most of it right, I do want it to run e...
How to do a every 3 months cron job in laravel?
remotes/origin/mybranch is a local copy of the remote branch. If you want to have the latest changes you need to fetch. A fetch will not modify your local branches, just the remote branches in your local repository, so it should not be necessary to undo the fetch. If you really need to undo the fetch, you can easily d...
Given the below branches, I tried to compare with git diff mybranch remotes/origin/mybranch but it shows an empty diff even though i know there are changes. The branches returned from git branch -a: master * mybranch remotes/origin/HEAD - > origin/master remotes/origin/master remotes/origin/mybranch What shou...
How do I compare a local git branch with a remote git branch with this setup?
Yes, you are absolutely right. When i teach others GitHub, i would like to explain the concept via an example. Lets take a scenario in which the teacher is conducting an MCQ in his class. He usually make copy of the question paper and distribute it (Forking) to his students so that they can work on it and mark the corr...
After few explorations, In my understanding, it is related to contribution.Fork means to make a copy of the repository (the one being forked) into my own github account. If I want to fork the official jQuery repository, then I would go tohttps://github.com/jquery/jqueryand hit the "Fork" button and GitHub will copy the...
What does it mean to fork on GitHub?
The User-Agent string can be different depending on the origin of the request - this could be from the Javascript layer or the native SDK layer. You should consider adding a rule to the firewall to allow both the User-Agent strings you have noted.ShareFollowansweredApr 11, 2018 at 12:14Vivin KVivin K2,68111 gold badge1...
Environment Details: 1. CLI version-7.0.0, 2. OKHTTP Version-2.0.0, 3. Cordova-plugin-mfp Version-8.0.2017100610, 4. Cordova-plugin-mfp-push Version-8.0.2017112208, 5. Cordova-Android - ~6.3.0, 6. Cordova-iOS - ^4.4.0Problem:Android and iPhone Application is built using above version. We have a firewa...
How to get actual User Agent in MFP 8 cordova application(Android/iOS)
The problem is, as always, that the CSS path is not set correctly. If you use a custom domain, then please run locally first. If it works on your local machine, it will 99% of the time also work on a custom domain. This is because your custom domain and your local machine both NOT require abaseurl. Thisbaseurlis a conc...
My Jekyll blog on Github fails to load CSS and other site files when using a custom domain. I can only see the text.The site works fine when I use the standard github.io domain (username.github.io/BLOG)Every time I setup the blog's page on Github Pages as blog.domain.com, the site fails to load correctly.Github repo:ht...
Github Pages jekyll not loading CSS when using custom domain
It is copying the buffer to the new buffer (if not the same). The problem is that you are overwriting the buffer. "pval = val;" set your writing point to the first byte of the buffer, reaplacing any content. Try changing to "pval = val + loaded;".
Consider this code: char buffer[] = "abcdefghijklmnopqrstuvwxyz", *val = malloc(10), *pbuf = buffer, *pval = val, *tmpbuf; int size = 10,loaded = 0; while(*pbuf) { if((loaded + 1) >= size) { size += 10; tmpbuf = realloc(val, size); if(tmpbuf != NULL) { val = tmpbuf; ...
realloc() are not returning a new block with a copy of old values
To troubleshoot, exec into the Kafka container and runkafka-console-consumer --bootstrap-server localhost:9092 --from-beginning --topic linuxhintThen outside the container, make sure to configure theKAFKA_CFG_ADVERTISED_LISTENERSappropriately (this property is only for bitnami containers) and expose the correct ports i...
I created a kafka setup using bitnami/kafka docker template. After recreating the containers multiple times (I wasn't able to connect to Kafka on 9092) I finally got my cluster up and running. I believe the problems were caused by the fact that Docker is intalled on Windows and not Linux.My current problem is that I'm ...
Kafka on Docker for Windows - cannot consume data
With CUDA 4.0 or later, cudaSetDevice(deviceId) followed by your thrust code should work. Just keep in mind that you will need to create and operate on separate vectors on each device (unless you have devices that support peer-to-peer memory access and PCI-express bandwidth is sufficient for your task).
How do I use Thrust with multiple GPUs? Is it simply a matter of using cudaSetDevice(deviceId) and then running the relevant Thrust code?
Multiple GPUs with Cuda Thrust?
Sounds right. The type of fb is B** so the type of *fb is B*. So when you say delete *fb you are calling the destructor for class B which is a recursive call that does not make progress toward a base case, hence the stack overflow.
The following code creates a double pointer B** to a B*. It'll use that pointer to allocate memory for another pointer which will point to a B instance created when start() is called: class A: class A { public: A() { fb = new B*; *fb = NULL; } ~A() { if(*fb) del...
Does calling delete from inside a destructor cause stack overflow?
I think you need to create a custom network of type bridge as mentioned in the official documentation. All the containers, attached to the custom network, are by default linked by name in a custom network. However, if you want to go with the option --network bridge, which is default, then you have to use the legacy --...
I know this question has been asked before and I've tried going through all the answers with no success. To start off, I am new to Docker so please forgive me if something obvious was missed. Whether in docker-compose or cmd line, I can't get mongo-express to connect to Mongo DB. Below I'm only asking about the cmd l...
Mongo-express from Docker not connecting to Mongo
On a high level, assuming your application is some sort of frontend UI and you want a user to be redirected to keycloak for login, you will have to do certain things. First, both keycloak and your application must be publicly accessible. This is normally done using an ingress resource. The ingress will map a domain to ...
I have two services running in a pod.The one is Keycloak and the other one is my application that will use keycloak for Authentication.So how i am going to redirect to keycloak, as the keycloak External IP will be generated on the fly?Once the container will spin up that only I can have the Keycloak url.How should I fe...
Integrating Keycloak with my application in K8S
Paul, Check out the following file:https://github.com/kubernetes/kubernetes/blob/master/cluster/aws/config-default.shThe second time, the defaults would need to be updated.If your goal is to simply upgrade the Kubernetes components, have you triedhttps://github.com/kubernetes/kubernetes/blob/master/cluster/kube-push.sh...
I am running a 1.0.3 kubernetes cluster in AWS and used curl -sShttps://get.k8s.io| bash to install it.I would like to have another cluster to allow me to upgrade to a newer kubernetes version as describedhere.When I try to install another cluster it gives an error.A client error (InvalidIPAddress.InUse) occurred when ...
How to create multiple kubernetes cluster with curl -sS https://get.k8s.io | bash
1 Run nginx and the next.js on different containers. Share Improve this answer Follow answered Feb 28, 2019 at 5:17 inductorinductor 9433 bronze badges 1 but in that case ...
I have a multistage docker build for my nextjs frontend app. It looks like this: # Do the npm install or yarn install in the full image FROM mhart/alpine-node AS builder WORKDIR /app COPY ./package.json ./ RUN npm install COPY . . RUN npm run build RUN npm run export FROM nginx EXPOSE 3000 COPY ./nginx/default.conf /...
nextjs multistage docker build behind nginx proxy
Try:RewriteRule ^directory/ - [L,R=404]This redirects all requests for the folder "/directory/", they get a 404 response.ShareFollowansweredSep 11, 2013 at 0:10Jon LinJon Lin143k2929 gold badges221221 silver badges220220 bronze badges6along with this 404 status, can we show the content of a 404.html page?–Tausif AnwarF...
I'd like to cut off access to a subdirectory on my site but I want any access in the subdirectory to be a 404 error, not a 403 forbidden. How can this be accomplished?
Send a 404 error via htaccess?
-1If this is forcreatinga PR, you would need a-X POSTsomewhere in your curl command, in order toPOSTthe query for a new PR:curl \ -X POST \ -H "Accept: application/vnd.github.v3+json" \ https://api.github.com/repos/octocat/hello-world/pulls \ -d '{"head":"head","base":"base"}'Make sure also to use the rightoaut...
I'm trying to automate github pull requests via bash script, specifically raising pull requests for forked branches. I've successfully done it for private repos, however it doesn't seem to work for public repos (see code below):curl -H "Authorization: bearer <accesstoken>" -d '{"title":"SOMETITLE","base":"master","head...
curl pull request error - fork_collab Fork collab can't be granted by someone without permission
The problem is thatconsole.log()does not go directly to stdout/stderr. You can see that using this Lambda:const process = require('process'); exports.handler = async (event) => { console.log("message 1"); process.stdout.write("message 2\n"); };If you invoke that, you will see output like this:START RequestId: ...
I have some node.js based Lambdas that are logging data.In order to properly query and filter the data etc, I want to log as pure JSON data from my Lambdas.However, when I do a regularconsole.logit makes an ordinary string of the data.console.log({a:1,b:2,x:"xxx"})Results in this:2020-04-29T14:46:45.722Z 3f64c499-fb...
How to log raw JSON to Cloudwatch from AWS Lambda in node.js?
1 Here's an example where you would need the weakref so the child doesn't block the parent from cleaning up: import weakref class Spam(object): def __init__(self, name): self.name = name def __del__(self): print '%r got deleted' % self def __r...
I have a class that represents a database connection, that has a close method. To make it more comfortable to use, the class itself is a context manager that closes the connection when finished working with it. The problem is that I got no guarantee that the user of this class will always remember to either use the co...
Python use destructor in a memory safe way
<div class="s-prose js-post-body" itemprop="text"> <p>If NGINX is offloading SSL/TLS and then calling the .NET Core app, check as most probably is doing it through open HTTP (port 80).</p> <p>You either need to ensure HTTPS all-the-way, or signal an HTTPS scheme to get triggered if HTTP endpoint was called.</p> <p>As t...
<div class="s-prose js-post-body" itemprop="text"> <p>Almost have this working. Almost.</p> <p>My set up is that I have an Azure B2C Tenant set up, and some modified <a href="https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapp" rel="nofollow noreferrer">example code</a> that I've changed to reflect ...
Connecting to Azure B2C, with .NET Core from behind a NGINX Proxy
Use git reset --hard 3813803. This can not be undone and works locally as well as remote. For remote push using git push --force origin master Have a look at the git docu by Atlassian here. Let me also quote from there: Whereas reverting is designed to safely undo a public commit, git reset is designed to undo loca...
I accidentally pushed up files from my .idea directory in my Django project which I had in my .gitignore file. I am trying to completely delete the commit from my bitbucket repository since there is someone else Im working with on the project and he can't pull my changes without affecting his own .idea files. I have s...
How to delete commits from git on Github and Bitbucket
You probably wantsum(increase(nginx_request_status_count[1d]))which is roughly the total number of requests in the past day,
This might be a stupid question, but I couldn't find any way to find all HTTP requests to my nginx proxy for last 1 day.I triedsum_over_time(nginx_request_status_count{status_code='200'}[1d])but where will I feed the time range? In this case,yesterday to todayBut, as you can see above, I get only 200's summation. Even ...
How to get total nginx requests of yesterday from prometheus?
Just use a Wordpress Plugin, it will save you time.I use personally this one:https://wordpress.org/plugins/wp-force-ssl/
I want to go from HTTP to HTTPS on my wordpress site. So far, I have done the following:Changed the siteurl and home addresses tohttps://www.example.comIn wp-config.php file addeddefine('FORCE_SSL_ADMIN', true); define('FORCE_SSL_LOGIN', true); // I read this was deprecated, but I was desperate /* That's all, stop edit...
Use SSL in wordpress site
Whatever you do, there are probably better alternatives than starting a thousand of processes in a minute whether you run out of memory or not. To run subprocesses sequentially, use subprocess.check_call instead of subprocess.Popen. will this be opening new terminals to run each command? No, unless the command itsel...
I need to be able to call a bash command every few milliseconds and I am trying to use the sub-process to do so. I currently use: p = subprocess.Popen(command, universal_newlines=True, cwd=CurrentWorkingDirectory ,shell=True, stdout=subprocess.PIPE) and have a timer firing the command at the times needed. My questio...
Calling multiple sub-processes sequentially
11 self.scheduler = BlockingScheduler( logger=log, job_defaults={'misfire_grace_time': 15*60}, ) adding the misfire_grace_time as job_defaults will work Share Improve this answer Follow edited Jun ...
I am running a BlockingScheduler process that it's suppose to run several cron jobs, but it fails to run every single time with the message: Run time of job "validation (trigger: cron[hour='3'], next run at: 2016-12-30 03:00:00 CST)" was missed by 0:00:02.549821 I have the following setup: sched = BlockingScheduler(mi...
APScheduler missing jobs after adding misfire_grace_time
Got it! Docker does not even touch this parameter. memory.swappines for cgroups really changing according /proc/vm/swappiness. All children inherits this value from parent. Docker does not even touch this parameter. Moreover, in some cases (and exactly in my own) there is no ability to write something in memory.swappi...
I am using docker to containerize bunch of services. Some times, containerized services heavily swaps. I've changed vm.swappiness to 1 via sysctl on my host system. But docker's memory cgroup still have old (default) value of 60. Therefore, all particular containers' cgroups have same value, as parent. sysctl vm.swapp...
Change swappiness for docker container
15 Your session cookie issued by ASP.NET core is encrypted using the Data Protection API. The key used to sign the cookie is stored in a Key ring. If you now redeploy your application and if you haven't configured it correctly, then a new encryption key will be issued in a ...
I am getting weird error on identity server 4 after I added NGNIX Proxy infront of my application. My .net core identity server is running on Docker Container on port 8080 Ngnix proxy(using https://github.com/nginx-proxy/nginx-proxy) is configured to route 443 to docker container 8080 After successfully authentica...
The key was not found in the key ring. Unable to validate token
Hello You can check the pods ressources usage by executing this command:kubectl top poalso you can specify the container usage inside your pods if you have more than one container inside your pods:kubectl top po --containersalso if you have a kubecrnetes dashboard it will be more easy .ShareFollowansweredMar 27, 2022 ...
This question already has answers here:Checking Kubernetes pod CPU and memory utilization(19 answers)Closed1 year ago.I defined a StatefulSet that has a container inside that it launches. CPU limits and requests are listed, however I never specified the same for memory. I have pods running now but I don't know how much...
Default Kubernetes Pod Memory Usage? [duplicate]
Docker Compose actually add the hostnames of all yourlinkedcontainers to each other.On you machine, the postgres database is actually running in localhost, that why you have thelocalhosthostname.In Compose, it's running in the postgres container, with the hostnamepostgres, that's why you have thepostgreshostname.If you...
I am developing a django app and trying to run it inside docker. I have an issue that I could not understand so far. while running the app withdocker-compose, it seems that thewebapp cannot connect to the database when i use these configurations:DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgr...
difference between localhost and postgres for host in docker
sumwill ignorehostnameand sum over everything. To sum overhostname, you needsum by (hostname) (up) == 0NB: hostname is not a standardlabelonup, it's a custom label in the configuration of the original poster
I have a problem understanding and/or implementing the alert logic in Prometheus. I have two alert rules:alert: JobDown expr: up == 0 for: 5m labels: severity: warning annotations: summary: Scrape job {{ $labels.job }} down on {{ $labels.hostname }}. alert: HostDown expr: sum(up) == 0 for: 5m labels: severity: c...
Host down alert in Prometheus when all scrape jobs are down
0 What I would do : sess.run([var for var in tf.trainable_variables]) to get trained parameters and save them as numpy array. rebuild a numpy only version of gpt2. But : This will take a substantial amount of work to rebuild the model You need to install tensorflow...
GPT2 is an excellent OpenAI project for NLP. The developer requirement stated we need to use tensor Flow and GPU. I only want to use (not to train) the existing trained parameters. Is there any way to use GPT2 without the expensive hardware with GPU and without the need to install of Tensor Flow?
Is there anyway to run GPT2 without GPU and TensorFlow
The error indicates that yourSCRIPT_FILENAMEis incorrect. Your comment:in the wordpress container it's at /var/www/html/index.php in the nginx container it's at /appsuggests thatnginxandphp-fpmare seeing a different document root.In which case, use:fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
I've looked through every question like this here and tried to apply the stated fixes with no success.I'm using thewordpress:4.7.3-php7.0-fpm-alpinedocker image with a separate nginx container in front of it.When I curl wordpress I get:File not found.When I check the wordpress container logs, I get:127.0.0.1 - 16/Mar/...
File not found nginx php-fpm
+50Traefik is a north-south reverse proxy. Most people historically in traditional infrastructure would use NGINX or Apache to address inbound - good to see you using a more modern tool. What you are describing is an east-west pattern of communication inside your firewall behind traefik (assuming you control all ingr...
I'm using docker in swarm mode for the services in my application and traefik to handle, well, the traffic. My goal is to make a separate service for each API section my application has (so for example requests ondomain.com/api/foo_apigo to thefoo_apiservice and requests ondomain.com/api/bar_apigo to thebar_apiservice....
Using traefik for docker internal traffic via websockets
A good example I like to use, is my getting started with selenium project. This is a Maven enabled Java Project that is hosted on github. But when checked it out, with EGit, to my computer all the folders are now packages. This is because of your .classpath. If a source folder is added, (like src/main/java) any subs...
I am working on a Java Project with Eclipse which we want to put on GitHub so that it is accessible for the public. But we are not entirly certain what is the correct way to put a Java Project onto GitHub. We have already made a GitHub and uploaded a Java Project. But when checked it out, with EGit, to my computer all...
What is the correct way to have a Java Project with Eclipse on GitHub
Robocopy is your friend; google it and have a look. It's a very powerful program by sysinternals (owned by Microsoft). Alternatively, if you want a nice GUI to go with it use SyncToy (https://www.microsoft.com/en-gb/download/details.aspx?id=15155) which can be run with a batch file (including arguments) or made into a...
I'm a graphic designer and I use my external hd frequently to move psd/jpeg/png/tiff files from my laptop at home to my Work PC and vice versa. But as a precaution before modifying or adding a file I copy it to a folder. It's possible to make it automatically? And it's easy to make on Batch? Thanks for help!
It's possible to make a Batch program that backup a folder files from my external hd to pc hdd, anytime I add or change a file?
You should consider using this... <link rel="stylesheet" href="./assets/index.76858414.css"> Instead of this... <link rel="stylesheet" href="/assets/index.76858414.css"> You can read more about HTML file paths here.
When I ran it on my system in my local server it was working fine but when I deployed it on GitHub pages Deployment, GitHub doesn't seem to load my CSS and the CSS was not applied on my file. repository link: https://github.com/pawangupta5050/Facebook-Login-Clone live-website link on GitHub pages :https://pawangupta50...
I have deployed my Tailwind CSS project on GitHub and it suddenly stopped working on pages deployment
In my gunicorn settings, settingworkers=2solved this issue.When I was sending a request to the external URL, the external application would send a request back. This new request would occupy the one and only worker in the application. The original request that I sent out is workerless, and so it get's stuck. With 2 wor...
I am sending a post request from a method inside a web application running on django+nginx+gunicorn. I have no issues receiving 200 response from the same code when executed on django's own server (using runserver).try: response = requests.post(post_url, data=some_data) if response.status_code == OK and respons...
Making a POST request to an external URL from a django + gunicorn + nginx setup
I'm not a pro in mod_rewrite myself, but I think there is something wrong with that tool. for example, if you changex.php?x=$2tox.php?$1=$2,$2will be parsed correctly. And then, CMIIW but the regex looks fine. Test the regexhereorhere. And Have you ever actually tried the RewriteRule yourself?
I'm using this tester for url mod_rewrite test:http://martinmelin.se/rewrite-rule-tester/When I write something like this:RewriteRule ^x/([a-z]+)/([0-9]+)/$ x.php?x=$2Even though I have entered url :x/p/6/It get renamed tox.php?x=pand. What I want isx.php?x=6I'm new with mod rewrite, so anything would be useful.
Url rewriting mod_rewrite
Thats not really how the image you used works. On the Docker Hub page you can see how it is supposed to be run. It has a startup script which is not called when you pass the "sh" command on run, so mysql is not running. When you run the image without any commands it starts mysql and sets some initial values for userna...
Hi there is a public alpine mysql image for docker.https://hub.docker.com/r/wangxian/alpine-mysql/I wanted to run mysql in it.I am getting this error when I execute themysqlcommand afterdocker runcommand:docker run -i -t wangxian/alpine-mysql sh /app # mysql ERROR 2002 (HY000): Can't connect to local MySQL server throu...
Docker alpine image : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
You may create aPIPELINED TABLEfunction.let's say this is your table.create table vw_people ( ID INTEGER, NAME VARCHAR2(10)); INSERT INTO vw_people(id,name) VALUES ( 1,'Knayak'); commit;create an object and a collection of the object typeCREATE OR REPLACE TYPE vw_people_typ AS OBJECT( ID INTEGER,NAME VARCHAR2(10)); CR...
I have a SAR protected oracle database from which I need to expose a table to PowerBI.I am not familiar with PLSQL.I have managed to expose a column of the table to PowerBI.Help is needed in 2 areas1) I require help from you guys to return selective columns from the table2) I require help from you guys to return all th...
How do I return multiple columns using plsql
I would suggest to create tags after you have merge to "develop" branch. There is no harm if you wish to release code from "master" branch using tags as well. Honestly speaking there aren't any hard lines drawn on how you wish to release your code from Git hosted repos?You may like to follow this sequencerebase the fea...
Our current stash repository has a Master and Develop branch. Anytime if a developer is working on a story a developer creates a branch and once the coding is done a pull request is raised to merge to develop.So far it has been good but when two developers are working on different feature branches on a same Repository...
Git workflow for multiple feature branch
This is how I managed to achieve something similar without plugins (Grafana v9.4.3):Set your query to system statuses whichever is equal to 1 at current time (you can add any number of services in the query):node_systemd_unit_state{name=~"nginx.service|fail2ban.service|meilisearch.service|node_exporter.service|promtail...
I have node_exporter running and want to create a grafana dashboard but I'm not sure what concepts to search the documentation for. I want to display a list of hosts with a list of systemd units whose status is represented by the labels "active", "inactive", or "failed", with the colors green, grey, and red.What are th...
How to describe a grafana dashboard displaying systemd units
When you run containers on ECS Fargate, it will post allstdoutlogs to Cloudwatch Logs. You can find the documentation on how to define that in your task definitionhere.In addition to defining theawslogsdriver as explained above, you will also need to make sure you have permissions to put logs in Cloudwatch Logs bygivin...
I have a container withStopped | Exit code: 0. How can I debug this? I can't see any logs in CloudWatch (probably because it didn't get to generate any, I did add logConfiguration in the task definition). Is there a way to access docker logs in ECS Fargate?
AWS how can I check docker logs in ECS Fargate
1 The best practice would be to rename or move you files elsewhere, as git is trying to put a file at the exact same location. Depending on how you manage your remote repo, you may also remove the files under binaries/* from the remote. Share Improve this answer ...
I am coming across an issue where I try to git pull to update the branches on my computer from the repo to my computer and I come across this issue. error: The following untracked working tree files would be overwritten by merge: binaries/* I created a .gitignore file to ignore this folder and it's contents when pu...
Following untracked working tree files?
Whether or not something that overlaps a page boundary is actually contiguous in Physical Memory is never really knowable with modern memory handlers. Memory glue logic essentially treats all addressable memory pages as an unordered set, and the ordering is essentially associated with a process; there's no guarantee ...
I was reading up on Virtual Memory and from what I understand is that each process has its own VM table that maps VM addresses to Physical Addresses in real memory. So if a process allocated objects continuously they can potentially be stored in completely different places in Physical Memory. My question is that if I ...
Contiguous blocks of memory and VM
The way I solved it was the following... Maybe it was a ltitle more complicated because I use GitHub for Mac... I reset the the last commit hash that I wanted: git reset --hard <identified-commit-hash> I then created a sub-branch from the sub-branch I was having issues with. This is what stopped any history coming ba...
I was merging the master branch into a sub branch so that I could get the latest updated code into that sub branch. After merging I realized I missed something so I wanted to undo the merge. I am using GitHub for Mac and didn't have internet at the time to look up how to undo the merge correctly. So I stupidly commi...
Issue with Git commits and reverting back
Use MAT to diagnose memory leaks and other out-of-memory causes:Android Developers Blog postGoogle I|O conference video
As my app is using a lof of pictures, I get the famous issue of OutOfMemoryError on older devices.Explanations:http://androidactivity.wordpress.com/2011/09/24/solution-for-outofmemoryerror-bitmap-size-exceeds-vm-budget/According to Android Developers your device has at least 16MB of heap space (T-Mobile G1) for stori...
Is there a way to track the memory used by my app to prevent the famous OutOfMemoryError?
After hours of digging and reconfiguring, I finally get it to work, thanks to Xenwar from kubernetes group for pointing out the externalIP property, it turns out that i need to point my app to an external ip, in this case the database, here is the service object:apiVersion: v1 kind: Service metadata: name: db-con spe...
I am trying to connect my spring-boot api inside a kubernetes pod to an external database (a separate machine but within the local network), however when running, I get SQLNonTransientConnectionException, UknownHostException: mysql-svc, the api cannot connect to the database but whenever I ping the database address fro...
Cannot connecto to external database from inside kubernetes pod
I think you just need to start your Sass file with two lines of triple dashes (see docshttps://jekyllrb.com/docs/assets/) and link to the.cssfile in your markup, not.scss, which browsers don’t support.<link rel="stylesheet" type="text/scss" href="css/style.css">
I'm not sure why but my Github Pages website will not read my scss file even though it's in the repo. I don't think I need to include my code here but if you take a look at my repo you can see it there within the css folderhttps://github.com/jamesemcc/jamesemcc.github.ioand properly linked in the index.html head. Yet i...
Github Pages SCSS File not Being Read
Q1: Can I change which Linux kernel that Docker uses on macOS?Safe and simple answer: No. Unless you want to mess-up directly with the Hyperkit VM that docker desktop for Mac is deploying for you when installing. I don't use Mac, I have no clue it this is even possible and strongly suggest you don't walk that path unle...
Q1: Can I change which Linux kernel that Docker uses on macOS?Q2: When does Docker upgrade the Linux kernel version?Currently, as of:21 Sep 2020, up-to-date Docker Desktop v2.3.0.5 (48029), Engine 19.03.12it is using Linux kernel 4.19.76 (released 22 Oct 2018). I expected it to be on a more recent kernel(e.g., Linux 5....
Can I change the Linux kernel that Docker uses on macOS?
Tryfetching the changesfrom GitHub first.I assume you alreadyclonedyour repository locally, so you need topullthe changes using:git pull origin masterIf you are using themasterbranch.If you get the changes first, you shouldn't run into conflicts. If you didn't pull the changes first, you need to tell git which change a...
I'm a newbie to working with git. I made some changes to my code directly on Git. Then I copy pasted code from Git to my local file. Then made more changes to the local file and tried to merge with the file on git. I'm getting errors in my command line (when i go git commit) saying the files are not in sync and it does...
Merging Git files with local file
This is what I refer to as "anticipating a branch". Make a branch C off A. Now C has the content of A. Merge B into C. Now C has the content of A and B. git checkout -b C A git merge B Tag that merge commit as where C started. This will be useful later. git tag C-start Do some work on C. When A and B are merged into...
I am using git flow - make feature branch, and merge them into develop, ... you know. I made two features and made pull request to develop branch on GitHub. Call these as feature A and B. Now I want to start work on latest commits - using A and B both. However, my code is not merged in GitHub because my reviewer didn'...
How to handle future work over unmerged features in git flow?
These files are all located under/test/keys.The reason is that they are supposed to be used by multiple (all) languages, so they have been moved into a dedicated folder. Since it is essentially test data, it is/test/keys.
I want to secure the thrift server(just encrypt, and will use acl to do the simeple authentication), and found this:http://architects.dzone.com/articles/how-secure-and-apache-thrift, but the code is in Java, My thrift server is in Python. I have searched a lot on Google, but found little on this.I have run thego versio...
thrift ssl python server
You should not rebase using --root, which will rebase all commits in master and first-branch. If you rebase without --root, git will only rebase the commits that are in first-branch but not in master. Instead you should have done git checkout first-branch git rebase -i master git push origin first-branch --force
I created first-branch and added several commits to it. While on first-branch, I rebased it and pushed it. However, I can't create a pull request on GitHub to merge the first-branch to the master branch. I just get a message saying there is nothing to compare and they are different commit histories. git rebase -i --ro...
Can't do a pull request after rebase
TheCircleCI documentation on cachingalso mentionCircleCI restores caches in the order of keys listed in the restore_cache step. Each cache key is namespaced to the project, and retrieval is prefix-matched. The cache will be restored from the first matching keysteps: - restore_cache: keys:So make sure to configu...
Hello I just upgraded my website to Jekyll 4.0.0 and it's starting to take a long time to compile. Up to 10 minutes sometimes. But when I use the incremental build locally it's able to product the compiled version in a few seconds. So I tried to cache all the Jekyll related caches I could find. I'm using CircleCI this ...
Jekyll 4.0.0 doesn't build using cache in CI
Here is a code snippet from docker daemon's function for creating Containers: func (daemon *Daemon) newContainer(name string, config *runconfig.Config, imgID string) (*Container, error) { var ( id string err error ) id, name, err = daemon.generateIDAndName(name) if err != nil { ...
I wanted to know how the container id is generated so please provide the source code that provides the container id when the docker run is executed?
How the docker container id is generated
Vertical scaling or changing the node pool VM size is not supported. You need to create a new node pool and schedule your pods on the new nodes.https://github.com/Azure/AKS/issues/1556#issuecomment-615390245this UX issues is due to how the VMSS is managed by AKS. Since AKS is a managed service, we don't support operat...
I am unable to scale vertical my AKS cluster. Currently, I have 3 nodes in my cluster with 2 core and 8 ram, I am trying to upgrade it with 16 code and 64 RAM, how do I do it? I tried scaling the VM scale set, on Azure portal it shows it is scaled but when I do "kubectl get nodes -o wide" it still shows the old version...
Vertical scaling of azure kubernetes cluster
3 If you are currently just using pickle, might I recommend cPickle which is purported to be up to 1000 times faster. Share Improve this answer Follow answered May 18, 2013 at 19:13 TadghT...
Working on optimization of one web-site, I found, that finally pickling of QuerySets becomes bottleneck in caching, and no matter how clever your code could be, unpickling of relatively large QS in time of 1-2secs will kill all effort. Does anybody encountered this?
Django caching - Pickle is slow
You are trying to include some third party into your environment using git alone. The best alternative is probably toforkthe third-party module and add it to your super project.Forking is a practice, to the best of my knowledge, that is proprietary to GitHub. Basically, you get a copy of the original repository that is...
I have cloned a third-party git repo inside a repo managed by me. I haven't added it as a submodule and I have performed quite a few modifications in the code that probably won't be useful to anyone but myself so I dont want to pull request them.When I try to push my repo, I get a warning saying that I have a nested re...
Personal modifications to git submodule
First off, to run nginx in debug you need to run the nginx-debug binary, not the normal nginx, as described in the nginx docs. If you don't do that, it won't mater if you set the error_log to debug, as it won't work. If you want to find out WHY it is a 2 step process, I can't tell you why exactly the decision was made...
I'm reading the debugging section of NGINX and it says to turn on debugging, you have to compile or start nginx a certain way and then change a config option. I don't understand why this is a two step process and I'm inferring that it means, "you don't want to run nginx in debug mode for long, even if you're not logg...
Is it bad to always run nginx-debug?
Currently Cloud Run (fully managed) itself runs on a gVisor sandbox itself, so its support for low-level Linux APIs for creating further container environments using cgroups or Linux namespace APIs are probably not going to be possible.However, since gVisor is technically an user-space sandboxing technology (though I'm...
Let's say I would to let the user upload some python or bash script, execute it in the cloud run and get the result back. To do this I would create a Cloud Run service with a service account that has no permissions to access project resources. I would as well run the script within the nested container so the user canno...
Can you run a sandbox container within a Cloud Run container?
It looks to me like you are trying to call your class instead of an instance of the class.RequestHandler()will call the__init__method to initialize an instance of the class. Since you haven't defined the method it doesn't take any arguments. To access__call__you need to call aninstanceof your class.handler = RequestHan...
I have created a class based AWS lambda function in python calledrequestHandler.pyas belowfrom action_dispatcher import ActionDispatcher class RequestHandler(ActionDispatcher): @staticmethod def createTemplate(event, context): return "Hello world"Myaction_dispatcher.pyis as shown below.import json c...
Class based AWS lambda in Python
return-directives are executed before most other directives. To solve your problem you need to split this into two locations:location /auth { auth_basic_user_file /etc/nginx/.htpasswd; auth_basic "Secret"; try_files DUMMY @return200; } location @return200 { return 200 'hello'; }Thetry_files-directive is evalua...
i thought this would work but for some reason it skips the auth_basic and always returns 200. Same happens if i swap 200 for a 301 redirect.If i comment out the return statement it works ok. Ideally i want just an/authendpoint that once authenticated it will 301 redirect to another path.location /auth { auth_basic...
auth_basic within location block doesn't work when return is specified?
No you cannot. Fromhttp://sdn.sitecore.net/Articles/Media/Prevent%20Files%20from%20Uploading.aspx:The uiUpload pipeline is run not as part of the Sheer event, but as part of the form loading process in response to a post back. This is because the uploaded files are only available during the "real" post back, and not d...
I'm currently trying to show aSheerResponse.YesNoCancel()dialog within the Save uiUpload pipeline process from Sitecore. The problem appears when I do that call and it throws aNullException. I thought it was weird so I started copying the code from Sitecore's DLL and adding it to my solution. After that, I found that i...
Open a dialog from a Sitecore uiUpload Pipeline process
Upon further investigation, I don't think this is possible. The best option is probably toduplicate the repo.
I have a repo on GitHub that used to be a fork, but it's no longer as I've wiped any trace of the original project and started a new project under the same name.However, GitHub still indicates that the project is forked. Is there any way to remove the forked message you see on the project's page?
Remove forked repo message from a (previously forked) repo on GitHub?