Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You paused the change tracking for all those files with this commandgit update-index --assume-unchangedYou didn't tell why you did that in the first place. It's quite an unusual thing to do (not saying it does't have it's use cases!)To activate the change tracking again you have to use this command:git update-index --n... | Git version 1.8.1.2.I have made all files in my directory have theassume-unchangedbit set. My goal is to push a fresh commit with all files as new/modified.
When I rungit ls-files -vit returns the whole list of files I want to commit and push. They are listed like this:h .gitignore
h Gemfile
h Gemfile.lock
h README.rdo... | Git add to working directory assume-unchanged files |
I've put together a simplified case of detecting 2nd (or greater) visit. I expect you can modify to meet your specific use case.Set up:create table mytable (
id int,
visit_date date);
insert into mytable values
(1, '2022-01-01'),
(2, '2022-01-02'),
(3, '2022-01-03'),
(1, '2022-01-04'),
(1, '2022-01-09'),
(2,... | I have a table where we keep the log every time a user visit the page. We want to get count of users who have already visited the site more than 1 times.
Let say a user visited site on 1st and then on 3rd August. Now on 2nd Aug, the user will not be counted as he has only 1 visit till now. So total count of user who vi... | SQL Query to get userCount who have visited the site more than 2 times before the instant when it is checked |
It all depends on your app, usually you don't have to do anything special except following Apple's recommended practices.
ViewControllers which are not visible at the moment will get didReceiveMemoryWarning message. By default (calling [super didReceiveMemoryWarning]) controller's view is unloaded (released, freed). A... |
What should I do when my app recieves a memory warning?
| What to do when my app receives memory warning? |
0
It's an old question but maybe you still need an answer. In your AppsBackupAgent implementation remove onRestore() and onBackup() methods.
Inherited BackupAgentHelper implementations use dispatcher for delivering restore/backup events to registered helper. Your implemen... |
I have problem, else I wouldn't be here.
I am making backup service, but so far, it doesn't work at all. Dunno what problem it is, but when testing (via emulator or via phone, explained way), the data won't be restored. Maybe someone can help?
MyAppsBackupAgent
public class AppsBackupAgent extends BackupAgentHelper {
... | Google backup service doesn't work |
OK, so we have a CPU modifiable buffer. And for some reason, this buffer was created in exclusive mode. And you want to do the following:Write data to the buffer.Copy the data using queue family A.Write data to the buffer.Copy the data using queue family B.In order for step 4 to work, you arerequiredto do an ownership ... | Considering host-visible buffers (mostly related to streaming buffers, i.e. buffers backed byVK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BITmemory), let's imagine the following usage pattern:Write new data to the mapped address on the host (after the proper synchronization).Read the buffer wit... | Reusing the same host-visible buffer on different queue families |
for branch b in branches:
git checkout b
git checkout -b new_name
git push -u origin new_name
git branch -D b
git push -u origin :b
What happens is you checkout each given branch, create a new branch pointing to the same location in the commit-graph and push that branch. Afterwards you can delete the old one.
|
I have been migrating an SVN Repo to Git recently and after pushing my changes to my GitHub account, I noticed that all the branches I migrated had an extra /origin tag in it:
$ git branch -a
master *
/remotes/origin/master
/remotes/origin/origin/branch1
/remotes/origin/origin/branch2
I have around 15 branches(which ... | Renaming Remote Git Branches |
What are these add-ons? Are they a feature that's specifically related to minikubeYes, this is specific to Minikube.Kubernetes is manly a container orchestrator. It is typically installed in an environment with lots of servers, e.g. a Cloud Provider like AWS or GCP. Kubernetes does not work isolated, it has abstraction... | I've worked throughmy first Kubernetes tutorial.Near the end, this tutorial introduced the concept of "add-ons" -- for example, you can install themetrics-serveradd-on by running$ minikube addons enable metrics-serverWhat are these add-ons? Are they a feature that's specifically related to minikube, or can they be use... | What is a minikube Add-On? |
According to Azure this is not possible. There is arequest featuredated 30/10/2014 but still no answer alsothispost tells that the API does not support this functionality (at least as of today) and it is intentionally not permitted. Go Azure Go! | I'm trying to deploy my Github project to Microsoft Azure. The repository is hosted in an organization account, and the user has read/write access to the repository.But Azure says the user has no repositories.Any help would be appreciated. | Azure deploy repository from an organization |
Depth test is the part of OpenGL pipeline, which should be invoked after fragment (pixel) shader. So you have no need to do this by yourself, all you have to do is properly initialize your projection matrix and viewport so that yourWzfor each vertex was calculated and then interpolated across vertices. You can configur... | So I'm reading a paper on a particular shading algorithm and there is one section that seems a bit vague and I was wondering if I could get advice here.Basically it says I first have to take a 3D vertex of a mesh and transform it to window coordinates wx, wy, wz where wz is depth. This part I've done.Next I have to tes... | passing depth buffer |
File size
Let's try with a bigger post buffer as described here.
git config http.postBuffer 100000000
http.postBuffer
Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used ... |
I now cannot push my local commit to the github repo. I received an error message:
Counting objects: 76, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (75/75), done.
Writing objects: 100% (76/76), 5.23 MiB | 24.67 MiB/s, done.
Total 76 (delta 45), reused 0 (delta 0)
remote: fatal: early EOF
... | GitHub, push error: the remote end hung up unexpectedly |
I think you might need to modify the last instruction in the Oracle document, so that both the certificate and the key get stored in the same JKS file. The command names the destination askeystore.ks, replace that withtruststore.ks(where the cert was placed earlier), so that the private key also goes into the same file... | I have cert.pem, key.pem and ca.pem files to communicate Docker daemon over API call which is working fine. However I'm trying to covert key.pem file to .jks file which is'nt working.
I tried withhttps://www.sslshopper.com/ssl-converter.htmlAlso tried few commands found online like one given herehttps://docs.oracle.c... | Unable to covert PEM to JKS |
Please see this issue and comment:https://github.com/moby/moby/issues/26824#issuecomment-517046804 | I have a fairly plain Debian Buster install. Debian Buster uses nftables rather than iptables. If I try and run a container with a published port:sudo docker run -it --rm --name=port-test -p 1234:1234/tcp debian:jessie-slimthen I get this error:docker: Error response from daemon: driver failed programming external conn... | How do you publish ports from a Docker container on a system using nftables? |
Simply, you can use endpoints to deploy any service from your local. for sure you must implement security on your api.
I have created an application locally which builds using docker api, and deploy using kubernetes api.
Don't forget about securing your apis. | I was reviewing some material related to kubernetes security and I found it is possible to expose Kubernetes API server to be accessible from the outside world, My question is what would be the benefit from doing something vulnerable like this, Anyone knows business cases for example that let you did that?
Thanks | Exposing kubernetes API to the outside world |
As of now there seems to be thiskube-sheduler profile plugin:NodeResourcesMostAllocated: Favors nodes that have a high allocation of resources.But it is in alpha stage since k8s v1.18+, so probably not safe to use it for produciton.There is also this parameter you can set for kube-scheduler that I have foundhere:MostRe... | // I'm almost certain this must be a dup or at least a solved problem, but I could not find what I was after through searching the many k8 communities.We have jobs that run for between a minute and many hours. Given that we assign them resource values that afford them QOS Guaranteed status, how could we minimize resour... | Kuberenetes Scheduling: How would one achieve depth first scheduling behavior? |
You could setup a nginx reverse proxy on the host and bind to seperate ports. The question/and answer on this article explain it quite nicely so I won't repeat it all:
https://www.digitalocean.com/community/questions/how-to-bind-multiple-domains-ports-80-and-443-to-docker-contained-applications
|
I have a simple NodeJS site running inside a Docker container, with its ports mapped to port 80 on the host. I have a domain pointing to the IP of the EC2 instance, and everything is working as expected.
If I want to run another, separate NodeJS site from a Docker container on the same instance, how can I map specific... | Point different domains to different Docker containers on a single EC2 instance? |
usesudo docker loginor as @Serey mentioned add your user to docker groupusermod -aG docker $USERand disconect from your session! | On Ubuntu 16.04 LTS whenever trying using docker login command the following warring message will be show :docker login
Warning: failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker... | Permission denied while trying to connect to the Docker daemon socket |
2
+25
NGINX (Open Source and Plus) opens per request exactly one connection to exactly one server from the upstream. Which server is actually selected depends on the load balance directive. You can direct multiple requests to the same upstr... |
I'm using ngx_http_grpc_module to balance RPCs across a number of backends. Sadly I have little control over the backends and it's hard for me to inspect the exact behavior.
In my mind there are two types of concurrency in use:
the number of connections opened to each backend
the number of streams per connection
If ... | How many connections and streams are opened by NGINX to backends when loadbalancing with ngx_http_grpc_module |
expand()defines a list of files. If you're using two parameters, the cartesian product will be used. Thus, your rule will define as output ALL files with your extension list for ALL samples. Since you define a wildcard in your input, I think that what you want is all files with your extension for ONE sample. And this r... | I am currently using Snakemake for a bioinformatics project. Given a human reference genome (hg19) and a bam file, I want to be able to specify that there will be multiple output files with the same name but different extensions. Here is my coderule gridss_preprocess:
input:
ref=config['ref'],
... | What is the best way to use expand() with one unknown variable in Snakemake? |
+50Thedocumentationtells that it should look like this:s3 = Aws::S3.new
bucket = s3.buckets['some-bucket']
object = bucket.objects['38ac8226-fa72-4aee-8c3d-a34a1db77b91/some_image.jpg']
object.deletePlease note:the square brackets,that the object's key doesn't include the domain andinstead of creating an instance ofAws... | I am usingaws-sdk-rubyfor deleting a file saved in a bucket in my amazon s3 account, but i can't figure out why i am able to delete the desired file from S3 bucket using the following code.this is my coderequire 'aws-sdk-v1'
require 'aws-sdk'
ENV['AWS_ACCESS_KEY_ID'] = "XXXXXXX"
ENV["AWS_SECRET_ACCESS_KEY"] = '/ZZZZZZ... | unable to delete file from amazon s3 using ruby script |
I understand what you are saying. I am just asking if it is possible
It isn't possible.
What if you wanted to show someone a project you built but didn't want them to be able to copy the entire source code?
Like the comments have hinted upon, how could you prevent someone from copying all the code, if they can jus... |
Is it possible to share a Github repo so people can view it but not download/clone it? I would like someone to see a complete project that I built but not have the ability to clone.
| Set Github repo so people can see it but cannot clone it? |
kubelet, kube-apiserver, etc, and other non-k8s containers that are created by RKE should have the restart policy of always.If not, you can update it the following command.docker update --restart=always kubeletAlso, rke v0.1.9 is very old. Please try using rke v1.1.4. | I have initialize a kubernetes cluster with rke (rke up).However when a node reboots, I have to executerke upagain to start kubelet and co.Is there a way these services start automatically on the node?Thanks for your help.I use rke v0.1.9.The OS is Coreos Container Linux 1855.4.0.My cluster.yml is:nodes:
- address:... | rke kubernetes - node reboot |
After spending a few hours on this issue I decided to switch from Azure beta portal (portal.azure.com) to an old portal (manage.windowsazure.com) and created an endpoint there. And then it worked! So it must be something that malfunctions in the new Azure Portal pre-release.ShareFolloweditedMar 30, 2015 at 9:33answered... | I have configured an Elasticsearch instance on an Azure Linux VM instance, as describedhere. The service is running smoothly as I can check by issuing a curl command.But since this is an exploratory server instance I want to open 9200 port on the VM to be available for any external client. I opened 9200 and 9300 ports ... | Elasticsearch installed on Azure Linux VM isnt't reachable |
This is the answer you're looking for.It shows how to find your committed files in history and reset to them.ShareFolloweditedMay 23, 2017 at 12:09CommunityBot111 silver badgeansweredFeb 24, 2014 at 11:31JakeJake35633 silver badges1515 bronze badgesAdd a comment| | I have accidently done a reverse commit of a branch on which I was working on. Is there any way to undo that reverse commit and get my changes back? | Undo reverse commit source tree |
Look at the log: req: 1000/1000
And you have set 1000 as the number of maxium requests.
You should always add --master/-M on uwsgi even under supervisord, this will allow to restart apps without losing the socket (and without spitting out an error to clients during restart).
|
I am using uWSGI and nginx to run two parallell Django apps. One of them, the one with somewhat more load (both are very small) keeps dying about once every 24 hours with the following message:
[pid: 16358|app: 0|req: 1000/1000] 127.0.0.1 () {46 vars in 847 bytes} [Thu Mar 24 16:38:31 2011] GET /aktivitet/409/picknick... | Django, uWSGI & nginx: Process dies for "no reason" |
5
I would expect the status to be Exited. Perhaps the original image you were using had an ENTRYPOINT that did something that kept the container running while you exec'ed to it. You can try this:
docker run -d --name hb dajobe/hbase sleep 60
Then try your exec, for the n... |
I have a docker image dajobe/hbase and its been built from Ubuntu. I created a container of this image and named it hb.
$ docker run -d --name hb dajobe/hbase
e1f68ff8b3b6c5e474426e2566f8c087d6a785fc5eeb58cd2aeb86176068651d
I then started the /bin/bash on hb, and checked for the availability of the vi editor.
$ docke... | Error response from daemon: Container CONTAINER_NAME is not running |
Take care that the rewrite rule in your.htaccessis applied multiple times:0: http://domain.com/data/user/foobar
1: /data/user/foobar -> /data/user/index.php?id=foobar
2: /data/user/index.php?id=foobar -> /data/user/index.php?id=index.phpSo it always replaces youridparameter withindex.php.You need towrite a conditiontha... | I tried havinghttp://domain.com/user/foobarredirected tohttp://domain.com/user/index.php?id=foobarusing the following code in .htaccess:RewriteEngine On
RewriteBase /data
RewriteRule ^user/(.*)$ user/index.php?id=$1But for some reason onlyindex.php(notfoobar) is returned to the script as ID.I think mod_rewrite gets con... | RewriteRule confusion: Pattern also matches existing directory name |
1
the "sleep(1)" should like this "Sleep(1)". The letter "s" should be capitalized.
Share
Improve this answer
Follow
answered Dec 16, 2020 at 11:59
ashurashur
2511 silver badge88 bronze ba... |
The Visual Studio 2019 shows E0020: "Sleep() is undefined" and C3861 'sleep':identifier not found.
I use "windows.h" but it doesn't work.
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <windows.h>
#include <dos.h>
#pragma comment(lib, "pthreadVC2.lib")
us... | E0020 identifier "sleep" is undefined Visual Studio 2019 |
(follows @aclark 's answer)....or in production mode, Css are all merged in a single big css per performances reasons. There's a little trick to force the css refresh though: just go to Zope Management Interface -> portal_css. Here toggle the selection of any css (just to simulate a change in the configuration) and t... |
Basically, i'm admin of a plone website and i want to try out changes in the plone.css, plus other stuff in the Base Properties and ploneCustom.css for my additionnal elements.
I want to be able to quickly swicth from my custom css to the default for trying out different versions of plone.css.
What's the best way ? Is... | How do I load / unload css changes quickly on a plone + Zope site ? (noob) |
Have a look to the following "/api/resources" web service documentation :http://docs.codehaus.org/pages/viewpage.action?pageId=229743280 | I'm using the (deprecated) CSV Plugin in SonarQube to create some analysis. Is there a way to get the same information by using the web api ?"same information" means in my case:FullClasspath | Metric 1 | Metric 2 | ... | Metric n----------------------------------------------------------org.myClass1 | Value 1 | Value 2 ... | How to use webapi to get similar results like CSV Plugin |
The user that NGINX is running as must be able to access the directories its attempting to read and/or write to. In most cases, NGINX is either running as the user nginx or www-data.
We can check for the user directive in /etc/nginx/nginx.conf by running:
grep user /etc/nginx/nginx.conf
If the return of that command s... |
My site runs on php-larvel and nginx as webserver and the root diectory is /public , everything was ok ,but when I wanted to secure my phpmyadmin login url , creating a symlink by this command in /public_html :
ln -s /usr/share/phpmyadmin/phpmyadmin-YOUR-SECRET-CODE
site went down showing 404 , and the nginx shows t... | NGINX gaves 404 error after creating a symlink |
1
If I understand your question:
You are following a standard pull request workflow that merges feature branches ("branch1") into a long-lived "develop" branch.
Sometimes, as a result of the peer review process, you end up with merge conflicts. You want to avoid this.
Sol... |
Hi I am in difficulty with this scenarios:
I have two local branch: develop and branch1. On remote I have develop branch only.
The steps that i followed:
I have pulled remote develop from my local develop.
I have created new branch branch1 and add some code inside it.
I need to create, and push all the modificatio... | How to merge and push a local branch in git |
Thedocumentation mentions:docker psYou should see output similar to this:$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2b799c529e73 prismagraphql/prisma:1.7 "/bin/sh -c /app/sta…" 17... | This is steps I have doneprisma initI set postgresql for database in my local(not exist).It created 3 files, datamodel.graphql, docker-compose.yml, prisma.ymldocker-compose up -dI confirmed it running successfullyBut if I callprisma deploy, it shows me errorCould not connect to server at http://localhost:4466. Please c... | Prisma Deploy Docker error "Could not connect to server" |
There are usually 2 maintenance AWS does.Continuous managed maintenance updates.Service updatesWhile creating cluster you need to specify a 60 min maintenance window. Usually all the maintenance updates (1) will happen during that time.For every service updates you will recieve notifications when there is a scheduled o... | We are planning to use ElastiCache (Redis) instead of our own redis cluster. However, the "maintenance window" setting creates some questions,If I use a multi-az replicated cluster, will elasticache failover to available replicas during maintenance windows or does the entire cluster go down during maintenance?How long ... | ElastiCache Maintenance Window Availability |
Let's assume "Java cache" is an object pool (or object pool pattern).I think the difference lies in the understanding of objects being cached are singleton or not.In the flyweight pattern, you use thesameobject fetched from "the factory" by potentially multiple clients. That requires different way of managing stuff (li... | I read about Flyweight design pattern and got to know that it stores the objects that can be shared so as to save on heap usage. Java cache also saves the objects that can be reused later so as to save memory. Then what is the real difference between Flyweight design pattern and java cache ? | What is the difference between Flyweight design pattern and Java cache |
Yes, it's possible to rewrite the entire history... but for your case you don't have to. You just need to rewrite the bits you worked on. This is, probably, just the changes to yourmasterbranch. For that you can do an interactive rebase for all the changes betweenmasterandorigin/masterwhich is what they have upstream.T... | Quite awhile back, I forked a repo on github and made quite a few changes to several unrelated features, and at the time I knew basically nothing about git, so my commits are basically just "whatever I happened to have worked on since whenever the last time I remembered to commit was". I would like to contribute some ... | Rewrite entire git history |
The rule that you have is correct. When I add those to a blank htaccess file, I get redirected tohttp://website.com/const/as expected unless I change the first condition to my actual IP. Some things you should check:Make sure you've flushed your browser's cache. Although 302 redirects shouldn't be cached in such a way,... | I've tried countless combinations from forums, answers here on Stack Overflow, and blogs. I can't get this to work right.I'd like to redirect all users to a subdirectory - "/const" - except for an IP that I deem worthy.This is what I'm using so far:RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^91\.143\.253\.211
Rewrite... | .htaccess Redirect all users to subfolder EXCEPT for IP |
For -e, it will override the system environment which will change the connectionstring when you retrive from code, it will not affect the content in appsettings.json.
For example
Assume you have a appsettings.json like
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;... |
I have an asp.net core API 2.2 implemented. I have created a docker image. I would like to override connection strings in appsettings.json file.
Is there any way to do it? I tried via environment variables when I start the container with command docker container run -e "ConnectionStrings:DefaultConnection={...here goe... | asp.net core override connection strings via ENV variables |
If you are using Fabric for deploment you could add a function that edits your crontab.
def add_cronjob():
run('crontab -l > /tmp/crondump')
run('echo "@daily /path/to/dostuff.sh 2> /dev/null" >> /tmp/crondump')
run('crontab /tmp/crondump')
This would append a job to your crontab (disclaimer... |
How do people deploy/version control cronjobs to production? I'm more curious about conventions/standards people use than any particular solution, but I happen to be using git for revision control, and the cronjob is running a python/django script.
| How do you deploy cron jobs to production? |
In yours desktop GitHub open "Add" (blue "plus" button on the top-left) and add yours local repo. Then in that repo's settings point it's "Remote" origin to yours github repo (url to github.com/user/repo/repo.git file) at server.
|
I made a repo on my local hard drive and push it to github using CLI. It's up on Github now. But now I want it to also appear on my github desktop. The only option I see is 'clone' and 'save to my computer'. These options are meant to make a new directory inside my local hard drive and clone what's already on my githu... | How do I make my repo appear on my Github Desktop (Github for Windows)? |
The idiomatic solution is either of:
having T implement DeserializeOwned instead,
have two methods: one to create the string, and one to deserialize, and ensure that the deserialized result is stored longer than T.
The former is, of course, much easier.
|
I have a newly allocated String inside a function, I need to create a derived object that borrows &str from that String, and return the given object.
I know my code is wrong because the String lifetime is that of the function, so the derived object will never be returned because of dangling references.
What would ... | How to return the result of serde_json::from_str when called with a String that will be dropped at the end of the function? |
You cannot to do this automatically.Maybe instead of suppress rule you can useIMap. You can create simple class which can translate enums:public class Enum1ToEnum2Translator {
private static IMap<Enum1, Enum2> MAP = new Map<Enum1, Enum2>();
static {
MAP.add(Enum1.VAL1, Enum2.VAL1);
MAP.add(Enum1.VAL... | The C# plugin within Sonar flags methods where the cyclomatic complexity is greater than 10 (CSharpsquid:S1541 - Methods should not be too complex).
This is great for 'real' code, but my team finds it annoying when a method containing just a simple 'switch' statement with 5 cases (used to translate one enum type into a... | Can individual rule violations be suppressed during code-analysis in Sonar? |
An ElasticBeanstalk has an apache (I guess for the Load Balancer) on front of Tomcat, so this is the first one who receives a request, and is where must be indicated that slashes must be not decoded.In order to get this, we have used this virtualhost:<VirtualHost *:80>
<Proxy *>
Order deny,allow
Allow from al... | How should I configure my ElasticBeanstalk on AWS to allow encoded slashes in URLs ?
(Using -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true)I've created a directory called .ebextensions with a file tomcat.config in top-level directory of my source bundle (http://docs.aws.amazon.com/elasticbeanstalk/lates... | ALLOW_ENCODED_SLASH on AWS Elasticbeanstalk |
In order to use Prometheus datasource, you need to follow below stepsStart Prometheus server. By default, it listens at 9090 port.login to Grafana console, go to option - Add datasourceselect Prometheus as type of datasource from the drop down.Insert the Prometheus URL (You got this in step 1)Access should be "direct" ... | help me with this fairly new to GrafanaThings accomplished so far:
1. Managed to get a JSON output from CSV (basically looking to plot transaction availability based on success/ fail criteria)
2. Wanted a Prometheus source importedCan you help me how I proceed in either building a Graphite dashboard (or) Prometheus? Mu... | Grafana custom data source |
The compiler is free to do whatever it wants, as long as thesemanticsof the language arereserved. In other words,i2andj2can be bound to memory places before the execution reaches the entry point of their block, and can be unbounded any time as long as that doesn't affect the semantics of your code. | I have a question about the following C code:void my_function()
{
int i1;
int j1;
// Do something...
if (check_something())
{
int i2;
int j2;
// Do something else...
}
// Do some more stuff...
}Are there any guarantees about when stack space is allocated/deallocat... | When is stack space allocated for local variables? |
2
That doesn't seem to work, but using your host computer's IP address does...
Say your host computer's IP address is 192.168.1.111 . You can use that from your Lambda to hit your host
You can make this configurable:
template.yml:
...
Environment:
Variables:
ENDPOIN... |
Trying to port forward dockerized Lambda to my localhost using command:
$ sam local start-api --docker-network host
Error every time trying to access Lambda:
No response from invoke container for FunctionName
Tried also using host.docker.internal & host.docker.local networks with no success.
Any ideas? Workarounds?
| No response from invoke container for FunctionName |
One of the best way to do this is changing your dns provider. Just create an account at http://cloudflare.com/ and add your domain there.
You can add a Cname record to point the dns server to your username.github.io and everything will work perfectly
See my own website:
|
I have registered a free domain from dot.tk, but I want to link it with github pages:
username.github.io/PROname/v1/
to
PROname.tk
I have seen this document: https://help.github.com/articles/quick-start-setting-up-a-custom-domain, but that's not sufficiently helpful with my case.
| How can I use dot.tk domain with GitHub Pages? |
Your old project requires credentials for read-only access
We will only temporarly store them for importing.
This basically means that we need to give the BitBucket login ID and password. When I entered BitBucket ID and password, importing went through fine and I could then see the imported repo on github.
|
I am trying to import a repository into github from my bitbucket account it seems to be failing and shows following message,
"Your old project requires credentials for read-only access
We will only temporarly store them for importing."
Path used for importing looked something like: https://[email protected]/blal/blah... | Transferring repo from bitbucket to github failing |
There's thisGithub Guide onSyncing a forkand awhole category of guideson working with remotes.TL;DR:# get list of existing remotes in your repo
git remote -v
git remote add <remotename> <remoteurl>Where<remotename>is any name that did not show up in the output ofgit remote -v. The name is arbitrary and only used as a l... | Suppose I have forked a public repository and want to pull the changes from the original one and then make my changes and then commit them to a new branch and push that branch to my fork. I follow the steps fromthis answergit checkout master
git pull --rebase https://github.com/OtherUser/OtherUserRepo master
git checko... | How do I avoid typing the full Github repository URLs in each command? |
I've managed to make it work!You can choose the scale target in one parameter and under the metrics section choose the target of a different service.Example yamlkind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
name: my-app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment... | I currently have a service running in my kubernetes cluster which exports my metrics to prometheus which is monitoring my cluster and services.I want to use a metric from this service to automatically scale (hpa) a second service based on these metrics.Is this possible to do?Thanks in advance! | Can I use metrics from one application to automatically scale a different one? |
You can have a look at the certificate chain in Firefox and other browsers. The certificate chain seems to be valid, but there is one (probably) untrusted certificate:The root certificate "Go Daddy Class 2 Certification Authority" uses SHA-1 for hashing, browsers like Google Chrome, Firefox and Safari don't trust SHA-1... | On Mac OS X 10.13 High Sierra, I am visiting a site,https://www.saintanneshospital.org, and Safari and Firefox tell me the certificate has been revoked; however when I inspect the certificate it is clearly valid.This happens only on my computer, and only on Safari and Firefox.$ curl --insecure -v https://www.saintannes... | How to debug : Safari, FF tell me certificate revoked, but it is valid |
Yes, you need additional software. crictl is part of thecri-toolsrepo on github.At least when I encountered this problem (Dec 20, 2017), cri-tools isn't available on kubernete's package repo, so I had to download source and build it. cri-tools is written in go, so you may need to install golang on your system as well. | I am setting up kubernetes cluster on a Centos 7 machine, and thekubeadm initcommand gives me the below warning message.[init] Using Kubernetes version: v1.9.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING SystemVerification]: docker version is greater than the mo... | Kubernetes1.9.0 kubeadm init - crictl not found in system path |
Local variables are allocated on the stack frame of the function called. The stack frame is referenced through the stack pointer (SP) register which is initialized by the OS upon start of the process. The program uses the SP to dynamically allocate stack space and look up the values stored there. So this type of access... | I am trying to learn operating systems. At present i am in virtual addressing. What book says that if we have onestatic variableand onelocal variableand we update them and sleep for some time and try to print their addresses then across multiple such processes running one will get same memory address.This is because ea... | Same address for static variable but different for local variable |
There is no PDF reporting available for 6.4.If you really have to have reporting outside of SonarQube itself, then you'll need to look at theweb servicesto pull data. | I used to use SonarQube 3.7.4 where I was able to generate PDF reports when I have been using JDK 1.7.I upgraded to JDK 1.8 which is not supported in SonarQube 3.7.4. Therefore I upgraded to SonarQube 6.4, but the PDF plugin is not available anymore and I am not able to generate reports. I also tried many available plu... | How to generate PDF reports in SonarQube 6.4? |
Try the following in the .htaccess file in the document root, with you other redirects:RewriteRule ^(portfolio)/item/([-a-z]+)/\d+ /$1/$2 [R=302,L]This will redirect/portfolio/item/<client>/<num>to/portfolio/<client>. Where<client>and<num>are variable. It also assumes that<client>consists of just the lowercase lettersa... | The first week in December my company put their new website online. Now we knew we had to 301 redirect the old links that weren't put back onto the new website, so we did.But now I face a new problem which gives me headaches..
When I check my broken links in Google Webmaster tools, I get about 50 dead links every day w... | how to 301 redirect a lot of old links |
I was able to achieve what I wanted to.
-1. Created a class LruSpannableCache extending to LruCache
and override the sizeOf method
@override
protected int sizeOf(Object key, Object value)
{
//The cache size will be measured in kilobytes rather than number of items.
return ((CacheSpannable)value).size() / 1024;... |
I have a Recyclerview which holds a lot of messages, similar to a chat screen.
In each list item, I have a TextView in which I set Spannable strings. The strings contains images and text and sometimes just text. The method I have to replace some chars in the strings with Drawables can get quite costly when there are a... | Cache Spannable Strings for RecyclerView |
I've been putting variables and mixins into anincludes.css.scssfile and importing them into each stylesheet that requires them. To make Rails recompile when the includes file is changed you need to use thedepend_ondirective in application.js. For example:application.css:/*
*= depend_on includes
*= require_self
... | I've set up a set of [object].css.scss styles in my assets/stylesheets directory to correspond with the different views in my application. Every sheet includes a set of global style variable values in the first line:@import "branding.css.scss";And then accesses the variable values when needed ($primaryColor, $secondar... | Rails 3.1 - force SCSS variable value refresh? |
$hostis a variable of theCoremodule.$hostThis variable is equal to line Host in the header of request or
name of the server processing the request if the Host header is not
available.This variable may have a different value from $http_host in such
cases: 1) when the Host input header is absent or has an empty value,
$h... | In Nginx, what's the difference between variables$hostand$http_host. | What's the difference of $host and $http_host in Nginx |
-1How about RedirectMatch?RedirectMatch 301 ^/w/$ http://www.tonsofbeers.com/EDIT:If you want to redirect all files, not just the root:RedirectMatch 301 ^/w/(.*)$ http://www.tonsofbeers.com/$1EDIT 2:Or using rewrite:RewriteEngine On
RewriteRule ^w/(.*)$ http://www.tonsofbeers.com/$1 [L,R=301] | I have apeskyWordpress site, installed in a directory called/w/-- in which cannot be rebuilt or migrated to a different location --YES, I know basically what I am asking and seeking is a hack, but that is all time affords and is actually something I'm curious about anyway.If website ishttp://www.example.com/w/-- how ca... | Hide URL path EG /w/ with PHP or htaccess |
I changed the namespace name to "MyApp (prod en)" when initializing the CloudWatchConfig. This fixed my problem. | My application is pushing custom metrics to CloudWatch. Furthermore, these metrics are plotted using Grafana.For this to work I need to configure Grafana to look for my custom metrics namespaces by adding them under Datasources -> CloudWatch. Like this:The only problem is that I'm having another custom metric namespace... | Cloudwatch custom metrics namespace in Grafana |
Found the IGNOREHEADER function, but still couldn't figure out where to write it.Pretty obvious now, but just add IGNOREHEADER at the bottom. The 1 represents the number of rows you want to skip for headers, aka my CSV had one row of headers.COPY apples FROM
's3://buckets/apples.csv'
CREDENTIALS 'aws_access_key_id=ab... | I have a MySQL table that I'm migrating over to Redshift. The steps are pretty straightforward.Export MySQL table to CSVPlace CSV into Amazon S3Create table in Redshift with exact specifications as MySQL tableCopy CSV export into RedshiftI'm having a problem with the last step. I have headers in my MySQL CSV export. I ... | How do I remove Header Row when migrating from S3 to Redshift DB? |
You can do a condition statement just like what you stated.<If "%{REQUEST_URI} =~ /\.(gif|jpe?g|png|css|js)$/">
#put your header set stuff here
</If>https://httpd.apache.org/docs/2.4/expr.html#examples | I have a PHP Laravel application with a standard.htaccessfile as follows.<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,... | Conditionally set headers in Apache htaccess |
Yes opencv does have gpu module in python 3. You can visithttps://docs.opencv.org/2.4/modules/gpu/doc/introduction.htmlfor more information. There are plenty of examples.There is an example of gpu accelerationhttps://answers.opencv.org/question/203403/opencv-gpu-accelerated-using-python/ | I want to do some image processing with python using Opencv library.
actually i want to read a lot of images from an object storage and do some image processing on each image and want to do it as fast as possible.
I want to compile and use Opencv on gpu instead of cpu to gain most speed.is there anyway to using gpu for... | complie and using opencv on gpu for image processing with python |
. Unix epoch to timestampTo convert a unix epoch time to timestamp in Timestream you can use Timestream functionfrom_milliseconds:from_milliseconds(unixtime_in_millisecond)In your example:SELECT
*
FROM "data-api-timestream-test"."table_test"
WHERE
time = from_milliseconds(1637339664248)2. Timestamp to unix epoc... | I want to execute this query:select * FROM "data-api-timestream-test"."table_test" where time = 1637339664248I get the error:line 1:71: '=' cannot be applied to timestamp, bigintI also triedselect * FROM "data-api-timestream-test"."table_test" where time = cast(1637339664248 as timestamp)I get the error:line 1:73: Ca... | How to convert a bigint in AWS timestream DB to timestamp? |
Normally start_testnet should be enough as it lets developers to deploy and test their contract on testnet, which I assume is what most developers want. However, there are certain cases where start_localnet is preferable. For example, if you want to use a different genesis for whatever reason (One reaons I can see is ... |
disclosure: I work with NEAR and am currently onboarding
based on the docs (docs.nearprotocol.com) and diving into the nearcore/scripts folder, looks like there are currently 5 ways to start a local node for development and testing (ie. developing DApps, integrating with or contributing to the platform) as well as val... | how does NEAR Protocol recommend local development? |
The cron expression should be0 * 9-18 ? * * *It reads 0 seconds, every minute, from 9 to 18 every day, every month, every year.Use cron expression builder for convenience - something like this:https://www.freeformatter.com/cron-expression-generator-quartz.html | I might be overlooking over already-asked-question, but I have not found it yet. Basically, did I do it right in order to execute job for every minute within 9 AM to 6 PM?schedule.scheduleJob("*/1 9-18 * * *", function Job()) | Node schedule run every minute within specific range of hours |
You could create separate jobs/pods manifests assigning them different arguments/env variables to keep track of the hook events. I haven't seen anything in the tool itself. | I have a k8s job setup as a helm hook for pre-install and pre-upgrade stages."helm.sh/hook": pre-install,pre-upgradeIs there a way to know inside the job/pod which stage it is getting executed - whether it is pre-install or pre-upgrade ? | Helm hook - is there a way to get the value of execution stage in the pod/job |
You can use amend within VS.
Change what you want to change and in the Team Explorer - Changes window click Actions and Amend Previous Commit.
This will change the last commit and rewrites it with your changes (amend).
On the CLI, this would look like the following: git commit --amend (with options to change the messa... |
I've made changes in a project in Visual Studio and committed them. It's connected to my GitHub repository.
Now, I haven't pushed it, because it won't work. After further investigation, I found that I accidentally added a huge file in my commit, which Visual Studio now tries to push up to my GitHub Repo.
But since it'... | Changing content from an unpushed git commit in Visual Studio |
Turns out I need to use the asseturlinstead of thebrowser_download_url. And I need to use headerAccept: application/octet-stream.This worksRELEASE_JSON=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
$API_B... | I have a personal access token that is has Read-only access to Releases in a repository.I tried using Curl with the access token bearer like belowRELEASE_JSON=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
... | GitHub private release asset browser download URL returns HTTP 404 when accessed with Personal Access Token |
Use git-flow workflow model, it is exactly for such feature and releases purpose.IT will save you all the manual hassle.
Gitflow Workflow defines a strict branching model designed around the project release. This provides a robust framework for managing larger projects.
https://www.atlassian.com/git/tutorials/comparin... |
I have a git project with two branches
development
master
I am working on a feature and pushed them to remote development branch.
Lets say I have 10 commits now in development branch and my master branch has 6 commits. The additional 4 commits in development branch has the new feature that I am working on.
Now I nee... | Git - Adding new feature to my project but not live yet. Need to do a quick update and push to live but without that new feature |
Temp space uses the local “ephemeral” volume on the instance. Currently the only way to increase that space is to move to a larger instance size. | I am working with the AWS Aurora PostgreSQL 10.4 engine. I am trying tocluster table ... using indexand getting an error likecould not write block .... of temporary file: no space left on deviceIf I were managing my own PostgreSQL instance I would be looking at the space available on individual volumes withdf. (See a... | Aurora PostgreSQL engine: no space left on device |
increase(cart_transactions_messages_processed_total[1h])returns increase of your counter over an hour.Based on your question, I assume you want to fire alert, if counter was increased every minute of some hour. If this is correct, you'll need something like this:- alert: ConstantIncrease
expr: increase(cart_transac... | I have a countercart_transactions_messages_processed_total. Trying to set an alert, if the counter increases continually during/for an hour.From the documentation, I learnt that, if the counter value drops the counter resets altogether, if so, how to take this into consideration while creating a rule ?Will this be a ri... | Right function for a metric that grows steadily |
Here is the grok pattern that matches your log:%{SYSLOGTIMESTAMP:time} %{IPORHOST:syslog_hostname} %{DATA:syslog_tag}\: (?<timestamp>%{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME}) client %{IP:clientip}#%{POSINT:clientport} \(%{DATA:query_one}\)\: query\: %{DATA:query_two} IN %{GREEDYDATA:querytype} \(%{IP:dns}\)Please find the ... | I have Named(Bind 4) dns-query logs like these:Sep 17 11:05:33 central.ns.1 named[13705]: 17-Sep-2020 11:05:33.399 client 10.127.0.9#50507 (19.img.avito.st): query: 19.img.avito.st IN A +EDC (10.127.4.28)
Sep 17 11:05:34 central.ns.2 named[16335]: 17-Sep-2020 11:05:33.411 client 10.127.0.8#54091 (api.aliradar.com): qu... | Logstash: grok patterns for Named (dns-query logs) |
13
To be honest I find the storage terms & conditions on the remote server really weird. GitHub "tracks" your Large File on their infrastructure with a limit of 1 GB for individuals holding a GitHub Free account.
But there's a caveat; say you initialized your local reposito... |
I have somehow reached the github data limit even though my single remaining large file (138 mb) is now being tracked by LFS (Github's Large File Storage). I reset to the last commit that went through, made sure that LFS was tracking the only (to my knowledge) problem file. I still get the following error, and have no... | How to reset GitHub Git-LFS storage limits |
You can have this kind of manipulation withResultSelector. But it can only be applied at ouput step. With this approach you need to eitherAlter the output of previous step withResultSelectorCreate a pass-through step that add the static additional value you wanted | Let's say I have an AWS step function that simply passes the output from the first step to the second step. But now let's say I need to add an additional input value for that second step.How do I set the parameters for the second step to keep ALL input fields (without specifying them individually) and add a new input ... | AWS Step Functions - include all step input but add a parameter |
Environment variables aren't expanded inside the crontab file. But you can use the environment variable when you're creating the crontab file, by piping anechocommand tocrontab.{ crontab -l ; echo $JOB_MINUTES * * * * /tmp/my_script.sh; } | crontab -The-filename argument means to get the crontab contents from standard ... | I am wondering if there is a way to dynamically populate the time of a cron job off of an environment variable. For example:export JOB_MINUTES=4Then in the crontab$JOB_MINUTES * * * * /tmp/my_script.shResulting in a crontab of4 * * * * /tmp/my_script.sh | Dynamically setting time of cron job based off of system variables |
The temporary solution is set the ttyerasecommand to whatever your backspace key sends in the terminal, when connected via ssh.stty erase ^HThe^Hsequence above is not the literal text but a control character entered by pressingctrl-vand thenbackspace.You can add this command to your.bashrcfile on the docker VM to have ... | In Windows 10, when I launch MS PowerShell to ssh through a container in Kitematic at windows, I've noticed that I can't backspace or delete, instead I get ^H for backspace instead of actually delete previous character.Do I miss something? | How to backspace or delete? |
Not fully random like PHP code but you can achieve something similar usingmod_rewriteusingTIME_SECvariable that represents seconds value of the current time. Consider this code:RewriteEngine On
RewriteBase /
# dont rewrite more than once
RewriteCond %{ENV:REDIRECT_STATUS} .+
RewriteRule ^ - [L]
# redirect all request... | I am having one website and it is redirecting to five different index file randomly using php.www.xyzdomain.com/index.phpwww.xyzdomain.com/index2.phpwww.xyzdomain.com/index3.phpwww.xyzdomain.com/index4.phpwww.xyzdomain.com/index5.phpI want to redirect it using.htaccess, the same way it redirecting php.I found that usin... | Multiple url redirect using .htaccess |
You need to add aRewriteBase. When your rewrite rule's target doesn't start with a leading slash (making it an absolute URI), apache needs to guess whether it's a URI-path or a file-path, and it is incorrectly guessing that it's a file-path. Adding a base tells apache that it's a URI path.RewriteBase /or add a leading ... | I'm trying to make a rewrite of a url on my joomla site. I have an extra page in there wiht some other stuff on it.I have:RewriteRule ^company/([^/]+) company?alias=$1 [NC]where i want company/somecompany to show what the url company?alias=somecompany will give (not forward to it).What i get instead is a redirection to... | My url rewrite redirects to mydomain.com/var/www/clients/client3/web25/ |
From the command you did, i notice the usage ofgit stash. Git stash will move the changes you made away from the current working directory.You can view the last stashed content by:git stash showand see if your changes is there.If it does, do agit stash applyFor deleted bundle.js. I don't see a way to retrieve changed t... | I have lost major changes I have made. I list out the series of git commands I used.git add .git commit -mm "message" {this failed I guess due to -mm but I didnt see anything on console}git pull origin master {to get changes from master}
This showed I have changes on bundle.js an dbundle.map.js. So I deleted them.
I d... | How to get the files that are added using "git add .", failed "git commit" due to typo and git pull from remote |
It does sound like a bug but a possible workaround might be to delete all crontab jobs just before creating them:crontab -r -u USERNAME | We are running Chef 11.4.4 with a non-omnibus install (it is installed as a gem). In one of our cookbooks we use the cron provider like:checksum = Digest::MD5.hexdigest(node['fqdn'] || 'unknown-hostname')
sleep_time = checksum.to_s.hex % node['custom_command']['splay'].to_i
cron "custom_command" do
user "custom_u... | Chef cron provider creates multiple crontab entries |
In order to do sonar analysis of maven project, you need to first compile the project, and provide the path to compiled bytecode files insonar.java.binaries(As this is the mandatory parameter.You can run the sonar analysis using the below command:mvn clean install sonar:sonar -Dsonar.java.binaries=**/*.javaMore refere... | Now I am building the integration between Gitlab-CI/CD and SonarQube, but now I cannot push it to the SonarQube server through CI for help![ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) on project jeecg-boot-parent: Your project contains .java files, pleas... | about Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar (default-cli) |
This works as expected:sum by (team) (
kube_pod_labels{application=~"..."}
* on(pod, namespace) group_left(team)
(
kube_pod_status_phase{phase="Running"}
* on(namespace) group_left(team)
kube_namespace_labels{team=~"..."}
)
)Have to usesuminstead ofcountandkube_namespace_... | I need to combine three existing metrics (kube_pod_labels, kube_namespace_labels and kube_pod_status_phase). The fields I need to use are:kube_namespace_labels: namespace, teamkube_pod_labels: pod, namespace, application,team(have to be replaced by kube_namespace_labels.team value)kube_pod_status_phase: pod, namespace,... | How to combine more (at least three) metrics and count result |
I would like to inform you that Servers Certificate and PKCS7 Certificate are different formats of certificate.PKCS7 format certificate is used in java based server like Tomcat and if you are not using Tomcat you can disregard it.If you are using a server like IIS, cPanel, Apache etc then you will need to install "Serv... | From SSL2BUY I have the text for a certificate starting with "-----BEGIN CERTIFICATE-----" down to "-----END CERTIFICATE-----". There is no download option just an email option (but that person isn't available) how do I convert the encrypted text between the 'begin' and 'end' statements to an actual certificate?There a... | Create a .cer File From the Text of a Certificate |
RewriteRule ^videos-mycat/?$ videos?c=mycat [NC,L]maybe... | How i can proceed for rewrite this urlhttp://mywebsite.local/videos?c=mycattohttp://mywebsite.local/videos-mycatThx | Rewrite this URL htaccess |
You can try the following mod_rewrite. It actually works and I saw this on one of the tutorials I watchedhereand here is the .htaccess.<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /foldername/foldernameifapplicable/foldernameifapplicable
#Removes access to the system folder by users.
#Additionally this will a... | Now URL for my website is for example:http://localhost/xxx/index.php/welcome/I want to change this to:http://localhost/xxx/welcome/My .htaccess file:<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME... | mod_rewrite CodeIgniter |
So apparently, some configuration tells git to ignore yourBuiltProject/my.exefile.In spite of this, you could add the file to the index by doinggit add --force BuiltProject/my.exe && git commit -m "adding binary"If you want to know who is responsible for ignoring the file, there'sgit check-ignore:git check-ignore -v Bu... | I added a subfolder to house my built project on Github. Call the folder /BuiltProject. For some reason when I run git status I cannot see this file:BuiltProject/my.exe.How can I checkin my built project?gitignore:bin/
TestProject
/Sample.pro
*.vshost.*
ProjectName/app.config
/ProjectName.exe.config | Git can't see my *.exe |
I finally got around the issue by using the--server-connect-attributeoption, which is supposed to be used along with a--ssh-gatewayattribute.Add--server-connect-attribute public_ip_addressto above knife ec2 create server command, which will make knife use public_ip_address of your server.Note: This hack works using kni... | I am using chef to create amazon EC2 instances inside a VPC. I have alloted an elastic IP to new instance using--associate-eipoption in knife ec2 server create. How do I bootstrap it without a gateway machine? It gets stuck at "Waiting for sshd" as it uses the private IP of newly created server to ssh into it, though i... | How to launch amazon ec2 instance inside vpc using chef without using a gateway machine? |
AWS provides areference architecture for central loggingwhich sounds like a good match for your use case. This includes animplementation guidewhich you may find useful.I know you said the documentation wasn't very helpful, so apologies if you've already seen this and didn't find it useful. | My goal is to be able to visualize cloudwatch logs from AWS on a Kibana dashboard using the ELK stack but I am a little bit lost and don't know where to start. The docs were not very useful :(Does anyone have any helpful resources to guide me in the right direction?Thank you in advance!Reading the elastic docs I always... | How can I stream logs from Cloudwatch to Kibana using Elasticsearch? |
use the --chdir flag. for example, gunicorn config.wsgi:application --bind 0.0.0.0:8000 --chdir /path/to/project/root/
|
I am attempting to build an environment, using Docker, Django, gunicorn, postgres and nginx. In this environment Dockerfile and docker-compose sits one level above src folder
My idea of folder structure is as follows:
"NN Project" folder within my "Documents/repositories"
└── / config (to place nginx settings within)
... | start gunicorn when docker-compose is not in same folder |
We actually tested that as well and indeed when you're accessing it through the*.appspot.comdomain it's blocked, but not when it's hosted on it's own domain.Khan Academy isbuilt entirely on Google App Engineand it works nicely, so I don't think that you will have any problems with your own domain. Unless of course theg... | I have read that subdomain for appspot.com can't be accessed in China because it is block by GreatFireWall of China. How about if your app is hosted in other domain e.g.http://example.com, will it be accessible?I tested athttp://viewdns.info/chinesefirewallandhttp://www.greatfirewallofchina.org, the result is that the ... | GAE apps in China, *.appspot.com hosted domain |
The JavaScript engine is not smart enough to detect that bigObject is likely to be used after a recursive call ends or not, so I guess you have to set it to null or undefined before the recursive call, to make it effectively unreachable and collectable. As pointed in the comments, another solution consists in instanti... |
say I have
function doWithRetry(retries=5) {
let bigObject = new BigObject()
try {
return doSomething(bigObject)
} catch (e) {
if(retries) {
return doWithRetry(retries-1)
}
}
}
So I'm thinking that as I try and try again, the callstack continues to grow, so my question is whether the bigObj... | Do I have to release memory manually when doing tailend recursion in Javascript |
2
I believe this is because you can have the same partition cached in multiple locations. See SPARK-4049 for more details.
EDIT:
I'm wondering if maybe you have speculative execution (see spark.speculation) set? If you have straggling tasks, they will be relaunched which ... |
I have the following Spark job, some RDD have RDD fraction cached more than 100%. How can this be possible? What did I miss? Thanks!
| Fraction cached larger than 100% |
0
Sonatype documentation - on the subject - tells us that:
Docker relies on secure connections using SSL to connect to the repositories. You are therefore required to expose the repository manager to your client tools via HTTPS
Interaction of the docker client with repos... |
I have a Sonatype Nexus deployed under repository.company.com (it's behind an nginx proxy).
I created a docker registry and docker proxy and added them to one docker group "company-docker-group". The proxy is set to mirror https://registry-1.docker.io and also has the foreign layer caching option checked.
I have a htt... | Using Sonatype Nexus docker proxy |
Check out "Fast Reproducible Atomic Summations" paper from Berkeley.http://www.eecs.berkeley.edu/~hdnguyen/public/papers/ARITH21_Fast_Sum.pdfBut basically you could try something like finding a sum of abs values along with your original sum, multiply it by O(N^2) and then subtract and add it to/from your original sum (... | I have a working detection and tracking process (pixel image in rows and columns) which does not give perfectly repeatable results because its use of atomicAdd means that data points can be accumulated in different orders leading to round off errors in the calculation of centroids and other track statistics.In the main... | Is there a sorted atomicAdd or equivalent |
The javadoc of CacheLoader#load(String) states
Parameters:
key the non-null key whose value should be loaded
Returns:
the value associated with key; must not be null
Throws:
Exception - if unable to load the result
You've implemented it as returning null, that breaks the CacheLoader contract.
|
I'm trying to use google guava cache on a program but am not quite getting how it works.
I'm loading up the cache and then at a later stage i'm trying to check if an item exists in the cache, my code below doesnt quite work
The getIfPresent returns null if it doesnt exist but the load which calls it bombs out after w... | google guava checking for item in cache |
The problem in fact that it ignores the whitelisting due to the lack ofx-forwarded-for, but this activating this in production can be a security flaw, as discussed on:https://github.com/kubernetes/ingress-nginx/pull/2881 | I'm trying to enable some sort of rate limiting for a EKS cluster using nginx ingress controller where I also need to somehow whitelist a couple if IPs from this rate limit rule that are in charge of health and metrics checkups.
If I use the annotationsnginx.ingress.kubernetes.io/whitelist-source-rangeandnginx.ingress.... | Bypass nginx ingress controller rate limit |
Copy all the files in a new repository (excluding .hg or .git folder)
init a new repository
commit them all.
You're done.
|
I am looking into publishing an open-source project from an existing code base that I've developed. The code base has about 2000 revisions and I've been working on it for about a year. I recently developed an application that uses my existing source code as a base (I copy and pasted the Android project directory) and ... | How can I publish a project to GitHub without my repository's version control history? |
You could always just dump ALL the databases:
mysqldump --all-databases | gzip -9 > /backup/dbs.bak.gz
That'd free you from having to keep track of which dbs there are. The downside is that restoring gets a bit more complicated.
As for using root, there's no reason you couldn't create another account that has permiss... |
I have several websites hosted on a VPS and am currently performing database backups by running a shell script via cron that looks something like this:
mysqldump -uusername1 -prootpassword dbname1 > /backup/dbname1.bak
mysqldump -uusername2 -prootpassword dbname2 > /backup/dbname2.bak
mysqldump -uusername3 -prootpassw... | How best could I optimize the way I'm backing up MySQL databases? |
1
Wherever gunicorn's stdout is directed to.
If you run things under systemd, for instance, they'll end up into the system journal which you can read with journalctl.
Share
Follow
answered Apr 17, ... |
In my my_application/settings.py file, for example, I have a couple of print statements, thus:
print( 'running settings.py: ALLOWED_HOSTS: ' )
print( '\n'.join( ALLOWED_HOSTS ) )
... where does this output actually go on a remote server running nginx and Gunicorn?
NB I am aware this may be an egregious security breac... | Where does Django stdout output go when running with nginx and Gunicorn? |
I am the author of the question.You can fix this using the following code in your.htaccessfile:RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]ShareFollowansweredJul 16, 2021 at 7:58mordadmordad12999 bronze badgesAdd a comment| | I'm a novice and I work PHP. My professor introduced a site that gives me website problems. (woorank)
My site has a problem with 301 redirects. Look at the picture below.Click to see my problemMy problem is and I want to resolve this problem in the.htaccessfile. I knew the following code answered this but was wrong// U... | how to fix URL Resolve, 301 redirects in the htaccess file |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.