Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
nohup yourshellcommandhere &Will run in the background and not require you to have an interactive ssh session active. | I have a script built to log historical data into an Amazon Redshift instance. The script will likely need to run for a very long time, perhaps over 24 hours before it can run to completion.I have tried ssh-ing into my EC2 instance and running the script from there, however the after a few hours I leave my laptop or sh... | How to run script on Amazon EC2 without keeping an ssh pipe open? |
With CloudFormation that's pretty straight forward. All you need is to define an AWS::RDS::DBInstance. AWS also provides some example templates for that: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-services-us-east-1.html#w2ab2c23c42c13c27
As you can include CloudFormation resources... |
Currently we are using Serverless framework to update our dev/test environments, and manage our environments manually. Eg. each time we create a new environment, we manually create Elastic Beanstalk application & RDS instance. Is it possible to automate all this using serverless script? or cloudformation?
| Can serverless be used to to create RDS instance? |
I think the options to do what you want are largely documented in thersyncman page. In particular, the-Hoption (--hard-links) enables hard-link detection, and--deletewill cause rsync to delete things on the destination that do not exist on the source. So maybe something like:rsync -aH --delete /path/to/src/ /path/to/... | I would like to mirror a backup directory used by rsnapshot to a second location for more security. Ideally the solution would use rsync with ssh. What arguments do I need to provide to rsync to preserve the hardlinks (created by rsnapshot) and symlinks, to delete files, copy recursively, to delete files in the target,... | Mirror rsnapshot backup directory |
Docker runs natively only on Linux. On OSX there is a LinuxKit VM for Docker Desktop for Mac underneath to emulate Linux.
This of course adds some overhead. It's meant to be used for development and not for production.Hereis some explanation about the memory usage. | Like clockwork, basically every day my computer will start running slowly, and I discovercom.docker.hyperkitis eating up about 4GB of RAM.There are no active containers, I haven't used it in months and it's surely not updating or anythingevery day.Is it supposed to be that hungry? If it's meant to consume that much RAM... | OSX Docker is nearly always consuming about 4GB of RAM with no active containers |
All it came down to the fact that NGINX had usedmore_set_headersinstead ofadd_header(it may've been that NGINX had this module enabled) and after that using one of the above examples with it made it working.ShareFollowansweredApr 25, 2018 at 6:25Daniel ProtopopovDaniel Protopopov6,98633 gold badges2424 silver badges414... | I have followedthisexample to enable CORS on my API subdomain so that I can send requests to it from SwaggerUI. This is the output I get from running OPTIONS on that subdomain:curl -i -X OPTIONS http://api.MYDOMAIN.com/v1/data/extraction
HTTP/1.1 204 No Content
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 18 Apr 2018 20:4... | Enabling CORS on nginx |
If you have kubectl already installed and pointing to some other environment, such as minikube or a GKE cluster, be sure to change context so that kubectl is pointing to docker-desktop:kubectl config get-contextskubectl config use-context docker-desktop | I'm seeing the following error when runningkubectl get pods:Unable to connect to the server: dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refused it.This was working when I ran it two weeks ago. My config file in the~/.kube/configdirectory looks as follows:apiVersi... | Kubernetes error: Unable to connect to the server: dial tcp 127.0.0.1:8080 |
Docker 19+Config file is now available in~/.docker/daemon.json(seeEd's Answer)Docker EE/CE 17+Docker for Mac/Windows has added a config editor to the tray icon UI to allow editing of Dockersdaemon.jsonfile that will be persisted in the VM.To access it go to theDocker Icon> Preferences > Daemon > AdvancedOriginal Answer... | I am using docker in Version 1.12.0 (build 10871) on Mac OS (El Capitan 10.11.4) and I want to provide a config file for the docker daemon.Under Ubuntu you place the config under/etc/default/docker(seedocs). Unfortunately, I cannot figure out where to place the config in Mac OSAny ideas? | Docker deamon config path under mac os |
Sometime ago, another person asked a similar/relatedquestion on SOand I provided an answer along with anexample.As you know, by default, out-of-the-boxSpringdoes not handle multiple keys/values in the way that you suggested, though I like your thinking here and your example/UC is valid.Often times, however, you can ach... | Using spring-boot and its caching mechanism, is it possible to automatically store all entities returned as a collection into the cache one by one?For instance picture the following Repository method:@Query("...")
List<Foo> findFooByBar(Bar bar);I'd like to insert these in a Spring Cache, one by one, meaning there woul... | Putting all returned elements into a Spring-Boot cache using annotations |
To get a git history without any pull request merge commits I can use the merge button (Pull request page) and perform a rebase and merge:
|
On Github every time I merge a pull request into my base branch I get an extra merge commit:
Merge pull request #77 ...
I prefer to get a git history without these merge commits.
How can I achieve that?
| How to merge a pull request without getting a merge commit in the Git history |
for(int i=0;i<n;i++)
{
delete [] matrix[i];
}
delete [] matrix
You need to delete each of the internal arrays and then delete the array.
As has been suggested in a comment. A safer way of doing this would be to use standard containers such as std::vector. You could do something like this then:
std::vector<std:... |
I have allocated a two dimensional array using the following code:
// Dynamic allocation
int **matrix=new int*[n];
for(int i=0;i<n;i++)
{
matrix[i]=new int[n];
}
This works fine.
Firstly we allocate an array of integer pointers.
Then we further allocate each of the earli... | Memory management in allocating 2-D array |
You need some automation on the GHE side to push the code changes to CodeCommit.GitHub Actionsis a relatively new feature that can be helpful but I am not sure if it is part of the On Premise offering. Other that that simple bash scripts should be enough to get the repo across using git command line. | The company I work for has GitHub Enterprise setup on an internal server, so it is not accessible outside of the network. The application inside the repository is hosted on AWS, and we would like to automate the deployment.Because AWS cannot access the GitHub Enterprise repository (as it is only accessible on the netwo... | Push from Private GitHub Enterprise to CodeCommit Automatically |
If you are attempting to add a container to an existing network that no longer exists, then you can usedocker-compose up --force-recreate. I found thisGitHub issues commentto be a helpful overview. | In our team, we are currently transitioning to Docker to deploy everything on our server.We are using Docker Swarm and multiple (10+) compose files defining plenty (20+) of services. Everything works beautifully so far, except when we take down our stack usingdocker stack rm <name>(and redeploy usingdocker stack deploy... | Docker Network not Found |
4
The following setting works fine for Windows 2012 R2 Server !!!
https://i.stack.imgur.com/HrIaO.jpg
Control Panel-> System->Advanced System Settings->Advanced->Environment Variables->System Variables-> New -> Variable Name: PHP_FCGI_MAX_REQUESTS & Variable Value: 0
... |
I'm using nginx with (WT-NMP - portable mysql nginx php app.). Everything is working perfectly except php-cgi, it is stopping randomly and i have to start it again, in fact i realized that if i add to post my website quickly (in wordpress), it is definitely stopping. But sometimes it is stopping without for no reason,... | PHP-cgi stops working randomly without error log |
Found docs on how to use private registry:https://microk8s.io/docs/workingFirst it needs to be enabled:microk8s.enable registryThen images pushed to registry:docker tag backend localhost:32000/backend
docker push localhost:32000/backendAnd then in above configimage: backendneeds to be replaced withimage: localhost:3200... | I've build docker image locally:docker build -t backend -f backend.dockerNow I want to create deployment with it:apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-deployment
spec:
selector:
matchLabels:
tier: backend
replicas: 2
template:
metadata:
labels:
tier: backend
... | How to configure kubernetes (microk8s) to use local docker images? |
Maybe you should have a look atAudit4jthat provides auditing of business functionality and has several options for configuration.
Another framework isJaVersthat focues more on auditing low-level modification on persistence layer, which might match your case a bit better.Both framework provide audit-specific functionali... | Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si... | Good pattern or framework for adding auditing to an existing app? [closed] |
I ran into the same thing. I had accidentally installed the nginx-extras package that is normally provided by Ubuntu, rather than the one provided by Phusion Passenger's repository. The Passenger package has Passenger compiled with Nginx as a module, while the other package does not.The solution is to add Phusion Passe... | I'm running into an error when I try to restart the server. I don't know how to fix this.deploy@user:~$ sudo nginx -s reload
nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/nginx.conf:66I added these lines to the nginx configuration file '/etc/nginx/nginx.conf'passenger_root /home/deploy/.rvm/gems/ruby-... | Nginx unknown directive for passenger_root |
Hello please use below cron it will run in October everyday everyhour0 * * 10 *You don't need enabled disable it it will run only In October month.
If you want to enable disable it so you can do it by commenting this cron by putting # in front of this line. | I wish to backup mysql and have a script which I run daily via cronjob. We have a spiked-peak ordering season in October - is it possible for the same cronjob to be set to run hourly during that month or do I need a second cronjob which I enable/disable for October? | Variable cronjob frequency |
I'd say issue is not onNginx Ingressside.nginx.ingress.kubernetes.io/rewrite-target: "/$2"
...
- path: /phpmyadmin(/|$)(.*)Should work properly for you.However there is second part, configuration ofmyphpadmin. As you didn't provide this configuration I would guess what could cause this issue.Like mentioned inphpmyadmin... | recently I have deployed an kubernetes cluster which is running wordpress instance and phpmyadmin. I'm using Nginx ingress controller to perform path based routing for both the services. However, request to/is happening without any hassle but when I requestdomain.com/phpmyadmin/I get a login page after which I have bee... | Nginx rewrite-target overwritting domain/suffix/index.php to domain/index.php |
You can use:docker inspect --format "{{json .State.Health }}" <container name> | jqOutput:{
"Status": "unhealthy",
"FailingStreak": 63,
"Log": [
{
"Start": "2017-03-11T20:49:19.668895201+03:30",
"End": "2017-03-11T20:49:19.735722044+03:30",
"ExitCode": 1,
... | Inside mydocker-compose.yml, I have the followingservicehealthchecksection. I want to know if MariaDB is actually ready to handle queries. Aservicenamedcmdis configured to depend oncondition: service_healthy.db:
image: mariadb:10
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_USER: user
MYSQ... | How to view docker-compose healthcheck logs? |
GoDaddy SSL certificates are cheap and are great for any small to medium size business endeavor.Get the organization validation options if you are doing millions of dollars a year in transactions. IMO it's not that important or critical as a buyerStandard SSL will allow you to do secure.yourdomain.com OR www.yourdo... | It has been a long time since I purchased a SSL Certificate for a web site and I am confused on what I need. There are a lot of options and I can't filter out what is really needed verse what are optional premium services. Would really like to hear from your experience what is important to you when purchasing a SSL Cer... | Basic SSL Certificate Questions |
First you need to configure your Grafana as the below image.You need to write pivot table query as below.select
sum(case when state = 'MAHARASHTRA' then total_cases else 0 end) as "MAHARASHTRA",
sum(case when state = 'GUJARAT' then total_cases else 0 end) as "GUJARAT",
sum(case when state = 'MADHYA PRADESH' then tot... | So I'm just building a small project that involves the use of MySQL and Grafana.Here's my MySQL query and it's corresponding correct output:select state, sum(total_cases) from PolDATA group by state order by sum(total_cases) desc limit 5;Correct output:I have enetered the same query in Grafana as well. Also, the format... | Query works in mysql but does not display correctly in grafana |
1
my work around.
ls -l /var/run/docker.sock
# /var/run/docker.sock -> $HOME/.docker/run/docker.sock
sudo rm /var/run/docker.sock
ssh -i ~/.minikube/machines/minikube/id_rsa -L $HOME/.minikube/docker.sock:/var/run/docker.sock docker@$(minikube ip) -o StrictHostKeyCheckin... |
I use the Google Cloud Code extension on VSCode.
I have a minikube running on my macbook (using the virtualbox driver).
I can run skaffold debug from my terminal just fine; the Helm chart gets deployed, but I haven't done the debugger setup so the breakpoints don't hit (as expected).
I want to use the Cloud Code exten... | Cloud Code isn't using minikube docker context |
I was able to resolve the issue.instead of--insecure-registry http://myregistry.com:80I did--insecure-registry=myregistry.comand it worked | I installed docker toolbox and I am trying to connect to my private registry.I added the following to/var/lib/boot2docker/profileEXTRA_ARGS='
--label provider=virtualbox --insecure-registry http://myregistry.com:80
'I am able to login to the registry successfully. But when I try to pull/push from/to the registry, I ge... | docker pull/push not working with insecure registry |
There s 2 separate things:
1) Accessing the firebase realtime data base.
2) Accessing the instance that stores runs the application.Your firebase database indeed blocks unauthenticated users,but your server is still vulnerable to compromises, for example someone can connect to your server and add or update the code. | I got an email from: saying: (console.cloud.google.com)We noticed that your Google Cloud Project has open project firewalls. This could make your instance vulnerable to compromises since anyone on the internet can access and establish a connection to the instance.
The following project has open firewalls:Playchat (ID: ... | We noticed that your Google Cloud Project has open project firewalls |
In your root's .htaccess:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access pl... |
I ran tests on my website using Google's PageSpeed and it recommends that I "Leverage browser caching" and provided the following resource:
http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching
This resource never explains how to actually change the expiration date of my http headers. Do I... | Set HTTP Caching Expiration, Recommended by Google PageSpeed |
Write the variable to a file in jenkins. Go to the jenkins workspace and look inside the file. The token will be present in plain text there.UPDATEFurther easy way will be to print thebase64encoded value of the credential and then decode it. | I'm trying to leverage the Jenkins credentials plugin to store sensitive data which I want to inject into Secrets within my Kubernetes cluster. I have a JenkinsFile which is used in my project to define the steps and I've added the following code to pull a username/password from a credential and pass to shell script to... | Unable to see Jenkins Credentials values |
Google chrome stores cache size as a signed integer, so the maximum size is 2147483647 bytes or just under 2gb.Here is what happens when I set the cache size to 2gb, for reference.[3756:3756:0927/112842:ERROR:command_line_pref_store.cc(115)] The value 2147483648 of disk-cache-size can not be converted to integer, ignor... | I want to ask what's the maximum size of cache in Google Chrome. I tried to set 2GB by "-disk-cache-size=" in command line, but it decreased to 200 MB (checked in chrome://net-internals/#httpCache). I ultimately need 4GB or more space for cache.Firefox and IE have 1024 MB limit. Is there any limit for chrome? Why the m... | Max disk cache size in google chrome |
APC is anopcodecache:The Alternative PHP Cache (APC) is a free and open opcode cache for
PHP. Its goal is to provide a free, open, and robust framework for
caching and optimizing PHP intermediate code.This is not the same as a template cache (what you are demonstrating), and it has little impact onoutput buffering. It... | Premise: I'm not trying to reinvent the wheel, I'm just trying to understand.Output caching can be implemented easily://GetFromMyCache returns the page if it finds the file otherwise returns FALSE
if( ($page = GetFromMyCache($page_id)) !== FALSE )
{
echo $page; //sending out page from cache
exit();
}
//since we ... | PHP ob_start vs opcode APC, explain differences and real world usage? |
I assume you have done the Performance Tuning guide point 1 and 3. It's really helpful.
For number 2 you can use the CHttpCacheFilter
class CategoryController extends Controller {
private $_categoryLastUpdate;
public function filters(){
return array(
array(
'CHttpCacheFilter + view',... |
I have built classified website using Yii php framework. Now it is getting a lot of traffic. So I want to using caching to optimize the performance of the website.
There are two controllers I want to optimize.
One is the thread list controller: (example) http://www.shichengbbs.com/category/view/id/15
The other one th... | How use caching to improve the performance of a classified website? |
2
You could have used protected branches, but they are only available with private repositories for GitHub pro, not GitHub free.
One workaround is simply to create a second private repository for your friends: thy can push to it, and make pull requests to your private repos... |
I recently created a private git repository for a project with my friends but I don't want all of them to be collaborators. Can I give some of them the ability to only create pull requests and not merge them?
| Can I give different permissions in a private git repository? |
According to the documentation this can bereplacedby runningaws ecr get-login-password | docker login --username AWS --password-stdin MY-REGISTRY-URLRegarding the--no-include-emailthedocumentationstates the followingYou must specify --no-include-email if you're using Docker version 17.06 or later. The default behavior ... | Encouraged by DockerCon 2020, I'm tackling again getting a flask app running on AWS EC2, but this time I don't want to touch the AWS dashboard. I'd like to stay entirely on the command line (osx terminal).Thisfine tutorialdescribes how to build an image and run it on AWS ECR, apparently itself ultimately running behind... | New command for AWS CLI v2 to replace `aws ecr get-login` of AWS CLI v1 |
Put this annotation on superclass:@DynamoDBDocument
public abstract class Animal{
//...
} | I have 3 class:public abstract class Animal{
private String id;
private String name;
@DynamoDBHashKey(attributeName = "Id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@DynamoDBAttribute(attributeName = "Name")
public String ge... | DynamoDB inheritance no mapping parent hash |
Set your book object with correct hash key value, and use DynamoDBMapper to get the count.
DynamoDBQueryExpression<Book> queryExpression = new DynamoDBQueryExpression<Book>()
.withHashKeyValues(book);
dynamoDbMapper.count(Book.class, queryExpression);
|
I'm running a sample java program to query a dynamodb table, the table has about 90000 items but when i get the scan count from java it shows only 1994 items
ScanRequest scanRequest = new ScanRequest().withTableName(tableName);
ScanResult result = client.scan(scanRequest);
System.out.println("#items:" + result.get... | scan count returns significantly less number for a dynamodb table |
Native support for Nginx ingress controller is with a load balancer and not with app gateway. One possible approach is to create a nginx ingress controller loadbalancer as private using this linkdocs.Now add this private Ip of load balancer as the backend pool of app gateway and now your app gateway should start servin... | I have a kubernetes cluster created. According to security policies in the company, I need to have first an application gateway WAF in front that hits the cluster (which has a public IP). And as an ingress controller for this cluster I need to configure a Nginx ingress controller (also has a public IP). How can I conne... | Azure application gateway how to connect with kubernetes ingress controller (nginx) |
I guess SonarQube wants you to define two actions:ActionResult Strings(CultureInfo id);
ActionResult Strings();withpublic ActionResult Strings() {
CultureInfo cultureInfo = CultureInfo.CurrentUICulture;
return Strings(cultureInfo);
}andActionResult Strings(CultureInfo id)as before, but without the null check f... | Right now sonar qube analysis shows an error in the build as follows,and current code ispublic ActionResult Strings(CultureInfo id = null)
{
CultureInfo cultureInfo = id ?? CultureInfo.CurrentUICulture;
}so how should i modify? | Use the overloading mechanism instead of the optional parameters |
How does a fellow developer submit a pull request to the central repository owner?If everyone has publicly accessible repositories there is thegit request-pullcommand, which generates on stdout a pull request suitable for emailing to someone.If people don't have publicly accessible repositories, then email andgit forma... | Github is great! But, if you don't have access to Github or any other git server, and can't set up your own git server, then you're limited to using a central git repository on a Local Area Network (LAN) folder to collaborate with other developers on the same LAN.There are two popular git workflows as far I know:Pushin... | How to implement the fork and pull model without Github or a git server? |
nginx can forward via HTTP protocol, so just point it to the correct port and you're set:server {
location /anything {
proxy_pass http://localhost:8080/whatever;
}
} | It seems that nginx is used with php, ruby and python.Anyone has an example of how to setup nginx to work with jetty/tomcat in backend?Thanks. | How to configure nginx to work with Jetty6 webserver? |
You need to add a "?" at the end of your rewrite targetRewriteRule ^news/newsitem.asp$ http://www.example.com/blog? [R=301,L]Empty question mark at the end is important as it will discard the original query string from url.ShareFollowansweredSep 3, 2015 at 11:10Amit VermaAmit Verma41k2121 gold badges9595 silver badges1... | I am trying to redirect urls from;http://www.example.com/news/newsitem.asp?story=20130227
http://www.example.com/news/newsitem.asp?story=20148893There are other urls that I don't know so want to redirect everything from news/newsitem.asp
tohttp://www.example.com/blogI am usingRewriteRule ^news/newsitem.asp http://www.e... | htaccess redirect from multiple urls to single and remove query string |
OK, I got it. cron runs in sh, not bash, where as I discovered when I changed the first line of /tmp/get_env to 'source /home/gitwatch/.bash_aliases 2> /tmp/source_error' the 'source' command isn't defined (and all the syntax is different anyway).Adding a sh'bang '#!/bin/bash' as the first line of /tmp/get_env resolved... | I have the following in /tmp/get_env:joeuser@doghouse:> cat /tmp/get_env
source /home/joeuser/.bash_aliases
env > /tmp/joeuser.env
alias > /tmp/joeuser.alias
echo $PATH > /tmp/joeuser.pathI have the following in my user crontab:joeuser@doghouse:> crontab -l
* * * * * /tmp/get_envI can see the crontab fires correctly ... | Not seeing aliases after sourcing .bash_aliases in script called from crontab |
I would lower the idle timeout in the ELB. Clients will need to open new connections more often, but its just slightly slower than reusing an keepalive connection.Raising the keepalive to 60 in Apache would also fix the 503, but you need to be careful not to run out of connections or memory, especially with prefork mpm... | I'm getting intermittent but regular 503 errors ("Service Unavailable: Back-end server is at capacity") from a site consisting of 2 t2.medium instances behind an ELB. None are under particularly heavy load and all monitoring seems normal.The AWS docs here:http://docs.aws.amazon.com/ElasticLoadBalancing/latest/Developer... | How to solve AWS ELB/EC2 HTTP 503 with timeout settings? |
working-directory can only be applied to run: steps (e.g it does not work on actions)
The action xlui/action-maven-cli@master currently doesn't allow to inform a path to execute the maven commands.
You could either
use another (similar) action available on the Github Marketplace which allows to inform a directory pat... |
My maven repository is in ./java directory. I want to run maven test in ./java directory, but I got following error:
The goal you specified requires a project to execute but there is no POM in this directory (/github/workspace). Please verify you invoked Maven from the correct directory. -> [Help 1]
Here is my workfl... | Running github actions for `uses` in another directory |
If you are runningSELinuxon your centos EC2, try switching off SELinux and test your application again. If it's SELinux that's causing this problem, it might well be because of the policy for external connection to database. You should switch SELinux back ON and enable the policy with this command.sudo setsebool -P htt... | I have a centos EC2 with Laravel application. I also have MySQL installed on the same EC2 instance. It was working fine.Now I decieded to move MYSQL to AWS RDS (MySQL Aurora). I can connect to AWS RDS through Heidi and query with no problem.However in Laravel it throws exceptions.
I changed the .env file credentials fo... | Laravel permission denied on remote Mysql server (AWS aurora) |
1
Have you tried doing a hard refresh in the web browser with CTRL + F5 to reload all of the files and delete the cache?
Or if that isn't working, try going into developer tools in the web browser, select the Network tab and try to find the stylesheet file and check the con... |
Everytime I edit the main.css file in the assets directory, the changes do not apply to my blog post, any idea why? Please help.
| Jekyll blog site on git hub - Edits made to main.css won't apply to markdown files |
+50It looks like you have to useServer Side Authentication FlowFor server-side apps, user pool authentication is similar to that for client-side apps, except:The server-side app calls theAdminInitiateAuthAPI (instead ofInitiateAuth). This method requires AWS admin credentials. This method returns the authentication par... | I've implemented in my backend Cognito with Signup and Login, MFA activation and inactivation, but now I want to implement the remember devices, to reduce SMS confirmation.For that, I've adjusted the InitiateAuth Function to the following code:$client->initiateAuth([
'AuthFlow' => 'USER_SRP_AUTH', // REQUIRED
'AuthPara... | Handling SRP Auth and Generating Device Key (PHP - Server side) |
Compile with both modules--with-stream--with-stream_ssl_preread_moduleCreate a stream block outside http blockstream {
upstream app {
server IP1:Port;
server IP2:Port;
}
map $ssl_preread_server_name $upstream {
default app;
}
server {
listen PORT;
ssl_preread... | I am trying to implement "ssl_preread" in my nginx. My nginx is compiled with "--with-stream_ssl_preread_module" this module.I mentioned "ssl_preread on;" in server directive of nginx.conf. But i am getting below error.nginx: [emerg] "ssl_preread" directive is not allowed here in /opt/nginx/conf/nginx.conf:43I am follo... | "ssl_preread" is not working in NGINX |
The issue was due to the PHP session lock. When i used to make a certain request, PHP used to lock the session file and would release only after the request was completed.To avoid this, you may usesession_write_close(). In my case, I implemented redis session.Problem solved!!! | I have php-fpm & nginx stack installed on my server.I'm running a JS app which fires an AJAX request that internally connects to a third party service using curl. This service takes a long time to respond say approximately 150s.Now, When i connect to the same page on another browser tab, it doesn't even return the java... | Nginx PHP-FPM and curl hangs subsequent browser to server requests |
The error arose by using<<-to define the functions. Thanks to @kohske for the hint! | I have written a R package using Roxygen2 to create the help files and the NAMESPACE. When I goinstall_github("mintUser/bedarfspruefung3")I get the following output and error:* installing *source* package ‘bedarfspruefungV03’ ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building... | R: Error in namespaceExport(ns, exports) : undefined exports: |
Mounting $HOME/.aws/ into the container should work. Make sure to mount it as read-only.
It is also worth mentioning, if you have several profiles in your ~/.aws/config -- you must also provide the AWS_PROFILE=somethingsomething environment variable. E.g. via docker run -e AWS_PROFILE=xxx ... otherwise you'll get the ... |
Running the following docker command on mac works and on linux, running ubuntu cannot find the aws cli credentials. It returns the following message: Unable to locate credentials
Completed 1 part(s) with ... file(s) remaining
The command which runs an image and mounts a data volume and then copies a file from and s3 b... | docker - cannot find aws credentials in container although they exist |
Here's a quick and dirty solution that doesn't change history:
Use git revert to remove each commit from the branch.
Use git cherry-pick to reapply the commits in the order which you want.
Push these changes. This lets you change the order of the commits without changing the history.
|
I have a repository with a single (master) branch:
a > b > e > f > g > c > d
It turns out that I need the changes in c and d (two commits toward the end of the history so far) to occur earlier, so that I’d have:
a > b > c > d > e > f > g
Everything’s been pushed. I understand I’m not supposed to rebase pushed commit... | In Git, how can I reorder (changes from) pushed commits? |
npm install is unable to find the package.json file. Please make sure it exists in the root folder of your repository. (And is under version control and valid).ShareFollowansweredApr 17, 2021 at 14:53Umesh JakharUmesh Jakhar2311 silver badge55 bronze badgesAdd a comment| | I just deployed my project using firebase and now when I try to merge tomainit's giving me the following error, it would mean lots to me if someone can help me with this issue, I have been trying to figure it out for the past day without any success. this is the full error that I'm gettingRun npm i && npm run build
npm... | Trying to push Deploy to Firebase Hosting merging to main branch and giving me a Error: Process completed with exit code 254 |
The documentation for Nifi says thatit uses the data streamer API, so unless you need more control it doesn’t seem like a bad option (with the caveat that I’d never heard of Nifi before much less used it!). | The data needs to be loaded periodically (like once in a day), and it should be stored in SQL format so that the API can run SQL queries.
We are thinking of loading it from HDFS. Currently we are thinking of using Apache Nifi using PutIgniteCache.I was thinking probably I can launch a remote Ignite client node and then... | Best way to periodically load data (2-3 GB) into Apache Ignite cluster which is running on a Kubernetes cluster |
If you want to share a folder among some pods or deployments or statefulsets you should create PersistentVolumeClaim and it's access mode should be ReadeWriteMany.So here is an example of PersistentVolumeClaim which has ReadeWriteMany modeapiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:... | I want to share multiple volumes using PersistentVolume reqource of kubernetes.I want to share "/opt/*" folders in pod. But not the "/opt":kind: PersistentVolume
apiVersion: v1
metadata:
name: demo
namespace: demo-namespace
labels:
app: myApp
chart: "my-app"
name: myApp
spec:
capacity:
storage: ... | Share multiple folders in pod using persistent volumes |
Cognito Sub is generated internally by the service when the user is created.It is immutable and cannot be assigned a new value.One approach to store "sub" from the old userpool could be to store it in acustom attributeof new userpool. You can check for the custom attribute claim in the ID token to access the user data ... | A recent-ish release of AWS Cognito has now allowed for case insensitivity for username input however you can't enable it on a current User Pool and requires to create a new User Pool and then migrate the users to it...So, I've created a new user pool and have a Migration lambda working successfully but I've hit one fi... | Migrating Users from one AWS Cognito Pool to another keeping the CognitoId/Sub value |
You can use the GitHubCLI.Usegh repo createto create a repository.ShareFollowansweredJan 26, 2022 at 15:10Markus MeyerMarkus Meyer3,5211010 gold badges2525 silver badges3838 bronze badges11I think this is what I need. Thanks! I'm going to read it in detail.–jasperittleJan 26, 2022 at 16:23Add a comment| | I am new to powershell scripting and git. I am working with a code that will help to transfer bitbucket repositories to github by running a powershell script. The script works well, but I am trying to modify it so it is able to create a github repository using the name from bitbucket, instead of manually having to crea... | How to create github repo using powershell script |
Actually,NodePortcan be used to expose ports within TCP and UDP protocols. What was the problem in your case?You can consider usingNginx Ingress Controllerand creatingReplicationControllerto implementNginx ingressin order to expose your Pods across UDP port as describedHereor you can check thisLink.CreateConfigMapand s... | For my project, I need to send UDP packets to a Kubernetes Pod from an outside cluster. How can I do this?I am using Kubeadm for creating the cluster. I tried to use nodePort but it seems that my requirement cannot be fulfilled with Nodeport. | UDP send and receive in kubernetes |
I'd say the reasons for the lack of popularity for cell development are closer to:
The lack of success in the PS3 (due to many mistakes on Sony's part and strong competition from the XBOX 360)
Low manufacturing yield, high cost (partly due to low yield), and lack of affordable hardware systems other than the PS3
Deve... |
in the last times I heard lots of people claiming that the Cell processor is dead, mainly due to the following reasons:
Lack of support in the new playstation 3, as the user can not install linux
The increasing processing power of the GPU's and its costs sinking
The existence of a unified programming approach (openCL... | Death of the Cell processor |
You can attach a shared persistent volume to the build container to speed up the build process and If you are using Jenkins & kubernetes, you should definitely try out the container-based agents. Scaling your jenkins agents on kubernetes helps you from a lot of administrative overhead that you get with static build VMs... | We have setup jenkins in kubernetes cluster. In a pipeline we are calling an agent, actually this agent contains 3 containers of which 1 container can be used by next stage. But the problem is since I'm mentioning agent in every stage, each stage pulls new pod which in return increase build time, how will I rectify thi... | Jenkins Kubernetes Setup |
Create your commits on a branch, and merge the branch back into master using--no-ff.To do this retroactively, assuming you have no more commits after the user-creation commits:Create a branch (git branch user-creation) on the latest commit.Move the master branch (which I assume you already have checked out) back to the... | Is there a way to group commits in Git?? I had a story to create a user. I created, file by file and committed each file individually. And pushed it to the github repo. Now I want to group all the previous commits, say under the label "User Creation" so that I can refer to all of them all together.I don't want to colla... | Is there a way to group commits in Git? |
If you modify a PTE when it's still cached in the TLB, the effect of the modification may be unseen for a while (until the PTE gets evicted from the TLB and has to be reread from the page table).
You need to invalidate the PTE in the TLB with the invlpg (I'm assuming x86) instruction after PTE modification. And it has... |
I implemented incremental process checkpointing at page level(I just dump the data from the process address space into a file).
The approach I used is as follows. I used two system calls:
Complete Checkpoint: copy entire address space. Also if write bit
is set for a page, clear it.
Incremental checkpoint: only dump... | Cleared RW (write protect) flag for PTEs of a process in kernel yet no segmentation fault on write |
Why do we need the above update-ca-certificates in docker file ? Is it required during build time or when the image is run in a Kubernetes
container environmentIt will be needed by your container in helping decide if a certificate should be trusted. Most likely software you are running will trust certs issued by this C... | I am containerizing a dotnet core application. In the dockerfile we are copying a .p7b file using the below command. Everything works fine, but I do not truly understand what is the purpose of adding this certificateCOPY ["src/pathtocert/certnew.p7b", "."]
RUN openssl pkcs7 -print_certs -in certnew.p7b -out hostname.cr... | using update ca certificate in docker container |
7
The problem has nothing to do with nginx. The error suggests that you haven't configured a DNS record for the domain.
Share
Improve this answer
Follow
answered Sep 13, 2016 at 22:25
VBart... |
I don't know what's wrong. I don't get any warnings in logs. I've similar config to this
How to exclude specific subdomains server_name in nginx configuration
I want to create subdomain us.example.io I'm using ping to check it
ping us.example.io
ping: cannot resolve us.example.io: Unknown host
nginx.config
server {
... | Nginx subdomains not working |
The problem come from the grafana.db file. This is where your password is stored.In your local machine, install the sqlite3 packagesudo apt-get install sqlite3Login into your sql databasesudo sqlite3 /var/lib/grafana/grafana.dbReset the admin password using SQL update (the new password will be admin)sqlite> update user... | I freshly installed Grafana and I cannot login at http://localhost:3000/loginAll documentation shows that the default user/password should beadmin/adminbut I'm locked out.If I go to check into the fileC:\Program Files\GrafanaLabs\grafana\defaults.inithe values are set to:[security]
# disable creation of admin user on f... | Grafana :: Cannot login to http://localhost:3000/login |
Export the BigQuery table to a GCS bucket as new line delimitated JSONUse a Google Cloud Function triggered by GCS object changes to read the JSON file when it changesAttach a Serverless VPC connector to the Google Cloud Function so it can run a Redis client. It can then write the contends of the file to Redis.I ended ... | I'm trying to load data from BigQuery into Redis, and after going through their documentation for the last 3 days, I am turning to SO, because I found nothing concrete. So, what would be a good way to load the results of multiple queries, each about a few hundred records, from BigQuery into Redis? Are there any code sa... | Loading data from BigQuery into Redis |
2
Yeah! So you're probably going to want to separate your persistent store (Redis) from your workers. This is really well abstracted in Heroku (not saying you should necessarily use them, but their UI reflects reality very well) with Resources (not restarted between deplo... |
I have a Django app that runs on the AWS EB environment. With recent updates, I had to integrate django-rq and rqscheduler for some queue-based background tasks. This all works fine on localhost with commands rqworker and rqscheduler. But I am having real trouble finding a way to make it run on the AWS EB environment.... | django-rq and rqscheduler deployment on AWS Elastic Beanstalk |
topk(10, process_open_fds)
and on ()
sum(process_open_fds) > max(process_max_fds)*0.9andreturns the LHS, so you need it the other way around plus some grouping.ShareFollowansweredAug 9, 2019 at 17:16brian-brazilbrian-brazil32.8k66 gold badges9797 silver badges8888 bronze badges0Add a comment| | sum(process_open_fds) > bool max(process_max_fds)*0.9If the above returns true, i would like to perform topk(10, process_open_fds). How can we have this both in a single query.Tried like below - but no luck thoughsum(process_open_fds) > bool max(process_max_fds)*0.9 > 1 and topk(10, process_open_fds) | Does PromQL have ternary operator or How to query on condition? |
Make a regular dump with MySQL dump or use another specific database back-up tool. A copy of the data folder is not ok.
MySQL dump will really read the data and can be checked. It is not always true that all data is written completely to the data file and lockings give issues.
If you have a specific time of back-up ju... |
not sure its a stack overflow question
I have a Mac and am hosting a Apache MySQL server on it using MAMP Pro. If I back up my data on the time machine, is MySQL database also backed up or do I have to create mysqldump and backup up as a cron job? In case of a crash do I do a normal restore in case it can be backed up... | Backup MySQL on Apple time machine |
The issue that SonarQube is reporting is a false positive and should be ignored.SonarQube's FAQlists some options for removing false positives:False-Positive and Won't FixYou can mark individual issues as False Positive or Won't Fix through the issues interface. However, this solution doesn't work across branches - you... | I have blocker issue "Close this "ConfigurableApplicationContext"" in main methodpublic static void main(String[] args)
{
SpringApplication.run(MyApplication.class, args);
}I've tried code from SonarQube examplepublic static void main(String[] args)
{
ConfigurableApplicationContext context = null;
try
{... | SonarQube "Close this ConfigurableApplicationContext" in Spring Boot project |
I'm guessing that the problem is that the URL is being rewritten by the first rule, and then rewritten again by the second.The solution to that is to add the "last" flag to the first rule, like this:RewriteRule ^/src/pub/(.*)$ /$1 [R,L] | Given my current .htaccess file, how would I modify it to check for an additional URL path like '/src/pub/' and rewrite it to '/' without affecting the current rewrite?Here's the original .htaccess file:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.p... | How do I make mod_rewrite suppress processing more rules? |
Possible cause one: routing/firewall issuesIt happens when you create/use private cluster.To solve - add an externalIPto authorized networks.to get your externalIPaddress, you can use some ofthese commands:curl ifconfig.co
dig +short myip.opendns.com @resolver1.opendns.com
curl ifconfig.me
curl ifconfig.co
curl smart-... | I was trying to run
"kubectl get nodes" command for k8s cluster.it gives "Unable to connect to the server: dial tcp..."
this is a k8s cluster created by a different user in the company AWS account.
this is the steps I have followedexport AWS_PROFILE=RR
export KOPS_STATE_STORE=s3://s3bucketname
kops export kubecfg dev... | kops k8s cluster Kubectl commands Timeout issue |
+50What I was done in order to solve the issue in my case was to add to my sonar-project.properties file
a property named:sonar.modules="module1"This was allowed me to change the base directory of the module
with the propertymodule1.sonar.projectBaseDir=path to my base dirI also needed to changed my source and binaries... | After sonar upgrade from 3.5.1 to sonarqube 4.0, all the Soanr projects analysis become blank.I am unable to create the sonar-project.properties file on the project root folder, so instead I created linuxsoft-linkto the source code and located it on the project.properties file directory.This configuration worked perfec... | Empty analysis of projects after upgrade to sonarqube 4.0 |
5
Restarting boot2docker fixed it for me. I think it had to do with switching wifi networks using different IP ranges.
$ boot2docker restart
Share
Improve this answer
Follow
edited Jul 2, 2014 at 13:23
... |
When using boot2docker on OSX, I can't pull a new image from Docker Hub:
$ docker run mysql
Unable to find image 'mysql' locally
Pulling repository mysql
2014/06/24 16:58:18 Get https://index.docker.io/v1/repositories/mysql/images: dial tcp: read udp 192.168.0.1:53: no route to host
I can still access that URL using ... | Can't pull docker image: no route to host |
1
Just want to point out that if you're looking to load different SSM paths based on environment, you can achieve this many ways, outlined here
I've had a pleasant time loading through json files, for example
-- serverless-staging.json --
{
"ssm_path": "/path/to/staging... |
I'm trying to access secrets created in secrets manager(https://aws.amazon.com/secrets-manager/) via SSM (Systems Manager- https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html ) i.e. AWS Parameter store, and store it in a custom YAML variable in serverless.yml file?
I am t... | How can I write nested IF in serverless.yml using yaml format file while using it for cloud formation? |
Yes, you can use aliveness probeon your application container that probes your Mongo Pod/StatefulSet. You can configure it in such a way that it fails if it fails toTCP connectto your Mongo Pod/StatefulSet when Mongo crashes (Maybe check every second)Keep in mind that with this approach you will have to always start yo... | I have a web deployment and a mongoDB statefulset. The web deployment connects to the mongodb but once in a while a error may occur in the mongodb and it reboots and starts up. The connection from the web deployment to the mongodb never get restarted. Is there a way in the web deployment. If the mongodb pod restart... | How to make deployment restart if another pod restarts |
Here is a rough estimate of the memory needed, based on the constants derived from your example. At a minimum you have to figure the Python internal object overhead for each split line, plus the overhead for each string.
It estimates 9.1 GB to store the file in memory, assuming the following constants, which are off b... |
Trying to load a file into python. It's a very big file (1.5Gb), but I have the available memory and I just want to do this once (hence the use of python, I just need to sort the file one time so python was an easy choice).
My issue is that loading this file is resulting in way to much memory usage. When I've loaded ... | Why is loading this file taking so much memory? |
2
I helped build this feature into HPjmeter - but it was a platform specific feature (meaning it was only available on Itanium/HP-UX). It's useful to solve specific types of problems (e.g identifying sites that are doing heavy short term allocations and contributing to GC ... |
Is there any existing tool that can take Java heap dumps with allocation site annotations? With such a heap dump, we can aggregate runtime objects by their allocation site (roughly speaking, the new statement that creates the object), in addition to aggregation by class type.
Suppose this kind of heap dump is availabl... | allocation annotated heap dump |
It would be rather simple:
git rebase --onto paper-version master GUI
So, rebase GUI branch, discard from rebase operation revisions that are part of the history of master branch, and put rebased revisions on top of paper-version.
|
How do I merge a branch that is behind master (with new commits) into master?
| How merge a branch that is behind master |
I'm going to assume that you are not happy withcedar's ephemeral filesystemin that files gets lost every dyno reboot and are not visible cross-dyno. Accepting those constraints would obviously be the simplest solution (each dyno might have to create its own particular git repos, but that would be it).The second most st... | I've deployed a campfire bot onto heroku (sinatra app using tinder to listen to the campfire room), and I'd like to query it for the git diff between what's deployed on another heroku app and what's in our github repo. If I were doing this locally, I'd justclone the github repoAdd the heroku remoteRun agit diffwhenever... | git diff from heroku |
The particular combination of things you describe isn't possible.Remember that two Pods aren't necessarily on the same Node, but to share a network namespace they have to be on the same system. It won't be possible for distinct Pods to share a network namespace.If they need to share a network namespace, multiple conta... | I have this problem where: If I place 2 microservices, in 2 different pod, if I am facing a significant throughput drop compared to the micro-services running on the physical server localhost. But I want to autoscale the microservices independent of each other.I want the 2 micro-services to be on different pods for sca... | Is it possible to place 2 Kubernetes pods in the same network namespace? |
1
Since you made changes to a new branch (something other than master), if you want the changes in master - you need to merge them.
$ git merge V_2
When you $ git pull, it does a pull on the currently checked out branch (assuming the upstream is set correctly) unless expli... |
I created a new local branch from my master branch, named V_2. When I commit my changes and push them to origin, they get pushed to origin/V_2.
If I now checkout to my master branch and try to pull the changes it thinks that the master branch is already up-to-date as it tries to pull from origin/master.
Is there a w... | Pushing and Pulling with Git |
One of you will be able to push without any issue.The other will have an error message inviting him/her to pull first.hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integra... | I am working on an app with my partner and we are using github to sync our projects, but neither of us have used github before, and I am presented with a problem. My partner and I were synced from the last push, but we then worked on different things separately, and we now need to figure out how to merge our two versi... | Pull from GitHub without overriding certain files |
This is not possible. If you look at theAPI documentationforPodSpec v1 coreyou can see that serviceAccountName expects astringnot anarrayorobject. This is because using a ServiceAccount resource creates a 1:1 relationship between your pod andauthenticationagainst the API server.You will either need to:Diversify your wo... | I'm using Kubeless on AWS EKS. While installing Kubeless, the installation has amanifestwhich has some CRDs and a deployment object. The deployment object has already a Service Account attached. I have created anotherService Accountin thekube-systemnamespace, which has some AWS IAM roles attached. I also want to attach... | AWS EKS: Assign multiple Service Accounts to Deployment\Pod |
One way would be to add a script like this into your template before you include your main script:
<script type="text/javascript">var APP_ROOT = {{ app_root|json_encode }};</script>
(assuming you've got json_encode set up as a filter and app_root is defined as your application's root URL.)
Then your CoffeeScript code... |
I have several Flask apps running behind an Nginx reverse proxy. All requests with URLs beginning with /demo/pipeline go to a Flask instance listening on port 7001. I am setting the X-Script-Name header so that my Flask backend can account for this root URL according to http://flask.pocoo.org/snippets/35/. This lets t... | How to compensate for Nginx url rewrite in JavaScript? |
You really shouldn't use latest in production or anything beyond local machine testing/learning. It makes everything ambiguous as to which image you're using, and you can't tell in docker service ls/ps if it's current by default and all sorts of other ambiguities (like SHA's not being visible in Docker Hub's GUI).
If ... |
In the .yml definition, I'm always pulling the latest image of my service.
When I push a new image to the registry and I want to update the image that the service in my stack uses. I don't see any --pull flag, and the documentation for docker service update doesn't explicitly mentions this.
How can I re-deploy using t... | How can I update the latest image that my docker service/stack uses? |
This question should be onServer Fault. Nevertheless, the following should do the trick, assuming you're talking about TCP and the IP you want to allow is 1.2.3.4:iptables -A INPUT -p tcp --dport 8000 -s 1.2.3.4 -j ACCEPT
iptables -A INPUT -p tcp --dport 8000 -j DROP | I've never used iptables, and the documentation online seems a bit opaque.I'd like to block all requests to port 8000 on my server except those coming from a specific IP address. How do I do that using iptables? | iptables block access to port 8000 except from IP address |
The LoadBalancer type of service is implemented by adding code to the kubernetes master specific to each cloud provider. There isn't a cloud provider for Digital Ocean (supported cloud providers), so the LoadBalancer type will not be able to take advantage of Digital Ocean's Floating IPs.Instead, you should consider us... | I'm building a container cluster using CoreOs and Kubernetes on DigitalOcean, and I've seen that in order to expose a Pod to the world you have to create a Service with Type: LoadBalancer. I think this is the optimal solution so that you don't need to add external load balancer outside kubernetes like nginx or haproxy.... | Kubernetes External Load Balancer Service on DigitalOcean |
Now it is possible to run a sonar analisys on linux if you're using .NET Core 2.0 by doing the following:dotnet <path to SonarScanner.MSBuild.dll> begin /k:"project-key"
dotnet build
dotnet <path to SonarScanner.MSBuild.dll> endThere is more infohere | We build or dotnet core 1.1 projects on our own linux build agents in docker. (https://github.com/Microsoft/vsts-agent-docker) We would like to use Sonar to analyze our C# code. But it seems that the SonarQube MsBuild Scanner can't run in linux environment. Does anybody know a workaround for this. We don't really want ... | SonarQube MsBuild scanner on linux build agent |
My solution for now (although not ideal) is the following:Get the list of required status checks from the branch protection rules of the branch to which you want to make the merge on GitHub using this command:gh api repos/$OWNER/$REPO/branches/$BRANCH_NAME/protection/required_status_checks/contextsThen cross-reference ... | How do I get the status of required status checks from a GitHub pull request including checks that were not yet reported by third parties (e.g. Jenkins)?I tried to use this API to get the list of checks, but it will only show those from GitHub Actions:gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub... | How to get the status of required status checks from a GitHub pull request including checks that were not yet reported by third parties (e.g. Jenkins) |
So it seems to be possible to get around this issue with settingNODE_TLS_REJECT_UNAUTHORIZED=0inenv.local, but if anyone knows how to fix the issue rather than avoid it I'd be interested still.src:https://stackoverflow.com/a/45088585/827129 | I'm receiving the following error with certificates when trying to fetch the user from Supabase insidegetServerSidePropswith Next.js:AuthRetryableFetchError: request to https://[redacted].supabase.co/auth/v1/user failed, reason: self signed certificate in certificate chain
at [redacted]/node_modules/@supabase/gotru... | AuthRetryableFetchError: self signed certificate in certificate chain with Supabase and Next.js |
MATLAB now ships with a function just for this purpose.
The technique used is called "memoization" and the function's name is "memoize".Check out :https://www.mathworks.com/help/matlab/ref/memoize.html | I have quite a heavy function in MATLAB:function [out] = f ( in1, in2, in3)Which is called quite often with the same parameters.
The function is deterministic so for given input parameters its output will always be the same.What would be the simplest way of storing the results of computed inputs in the function such th... | Cleanest way to cache function results in MATLAB |
I'm not sure what's causing tail to randomly insert newline chars, and I'm not in a position to reproduce your issue but I do have a couple of ideas:1: base64 encode the file on the server as it's being written to, and base64 decode it as you read it on your local machine.2: Instead of writing to a file, try writing to... | I'm looking for a way to stream ("tail") a binary file on a Kubernetes pod to my local machine.I've tried this:kubectl exec -it app-service-58697cf7c9-nnzgh -c tcpdumper -- tail -f -c +0 /output.pcap(tcpdumperis just a thin wrapper aroundtcpdumpwhich runs as a helper container in the pod).Thisalmostworks. I'm able to ... | How can I tail a remote binary file? |
Because the kafka maintain a zookeeper session which remember the last zxid it has seen. So when the zookeeper sevice go down and come again, the zk's zxid begin from a smaller value. and ZKserver think the kafka has seen a bigger zxid, so it refuse it.Have a try to restart the kafka. | I have a cluster configuration using Kubernetes on GCE, I have a pod for zookeeper and other for Kafka; it was working normally until Zookeeper get crashed and restarted, and it start refusing connections from the kafka pod:Refusing session request for client/10.4.4.58:52260as it has seenzxid 0x1962630The complete refu... | Zookeeper refuses Kafka connection from an old client |
Don't add it as a label, but rather as an annotation.template:
metadata:
labels:
app: test-kube-deployment
annotations:
date: "+%H:%M:%S %d/%m/%y"PD.- You are getting the error because labels don't accept the +, % and : characters.ShareFollowansweredOct 26, 2019 at 0:56Rodrigo LozaRodrigo Loz... | I am trying to implement Kubernetes resource deployment. For this I createddeployment.yamlandservice.yamlas my Kubernetes reources. And refering the dockerhub registry image withlatesttag in mydeployment.yaml. When I am doing like this, latest image is not pulling withlatest` tag.So I added the time stamp in deployment... | Adding time stamp to Kubernetes deployment with latest tag |
Try using Netsh'sadd v4tov4(foundhereandhere) to proxy outgoing connections from the range 188.39.21.83 - 188.39.21.85 (You don't need to include 82 since it works) to go directly to the working host. Only TCP is supported though.add v4tov4listenport=[port] connectaddress=[188.39.21.82] connectport=[port] listenaddre... | I have an exe program that connects randomly to one of the 4 addresses 188.39.21.82...83...84...85 out of which only 82 worksCurrently I blocked the remaining addresses using Windows 10 Firewall outbound rules by simply blocking themMy problem is that the program will keep attempting to connect say 10-20 times (times o... | How to redirect connections by an exe file to a specific external ip address |
In Git, history is commits; commits are history. There is no such thing as "file history".
It's true that git log -- somefile.py shows you the history that affects somefile.py. But the way it does that is to look at all the commits, starting from the current one, working backwards one commit at a time. At each comm... |
My aim is to create a new github repo, containing some files from a repo that I have forked (and then effectively forked within my own github, using http://deanmalone.net/post/how-to-fork-your-own-repo-on-github/
I've found that in my repo, if I move files around so that they end up like I want them, the git history i... | Checkout a single file so that history is retained |
A simple way to include it via PHP is :1.Make sure that the Zend directory is on your phpinclude_path. Assuming Zend directory is in thelibraryfolder you'll have something like this in yourindex.phpfile:$path= array();
$path[] = '.';
$path[] = './../library';
$path[] = get_include_path();
$path= implode(PATH_SEPARATOR,... | There is a lot on the web about including ZEND, but I still don't get how to simply use it (without a skeleton) (In this case I only want to useZend\Dom\Query)I would like to:1) Simply include the complete ZEND 2.3 library in a single applicationor2) Include a single ZEND 2.3 moduleI'm using NGINX, but actually I just ... | Include ZEND framework 2.3 in application without skeleton |
Tested with a RX550 which is a low end graphics card.1-million element min() function:__kernel void test(__global float * data,__global int * index)
{
int id=get_global_id(0);
float d1=data[id];
float d2=data[id+get_global_size(0)];
float f=fmin(d1,d2);
index[id]=select( index[id+get_global_size(0)]... | I'm using OpenCL (via JOCL) to find minima in a bunch of distance calculations for ray marching. The pseudocode would look something like this:Start with a point in 3d space.
There are a number of functions to calculate distances
to that point from various other points.
These may be rather complex (transforms,... | OpenCL finding index of minimum in array |
Use Laravel cronjobs forTask Scheduling, Following tutorial will help you with cron-jobs:How to set up Cron job in Laravel | I want to sent mail or notification to user in their gmail account automatically after 1 month. Any suggestion on how to do it in laravel.For example : when user register a current date then the notification must be sent after 1 month automatically when the time reaches.I am kind of confused and little suggestion will ... | Laravel Mail: How can I sent a mail automatically to a user as a message after 1 month of time in laravel |
I ended up writing a KubernetesCronJobbacking up the etcd data. If you are interested: I wrote a blog post about it:https://labs.consol.de/kubernetes/2018/05/25/kubeadm-backup.htmlIn addition to that you may want to backup all of/etc/kubernetes/pkito avoid issues with secrets (tokens) having to be renewed.For example, ... | I set up a Kubernetes cluster with a single master node and two worker nodes usingkubeadm, and I am trying to figure out how to recover from node failure.When a worker node fails, recovery is straightforward: I create a new worker node from scratch, runkubeadm join, and everything's fine.However, I cannot figure out ho... | how to recover from master failure with kubeadm |
ssh is harder to setup than just using the username:password. Here is the line I added to requirements.txt that got it to work:-e git+https://<username>:<password>@github.com/<path to git repo>.git#egg=<package_name>If you want to get a specific tag, then you can do this:-e git+https://<username>:<password>@github.com/... | Generally, my question is about being able to access ssh keys during docker-compose build.I'm able to access my ssh keys when running docker-compose up using volume mapping in my docker-compose.yml file, looks like:services:
flask:
volumes:
- ~/.ssh:/root/.sshBut I cannot access them during dock... | Access ssh keys during docker-compose build in flask project |
Are you disposing graphics? Also, it you dispose your image like you mentioned then you would need to make sure it is taken out of the ImageList or you will cause more issues. What what format are the images?
In general when you get out of memory issues when images are involved, your issue will be either some metho... |
I'm suffering from an OutOfMemoryException when obtaining an Image from an ImageList I've been unable to find an appropriate solution to the problem.
I've got a Custom ListView control, which has attached to it an Event for the drawing of ListViewItems. This then calls a static method which is designed to draw the ite... | ImageList / Image OutOfMemoryException |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.