Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Something like this maybe?RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/index.(php|html?)
RewriteRule ^(.*)$ profile/company-profile.php?cid=$1 [NC,L] | In my page, when I write the url domain.com/abc it uses the htaccess RewriteRule ( posted below) and opens the company-profile.php page, showing the ABC profile.ABC IS AN EXAMPLE. IT MAY BE ANYTHINGHowever, even I have a domain.com/index.php file, when I write just domain.com and hit enter, it takes me to thecompany-p... | Rewrite Rule don't let me access my domain's index.php |
According to the description of Amazon S3 Backup extension, it is an upcoming paid feature:
Planned features:
* Schedule subscription-level backups to be stored in the cloud
and configure a rotation policy for old backups.
This is a paid feature.
Expect it to be released soon. The same goes for Microsoft OneDri... |
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by prog... | Unable to configure cloud storage for scheduled backup in Plesk Onyx [closed] |
0
It is possible for the problem to be related to selinux (as it was in my case today).
Try to run
setsebool httpd_can_network_connect_db on
Or if that doesn't work:
setenforce 0
Share
Follow
... |
I have a centos server running nginx + php-fpm that will not connect to an external database for the purpose of a wordpress install.
I can ssh into the webs erver and run mysql to connect to the external mysql database fine but when trying to us php to connect to the database it fails.
Where should I look to resolve t... | PHP-FPM on nginx will not connect to an external MySQL |
Don't know what Laravel auditing is, but my good guess is, your first one is a object, so you can apply your audit() method on it directly, but the second one, $scores, is a collection of objects, you surely can not directly apply a method call on it, try to iterate it, should be fine. | I'm using laravel auditing,Linkand I have use it with my controller and it was working fine, now my problem is when I apply it to another controller is does work, is it only allowed to use once? my method all the same I'm just confuse why it doesn't work.First controller code(WORKING FINE)$leads = Lead::findOrFail($id)... | Laravel Auditing BadMethodCallException Method audits does not exist |
i want to remove all files from my git repository and i will update new code at the Repository.Is that better or I have to create new fresh repositoryIt is easier to, on the GitHub website:rename the current repore-create a brand new repo (reusing the same name as the one you just renamed, if you want)clone that new re... | The goal is to delete all file from my git repository: I want to remove all files from my git repository and I will update new code at the Repository.How would I do that, knowing I am usingsourcetreewindows app? | Delete all files from git repository using Sourcetree |
Container runtimes are architecture aware & container registries support defining images for multiple architectures. Docker automatically pulls the correct image for the platform it's running on.https://blog.docker.com/2017/09/docker-official-images-now-multi-platform/ | Runningdocker run -it -v $PWD:/tmp k8s.gcr.io/kube-proxy:v1.15.1 cp /usr/local/bin/kube-proxy /tmp
file kube-proxygives a different result depending on which architecture I am on e.g. on CoreOSContainer Linux by CoreOS stable (2135.5.0)
core@node1 ~ $ file kube-proxy
kube-proxy: ELF 64-bit LSB executable, x86-64, versi... | Why does the k8s.gcr.io/kube-proxy Docker image 'work' on multiple architectures? |
Once PVC/PV are created (https://kubernetes.io/docs/concepts/storage/persistent-volumes/), there are number of possible solutions.For specific question, options 1 and 2 will suffice. Listing more for reference, however this list does not try to be complete.Simplest and native,kubectl cp:https://kubernetes.io/docs/refer... | I want to add or copy files into persistent volume and then use it in container using volume mount ?any help | Copy files in persistent volume kubernetes |
+50By default, the DirectoryIndex is set to:DirectoryIndex index.html index.htm default.htm index.php index.php3 index.phtml index.php5 index.shtml mwindex.phtmlApache will look for each of the above files, in order, and serve the first one it finds when a visitor requests just a directory. If the webserver finds no fi... | I have the following line in my .htaccess file:DirectoryIndex index.html index.phpEverytime I go to index.php it takes me to index.html. Is it possible to allow for both, but leave index.html the default for users visiting www.domain.com? | Make index.html default, but allow index.php to be visited if typed in |
Gists can be embedded with JavaScript:
You can embed a gist in any text field that supports Javascript, such as a blog post. To get the embed code, click the clipboard icon next to the Embed URL of a gist.
Paste the <script> tag copied from the Gist into a web page hosted on your server, e.g.
<!DOCTYPE html>
<html>... |
I have created a "todo" Gist using GitHub Flavored Markdown on GitHub. Is there any way to host it on my online DigitalOcean server?
| How to host my github-flavored-markdown gist as a webpage |
The short answer - yes, there is.You can add a block inside a fence marked with "suggestion":```suggestion
throw new Exception("awesome!");
```This will create a suggestion with code that can be applied automatically:For additional details, see GitHub's documentation aboutcommenting on a pull requestandincorporating fe... | Is there a commonly used way to add small edits as code suggestions that the author of a PR can either accept or decline? Something similar to the way a Google Doc allows you to "Suggest Edits"I'd like to speed up code reviews, and I think this would be a great teaching tool. | Is there a way to suggest edits to a PR? |
I can not understand how do we associate an instance of an object with the pressure it adds.
The instance of the object associates the pressure it adds with a reference to itself by calling AddMemoryPressure. The object already has identity with itself! The code which adds and removes the pressure knows what this i... |
What mechanisms of the C# language are used in order to pass an instance of an object to the GC.AddMemoryPressure method?
I met the following code sample in the CLR via C# book:
private sealed class BigNativeResource {
private readonly Int32 m_size;
public BigNativeResource(Int32 size) {
m_size = size;... | What mechanisms of the C# language are used in order to pass an instance of an object to the `GC.AddMemoryPressure` method? |
I've setup a PTR record for my EC2 instance following this articleYou can't use these instructions for IP addresses owned/controlled by AWS. The only AWS-allocated public IP addresses that are configurable with custom reverse-DNS are elastic IP addresses, and a different process applies (from the same document) --If y... | I've setup a PTR record for my EC2 instance following this article:https://aws.amazon.com/premiumsupport/knowledge-center/route-53-reverse-dns/. but when I test the rDNS with a tool like dig it keeps giving me the xxx.compute.amazonaws.com domain as a result. I have waited several times the refresh time and performed t... | PTR record for EC2 instance (without elastic ip) not propagating |
__init__, unlike __new__, doesn't deal with memory references at all. self is already a valid object produced by __new__ which __init__ initializes.
You can do it the other way round for clarity:
class Person:
def __init__(self, name: str, age: int):
# Signal to whoever will read your code
# tha... |
Reusing the __init__ method to change attributes' values
Python 3.10 on Windows 64bit
Let's say I have a class that has an update method which calls the __init__ method.
The update method is created to avoid multiple line assignments of the attributes.
class Person:
def __init__(self, name: str, age: int):
... | Updating an instance of an object with the __init__ method |
It could be because the new committed image has lost itsCMDdirective that was present inrocker-org/rocker/rstudio/Dockerfile#L58.CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d /supervisord.conf"]Try and create a new Dockerfile:FROM michael91/ms:v1
## Add RStudio binaries to PATH
ENV PATH /usr/lib/rstudio-se... | I'm trying to use Rstudio on a DigitalOcean server using theRstudio docker. Since my experience with linux servers is limited, it's been a bit of a challenge for me.I'm able to get Rstudio up and running with:docker run -dp 8787:8787 -v /root:/home/rstudio/ -e ROOT=TRUE rocker/hadleyverseHowever, I'd like to be able to... | Installing packages for Rstudio Docker |
Have you tried rdocker? It seems to do exactly what you are looking for. Cheers
|
I want to use docker machine with a remote server docker daemon through ssh so no need to open 2376 port in the remote server.
Local Host:
$ docker-machine create --driver generic --generic-ip-address
[IP_Address] --generic-engine-port 2376 --generic-ssh-key
~/.ssh/id_rsa --generic-ssh-user root [Host]
Remote host:... | Docker-machine access to remote docker daemon through ssh tunneling |
... However, the code on the server was not cloned from the repo, does not have a .git file, and is different from the code in the repository
What I would like to do is add the production code to the existing repo as a new branch.
Its pretty simple.
On your server inside your code folder make it a git project
# conv... |
I recently took over a project which has a Git repository hosted on GitHub and is running on a production server.
However, the code on the server was not cloned from the repo, does not have a .git file, and is different from the code in the repository.
What I would like to do is add the production code to the existing... | Add different copy of codebase to existing git repository |
I must set limits because I must pay for my usage to the cloud provider.In such a case, I would recommend you to useVertical-Pod-AutoScaleralong with aLimit Range.ALimitRangeprovides constraints that can:Enforce minimum and maximum compute resources usage per Pod or Container in a namespace.And the VPA will try to cap ... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | How to share a CPU quota among multiple containers? [closed] |
In your location block:
location /ds {
rewrite ^/ds/(.*)$ /$1 break;
...
proxy_pass ...
}
URIs which begin with /ds/ will match the regular expression and be rewritten without the initial /ds. However, the URI /ds does not match the regular expression and will be passed to the upstream application as /d... |
I have a strange problem with using a nginx as a reverse proxy for my Zeppelin instance. I will try to describe the problem below.
I am using an EC2 instance as the reverse proxy to access the Zeppelin instance. Just a note in front of that is an AWS ALB sitting as "forward proxy", this way I can use a friendly URL's... | Nginx location without trailing slash works only with trailing slash |
I solved the problem as follows:For those who have admin rights on a PC, there is a working solution for auto-selecting a certificate:for MAC enter in terminal
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '"pattern":"your_url","filter":{"ISSUER":{"CN":"certificate name"}}}'In Windo... | I am writing autotests using Maven+Selenium+JUnitxz.
During UI testing, I can't configure certificate auto-selection so as not to click on the window manually.I have already tried ChromeOptions and ignoring the certificate, it is not working.
I found a suggestion for creating a file /Library/Preferences/com.google.Chro... | Selenium testing JAVA - I can't configure certificate auto-selection for a specific URL when opening ChromeDriver on MAC |
With regular expressions, * means any numberof the previous atom, which will match /docs and /docs/. Try this:RewriteEngine on
RewriteRule ^docs$ http://www.domain.com/ [R=301,L,QSA]
RewriteRule ^docs/(.*) http://www.domain.com/$1 [R=301,L,QSA](QSAis query string append, so/docs/foo?bar=bazwon't lose the?bar=baz.) | I want accesses to e.g. www.thisdomain.com/docs/path1/path2 to redirect to www.thatdomain.com/path1/path2(Note that docs is not a part of the new path)I have the following on www.thisdomain.com:RewriteEngine on
RewriteRule ^docs/* http://www.domain.com/ [R=301,L]If I access www.thisdomain.com/docs, it directs to www.t... | .htaccess 301 redirect path and all child-paths |
You should try with Variables="{KeyName1=string,KeyName2=string}"
|
I am trying to use environment variables for my lambda but when I run the following Lambda AWS CLI create-function command from a gradle task that runs a shell script,
aws $PROFILESTR lambda create-function \
--region us-east-1 \
--function-name MyLambda \
--zip-file fileb://$ZIP \
--role arn:aws:iam::$AWS_ACCT_ID:rol... | AWS lambda create-function accepts only one environment variable |
Check following things:Do you really have permission to push (if the repository is not read only)Do you really copied the right public key to the server, there is no unnecessary spaces or newlines | So I'm trying to push a file to GitHub and I'm getting this error:sh-3.2# git push -u origin master
SecGenericPasswordCreate failed
Enter passphrase for key '/var/root/.ssh/id_rsa':
Connection closed by 207.97.227.239
fatal: The remote end hung up unexpectedlyI have already setup a public key... but when I try to push... | Git error on push |
I expect the problem is right here:mysite.com:tmp/$USER--tmp/is a relative path, relative to the current working directory. When your code is executed viacrond(8), yourcwdmight be different than when you execute it by hand.As@netcoder points out in his comment, absolute paths are the best way to work with scripts / pro... | Edit: Updated to reflect some answersI have this script, test.sh on my home computer:Note: $USER = john#!/bin/bash
/usr/bin/scp -q[email protected]:/home/$USER/tmp/$USER /home/$USER/tmp/ > /dev/null 2>&1
error_code="$?"
if [ "$error_code" != "0" ]; then #if file NOT present on mysite then:
echo "File does ... | script behaves differently via cron |
What version of Az.Accounts is being loaded? If it is 2.0.0-preview the DevOps task will fail.
You can check for it using Get-InstalledModule Az.Accounts -AllVersions
If it is the case use:
Uninstall-Module -Name Az.Accounts -RequiredVersion 2.0.0-preview -AllowPrerelease
to remove the preview then add the current ... |
I install PowerShell and Az module in container based on ubuntu:16.04
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update -y && \
... | "Could not find the module Az.Accounts with given version" error when running Azure DevOps job in Docker |
The events can be listed using the following snippet. You can then process the pod events as needed.label := ""
for k := range pod.GetLabels() {
label = k
break
}
watch, err := clientset.CoreV1().Pods(namespace).Watch(metav1.ListOptions{
LabelSelector: label,
})
if err != nil {
log.Fatal(err.Error())
}
... | I am creating a pod in k8 client go and making a watch to get notified for when the pod has completed so that i can read the logs of the pod. The watch interface doesnt seem to provide any events on the channel. Here is the code, how would I get notified that the pod status is now completed and is ready to read the log... | Watch kubernetes pod status to be completed in client-go |
If you already have createda gitHub repository and installed git on your computer, you have to start the command prompt in your project directory in eclipse workspace and type:$ git initThen you'll need to get the correct URL for your repository on GitHub and type:$ git remote add origin https://github.com/[username]/[... | I really need to upload a project to GitHub to Eclipse in the next five minutes.
I right click on the project and go to "Team", but none of the options are "Commit".Thanks,
Lucas | Push project to Git not working? |
I think this does do what you want;http://codesanity.net/2009/11/conditional-htpasswd-multienvironment-setups/http://tomschlick.com/2009/11/08/conditional-htpasswd-multi-environments/https://tomschlick.com/2009/11/08/conditional-htpasswd-multi-environmentsCorrect address for the resource as of 2022/01/15.https://tomsch... | I'm sure this is possible, but its beyond my meager abilities with .htaccess files.We have an internal php app that we use, we have basic security internally, but dont need to worry too much. I would like to make it available online for use when staff are out and about. I would like to have additional security based ... | Use .htaccess to restrict external access to my Intranet |
this project on github provides a template for what i'm trying to do which works fine:
https://github.com/cagataygurturk/aws-lambda-java-boilerplate
|
when code is executed in amazon aws lambda, my @autowired spring dependencies are null. Makes sense if there is no context being loaded, but i thought SpringBeanAutowiringSupport would help. How do you inject dependencies correctly in amazon lambda?
This is my code that has null autowired fields but otherwise works ... | aws lambda function with spring autowired dependencies |
9
I don't think it is possible to do what you want to do with the current version (1.0.9.2) but here is what I do to work on two branches.
Clone the two branches from the Git Shell
git clone https://your-project/master/ master
git clone https://your-project/gh-pages/ gh-pa... |
I sometimes need to have two different branches of a GitHub repo on my local disk at the same time. (especially when dealing with gh-pages)
I usually do this by making multiple clones of the repo in different folder, with clone using a different branch.
Is it possible to do this in the GitHub for Windows UI? (as oppo... | Cloning Multiple Branches in GitHub for Windows |
Try go to your scm site "https://{site name}.scm.azurewebsites.net"Debug Console -> Navigate to D:\home\site\deploymentsEdit settings.xml and change to your desire branch.<?xml version="1.0" encoding="utf-8"?>
<settings>
<deployment>
<add key="branch" value="master" />
</deployment>
</settings> | I have a webapp on Azure that is connected to github to do continuous deployment. Is there any quick way to change the branch it is connected to or I have to disconnect and then connect again to select the new branch?The problem is that Azure has a bug somewhere that when I disconnect I can only connect again without a... | Azure: quickly change branch used on continuous deployment (github) |
It was a simple solution. I had to update my ruby to the most current version. I was running ruby 2.3.3. I updated to ruby 2.5.3. This resolved the issue for me.ShareFollowansweredNov 4, 2018 at 20:24Edwin Jovany HerreraEdwin Jovany Herrera1311 bronze badgeAdd a comment| | I am using the geocoder gem on my rails web application to get the latitude and longitude of addresses. Every time I create a new Employee I want to get the latitude and longitude from the address inserted. Every time I attempt to great an employee or update I get the following error.SSL_connect returned=1 errno=0 stat... | Geocoder gives certificate verify failed error |
It was far more simple than I thought. I just added that to the .i file
%typemap(freearg) uint8_t * {
//cout << "Freeing uint8_t*!!! " << endl;
if ($1) delete[]($1);
}
Seems to work.
Edit: switched free with delete[]
|
I am trying to fix a memory leak in a Python wrapper for a C++ dll.
The problem is when assigning a byte buffer to a helper object that has been created in Python:
struct ByteBuffer
{
int length;
uint8_t * dataBuf;
};
I want to supply the dataBuf as a Python array, so the typemap that I came up with (a... | Memory deallocation from SWIG typemap |
Use Docker's multi-stage builds. This mechanism allows you to drop intermediate artifacts and therefore achieve a lightweight image.
Example:
FROM alpine:latest as build
# copy large file
# build
FROM alpine:latest as output
# copy necessary files built in the previous stage
COPY --from=build app /app
Anything built... |
I have a big tar/executable (over 30GB) I COPY/ADD it but this is used only for the installation. Once the application is installed I don't need it anymore.
How can I do? I am trying to use it but:
Everytime I run a build, it takes minutes to define the build context.
I'd like to share this image, if I create a tar w... | How to use big file only to build the container without adding it? |
It depends on what you want - there's no simple answer for what you're looking for.
The options I see are:
Everything in one container: You copy all of the WAR files/directories into the container when you build your image and then start that. That means that you only have to worry about a single command to start/sto... |
I have a java application which currently runs inside of a tomcat instance. This application has like 3-6 (depending on the use) webapps. I would like to pack this application into a docker container to setup a new test system infrastructure.
What would be the best strategy to do that? Pack every webapp into a tomcat... | Docker: Dockerize Tomcat application - Best practise |
In order to view your project files as static webpage, you should store your files not in defaultmasterbranch but ingh-pagesbranch.
You can create this branch using multiple methods but in order to find out the convenient one, you can use thisGitHub Pageslink.Basically, let's assume that you already havemasterbranch. I... | I am trying to see a static html file. My github url isanuragasaurus.github.ioand my repo name isjs-playground, it contains aindex.htmlfile.
I am trying to openanuragasaurus.github.io/js-playground/index.htmlbut it's showing 404.Can anybody tell me how can I accessindex.htmlfile in myjs-playgroundrepo. | index.html in github repo not opening |
I can't use -v because this container will be used as a build step in a CI/CD pipeline and as I understand it, it is just run as is.Using-vto expose your current directory is the only way to make that.deploy/mup.jsfile inside your container, unless you are baking it into the image itself using aCOPYdirective in yourDoc... | I would like to run this command:docker run docker-mup deploy --config .deploy/mup.jswheredocker-mupis the name the image, anddeploy,--config,.deploy/mup.jsare argumentsMy question: how to mount a volume such that.deploy/mup.jsis understood as the relative path on the host from where thedocker runcommand is run?I tried... | Docker how to pass a relative path as an argument |
The important thing to realize about git diff A B is that it only ever shows you the difference between the states of the tree between exactly two points in the commit graph - it doesn't care about the history. The .. and ... notations used for git diff have the following meanings:
So when you run git diff master fe... |
I want to see the difference between the master branch and my feature branch. I have many pulls from the master to my feature branch and want to see the changes that would be added if I merged my feature into the master.
This is my situation:
-*--*--*-----*<master>
\ \ \
1--*--*--*--2--*<feature>
My prob... | 'git diff' doesn't show enough |
Update: this should no longer be necessary becauseAuthorize.net has updated its production servers' certificates.You may have found this to stop working all of a sudden because the Ubuntu ca-certificates package just dropped support for them in the most recent update:http://changelogs.ubuntu.com/changelogs/pool/main/c/... | The URL for transactions with authorize.net ishttps://secure.authorize.net/gateway/transact.dll. If we visit this URL and inspect the certificate, we can see that it is signed by the intermediary certificate with CN = Entrust Certification Authority - L1E , valid to 10 décembre 2019 17:25:43. However, if you visit the... | How comes authorize.net uses a certificate that is signed with a CA that is not in the well known curl.haxx.se/ca/cacert.pem list? |
A little late on this answer, but I encountered this issue myself and finally tracked down that the revert behaves weirdly in that the original commit being reverted is still in the history, so when you go to create a new PR it still thinks it is in there so you see no difference when doing the diff.ThisStackOverflow a... | I have reverted a pull request from GitHub by following this articlehttps://help.github.com/articles/reverting-a-pull-request/. Now even after reverting when I am comparing the two branch it shows same. How can I raise a pull request again?Here is what I didI raised a pull request fromprod_bug_fixbranch torelease/13.0.... | Reverted a pull request from github but both branch shows no difference |
Can anyone please help me how to deploy this webapp to azure with these certificates?If you want to install these certificates under the CurrentUser. You couldupload the .pfx to the Azure WebAppfrom Azure portal and add an app setting calledWEBSITE_LOAD_CERTIFICATESAdd an app setting called WEBSITE_LOAD_CERTIFICATES a... | I have c# asp.net 4.5 identityserver v3 web application. I am using this as my authorization server. I am using the default sample signing certificates as mentioned inDefault Signing CertificatesNow i want to deploy this in to azure. I am a newbie to this azure hosting.Can anyone please help me how to deploy this webap... | How to deploy asp.net 4.5 identity server application to azure with signing certificates |
-2Edit the file/usr/local/lib/python2.7/dist-packages/oslo_vmware/service.pyat line 141.comment out the line sayingself.verify = cacert if cacert else not insecureand add one extra lineself.verify = Falsei.e#self.verify = cacert if cacert else not insecure
self.verify = Falseand re run the n-cpu again.Or execute./unsta... | I am trying to install openstack and ovsVapp in my server. Everything goes well during initial stage. Later got an error in n-cpu saying SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed.And one more error saying in n-cpu/usr/local/bin/nova-compute --confi... | SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed |
One of the answers to this question solved my problem. Here it is with a few edits:
I found a solution
Open Windows Network Connections
Right click on VirtualBox Host only adapter that was created
Choose properties
Check "VirtualBox NDIS6 Bridged Networking driver"
Disable and Enable the highlighted item
For me "... |
I've tried several times to start the Docker VM via the Docker Quickstart Terminal. After deleting the default virtual machine in VirtualBox I receive the following output
Creating Machine default...
Running pre-create checks...
Creating machine...
(default) OUT | Creating VirtualBox VM...
(default) OUT | Creating SSH... | Docker Quickstart Terminal fails to start VirtualBox VM in Windows 10 |
This one regex may helppreg_replace("/testblog1\.php\?id=\d*&title=/", "$1", $input_lines);Sohttp://www.eyecatchers.co/testblog1.php?id=123&title=your-titlegoes ashttp://www.eyecatchers.co/your-title | I want to remove id from URL and rewrite it with domain followed by title name only for SEO-frendly URL.http://www.eyecatchers.co/testblog1.php?id=110&title=6-Benefits-of-Hiring-a-Digital-Marketing-Agency.This is my current URL and I want to rewrite it through.htaccessto following URLhttp://www.eyecatchers.co/6-Benefit... | How to remove id and title from url and rewrite it with domain followed by title name only? |
I was in deep conversations with AWS SES support regarding this issue. This is the outcome:I also would like to update you that SES internal team were able to confirm a deliverability issue with the recipient ISP and are actively working towards a resolution but we do not have an exact ETA at this time. Due to the natu... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be about programming within the scope defined in thehelp center.Closed3 years ago.Improve this questionI am using AWS SES to send out emails automatically through my application.
I have co... | AWS SES 554-No SMTP Service for web.de and GMX email addresses [closed] |
Okay! So the problem was, I think, related tothis bug. It seems that even though apparmor wasn't configured to prevent access to sockets inside the containers it was actually doing something to prevent reading from them (though not creation...) so turning off apparmor for the container (following these instructions) wo... | I have a flask app running under uWSGI behind nginx.*1 readv() failed (13: Permission denied) while reading upstream, client: 10.0.3.1, server: , request: "GET /some/path/constants.js HTTP/1.1", upstream: "uwsgi://unix:/var/uwsgi.sock:", host: "dev.myhost.com"The permissions on the socket are okay (666, and set to the ... | nginx permission denied while reading upstream - even when run as root |
I don't know how to share UTS namespace between containers. But, if your final aim is just to sharehostnamebetween containers, next should work if you not care about network share:shubuntu1@shubuntu1:~$ docker run -idt --name container1 ubuntu:18.04 /bin/bash
3b024de861049c63852e5b196b8730c23ccba8454eb894aa1159c046dd35... | Docker run command by default uses a dedicated UTS namespace for the container and because of it the container gets its own/unique hostname. I am trying to share the UTS namespace between two containers but it seems that it is not possible with docker run command.Following are the commands that I ran -docker run -d --n... | Docker run - how to share UTS namespace between containers? |
0
Your code is just fine.
RealityKit has a huge memory footprint that will be left there.
There is a small room for improvement tho.
First if your code is in UIKit, you should add the following:
func removingView() {
self.arView?.session.pause() // there's no... |
I am using RealityKit to generate mesh after a particular time interval and adding it as child to the root node. Before creating another mesh I am removing the previously created Entity from parent node also assigning plainCard = nil to it.
Below is the sample code:
import RealityKit
import Combine
import SceneKit
pr... | Possible memory leak while creating mesh |
You can use RAII type instead or avoid allocation:
static char cArr[10];
static auto cArr2 = std::make_unique<char[]>(10);
|
I have little question about c++
how can I destruct this code without memory leak?
void classA::funcA()
{
static char* cArr = new char[10];
}
just don't write like this style?
| c++ destruct staic variable in function with memory allocation |
12
Looks like the original push-to-deploy feature is now deprecated, but you can use Google Cloud Platform's Build Trigger to do this:
Navigate to Google Cloud Platform > Container Registry > Build Triggers and set up the branch(es) you want to auto build from your connec... |
I'm learning how to use Google App Engine and I can deploy fine via terminal but I want to allow people to contribute to my github repo and anything they publish will update my app. Here is my repo:
https://github.com/rajtastic/roshanissuperveryawesome
I've sync'd my repo to app engine and I can see the contents in my... | Deploy to Google App Engine via a GitHub Repo |
The metricjvm_memory_max_bytesshows:The maximum amount of memory in bytes that can be used for memory management.So the value will not change according to its consumption but rather on how much memory is available.If you are trying to get how much memory has been used, you need to use the metric:jvm_memory_used_bytes.Y... | I have micrometer-prometheus jvm metrics monitoring configured for my spring boot application, which is deployed in kubernetes pods. There are 2 pods.When I run queryavg(jvm_memory_max_bytes), I see graph hovering mostly around 400mb value. When I runsum(jvm_memory_max_bytes), graph jumps up to 10gb value.Is this much ... | Promotheus: discrepancy in sum vs avg |
It's been solved, I addedHttpRuntime targetFramework="4.5undersystem.webtagand it worked.I figure it out when looking into Event Viewer.ShareFolloweditedJun 20, 2020 at 9:12CommunityBot111 silver badgeansweredNov 17, 2014 at 7:06chenchen15111 gold badge11 silver badge1111 bronze badges2unmatched quotes. and please expl... | I'm trying to use Websocket over HTTPS. Or just even get a Websocket handshake and connection without HTTPS with no success.I'm using Windows 8.1 Pro and installed the Websocket protocol.
I've created a web application in IIS with a self signed certificate.When I'm running my website and invoking the connect websocket ... | WebSocket over HTTPS |
I'm pretty certain it just means that a task takes two clocks in unit 0 the second time through. The fact that it takes seven clocks in total alludes to this, 1 in unit0, 1 in unit1, 1 in unit2, 1 in unit3, 2 more in unit0 and finally 1 in unit4.It may well just be a contrived example so that there was a conflict when ... | In the image below, why does task X, appear two times for unit 0 at clock cycles 4 and 5?have to make a program for the arrangement of the pipeline, but I need to know why the above happens to complete it.Is it just because the author wants it to repeat?? | Why does task X, appear two times for unit 0 at clock cycles 4 and 5? |
Could you try this;#!/bin/sh
FILE=/home/username/public_html/backup_dir/my_db.sql.$(date +"%Y%m%d")
DATABASE=db_name
USER=db_username
PASS=db_password
unalias rm 2> /dev/null
rm ${FILE} 2> /dev/null
rm ${FILE}.gz 2> /dev/null
mysqldump --opt --user=${USER} --password=${PASS} ${DATABASE} > ${FILE}
gzip $FILE
ec... | I have a shell script which is (stored in/home/username/public_html/backup_dir/db_backup.sh) used to take a database backup.When I'm running the shell script in myshared hostingthrough putty by going to the directory/home/username/public_html/backup_dir/and then running the script through commandsh db_backup.shit is cr... | how to set path for cron backup zip file |
This is a typical nginx configuration for PHP-FPM.server {
root /app/html;
location / {
try_files $uri $uri/ /api/index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_... | InapacheI have an.htaccessthat will rewrite fromhttp://server/api/any/path/i/wanttohttp://server/api/index.phpif no file or folder is found.Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond... | Catch-all should pass path to index.php in nginx |
When you use Firebase Hosting on top of Cloud Functions for Firebase, Hosting can act as an edge-cached layer on top of the responses from your HTTPS functions. You can read about that integration in the documentation. In particular, read the section managing cache behavior:
The main tool you'll use to manage cache... |
Let's say I have a database of 100,000 pieces of content inside of firestore. Each piece of content is unlikely to change more than once per month. My single page app, using firebase hosting, uses a function to retrieve the content from firestore, render it to HTML, and return it to the browser.
It's a waste of my fi... | Can Firebase Hosting Serve Cached Data from Cloud Functions? |
You can use a before_filter in your controller and then redirect appropriately. For example:class UserSessionsController < ApplicationController
before_filter :ensure_proper_subdomain, :only => "new"
def ensure_proper_subdomain
if request.host_with_port != 'admin.porkjerkyicedcream'
redirect_to params.me... | I have a couple of sub-domains on my rails app, and the main domain too.Lets say I have a login route like this:match "login", :controller => "user_sessions", :action => "new"Now this route can be accessed on all domains and sub-domains, e.g. :porkjerkyicedcream.com/loginand...admin.porkjerkyicedcream.com/loginMy quest... | Ruby on Rails routing, how do you force a subdomain / domain changed |
Usually when they talk about Etags varying across servers it's in relation to static connect served up by Apache. By default Apache includes the file's inode in the Etag. If the files are not on a shared resource (like a NFS exported NAS), then the file's inode would be different on each server. Typically, the recomm... |
I gathered from the much famed scaling rails screencasts that at some point when your site gets big and bigger, proxy caching is the way to go. Proxy caching uses etag, among other things and since etags can be more specific and strong validator is perhaps the way to go. However, I also hear that in server farm scena... | etags and server farm |
I used native SQL, parsed timestamp to SQL timestamp then found number off seconds since 1970 using DATEDIFF ( datepart , startdate , enddate ). Added number of seconds since year 0. I lose millisecond part, but i guess this is the next best thing. | I am currently trying to read a large table from an compact ce database containing aprox 3-4 million rows. The database size i currently 832MB.
Populating a list with the records is throwingOutOfMemoryExceptionThe mockup code:using (var con = new DomainContext())
{
foreach (var item in con.logRecords)
... | C# DbDataReader populating List result in OutOfMemoryException |
1
This error is referenced with several scientific Python projects https://github.com/scikit-learn/scikit-learn/issues/7542 https://github.com/automl/auto-sklearn/issues/101 and is apparently related to multiple installations of NumPy, Cython or different C++ compilers.
Now... |
I have cythonised a chunk of code, which I know works on my usual machine.
However, when I transfer it and run it on another machine it is not working. My machine is running Ubuntu and the other machine is running Ubuntu within Docker.
The error is:
from myFile import myFunction
ImportError: /myFile.so: undefined ... | Importing .so file made with Cython results in ImportError: ... undefined symbol |
docker infocommand is running insidejava:8based container which will not have docker installed/available in it.ShareFollowansweredAug 4, 2016 at 21:18VanagaSVanagaS3,41044 gold badges3030 silver badges4343 bronze badges2Thanks, it makes sense. Is it possible to have a stage with sbt and docker available at the same tim... | I am having difficulties with enabling docker for build job. This is how gitlab ci config file looks like:image: docker:latest
services:
- docker:dind
stages:
- build
build:
image: java:8
stage: build
script:
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com/...... | Enable docker for gitlab ci community edition |
First of all, not everybody uses Eclipse (even in the same team), and different IDEs could produce slightly different artifacts (JAR files).
One advantage of Maven is that it does not only build projects:
it prones convention over configuration, and suggests a "standard" layout for projects
it allows gathering all th... |
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be imp... | difference between building project using maven and eclipse export as Jar [closed] |
Just add to your crontab* * * * * for i in {0..59}; do curl http://your.domain.zone/page.html && sleep 1; done;foradded because cron could not run faster than once per minute. | i have a script which i am running from browser with meta refresh and it workd without any issue in browser but it will not work in cron so what i can do to run every second from cron?
i know with sleep i can but i have to create several cron tab in cron job and every time i have to run the scriptwith sleep how can i r... | running a script from cron every second |
Edit: It works after 48 hours with prefixsigned_. Just that AWS takes a bit more time is all. | I want to delete the previous versions of files in an S3 bucket that are not in a folder but directly uploaded in a bucket and also with a specific prefix.
Eg. Some S3 keys are like:signed_2020_04_15.pdfsigned_2020_04_17.pdfunsigned_2020_04_15.pdfunsigned_2020_04_17.pdfinfo/signed_2020_04_16.pdfinfo/unsigned_2020_04_16... | AWS S3 Lifecycle Expiration Prefix Rule |
1
There are multiple ways to achieve this, depending on your needs:
method 1
Use _find by making a POST request to /db/_find and select the fields you want
curl -X POST -d '{"fields": ["name", "family", "dob", "phone", "address", "SID"]}' http://IP:5984/mydb/_find
The pa... |
To begin with, I am new to couchdb and new to databases in general.I have a couchdb instance setup in a docker container. I have another docker container in the same box that has some nodeJS code that is talking to this couchdb instance.
Now, I am doing basic stuff like adding an entry and getting an entry from the db... | couchdb in docker container: how to remove id from output |
If you know the username you can go tohttps://gist.github.com/username/and then search through them, but that only works if it's not an anonymously posted or private gist. There's not a nice way to get to a Gist unless you've got the link if you don't know who posted it.In your case, the Gist is available as the first ... | Is there a way to find a Gist from the name (or description)?I was watching a YouTube video discussion and one of the participants brought up a Gist. It was too small to read on the video, but the name at the top was clear (dhh/test_induced_design_damage.rb); however, I wasn't able to use that name to find the Gist. ... | how to search for gist by name |
Git is an awesome tool, here are some tips that should help you.
This will list all branches that exist. Any that are prefixed with origin/ are on the server and you will need to fetch them.
git branch -a
Run the following to get a remote branch
git checkout BRANCH_NAME
git pull origin BRANCH_NAME
Checkout is what ... |
I'm new to Github. I just cloned a repository, and I believe that when I clone it, all of its branches are copied as well. All I want to do is switch from one branch to another, in the order of the branches. I mainly just want to be able to run my code at each branch, and then switch to the next branch soon after. Bas... | Github switch from one branch to another after cloning repository |
In case of docker volumes, you don't have control over where docker saves it's volumes. all you can do is just to change docker root directory. so it's better to mount your new partition under a directory and then change docker root directory to this mount point. this way you can achieve what you want. also you should ... | I have a Docker container running on my PC. The main functionality of the container is to scrape data, and this accumulates 0.3GB/day. I'll only be needing this data for the last 30 days, and after this I plan to store it archived on Hard Disk Drives for historical purposes. However after few hours of trials and error... | Docker Named Volume on another Partition on another hard drive |
In order for the browser to resolve this custom name, you will need to add an alias to your/etc/hosts file. It probably already contains a line about 127.0.0.1, in which case you just add your alias to the list127.0.0.1 localhost localhost.localdomain myappnameYou can then change the server name in the app's config to... | Currently, my flask app runs locally on:http://localhost:5000/some_pageHow could I create a local custom location for my app like:http://myappname/some_pageSort of like a local domain name. Is this possible at all? Any pointers would be great. | Creating a local custom host name instead of localhost? |
From this issue on GitHub.
Ok, thanks for the config. That all looks fine so my guess is you're getting a process crash due to a bad extension. Since you're in production, I'd suggest uncommenting the workers line and using at least 2 workers. That will at least shield you from the crashes a little because the other ... |
I have a puma server running a ruby on rails app on an AWS EC2 instance. It was working fine for a while, but I found it responding with 502 errors a few hours later. The app is deployed with capistrano.
A simple restart of puma fixed the problem temporarily, but I want to prevent it happening again. Not quite sure wh... | Puma silent crash with nginx reverse proxy |
1
The Dockerfile reference has the answer:
https://docs.docker.com/engine/reference/builder/
More specifically, the HEALTHCHECK directive:
https://docs.docker.com/engine/reference/builder/#healthcheck
Essentially, when your container's entrypoint fails, the container dies... |
I am new to Docker container and my question is how to monitor a process that is running inside a container. For Example, I have a container running apache in it. how would I know if apache process inside container got killed but my container is still running.
How we will ensure specific process inside the container i... | How to monitor a process that is running inside a container |
Analyze your certificate:https://www.ssllabs.com/ssltest/analyze.html?d=rainbowchilli.co.uk&latestThis server is
vulnerable to the POODLE attack.This server accepts the RC4
cipher, which is weak.The server does
not support Forward Secrecy with the reference browsers.This server's certificate chain is incomplete.T... | If I load my site with a desktop PC all is fine I believe and I get SSL working as it should:https://www.rainbowchilli.co.ukbut if I browse to it with Chrome on a Galaxy S4 phone or a Nexus 7 tablet I get SSL errors - why would this be and how do I fix it please? | Prestashop 1.6 SSL error on Mobiles/Tablets using Chrome |
You cannot do a pull request if you don't have anything new in your code.
Commit and push code on your fork, then you'll be able to create a pull request.
If you want to catch up with the 107 missing commits, do the following (as explained here)
git pull https://github.com/hexojs/hexo master
|
I want to create a PR request on the following repository HERE. Now i had forked the main repo as you can see HERE , as of now its 107 commits behind, there are no code changes in my forked version that i've made , my question how do i go about creating a PR request ?
Do i need to rebase ? do i need to pull from remot... | How to create a PR request on github when forked repo has't been updated? |
You can use the single helm chart to manage all the deployment and config map.Create thetplfor deployment and service so this single tpl (template) will use to generate the multiple deployment YAML configs.So you will get the 3 YAML deployment file as output while you will be managing a single template file.For configm... | I plan to use Helm for deploying purposes. I have three applications/pods p1,p2,p3 and each of these has 2 enivronments dev, prod and in each environment there is a configmap.yml and deployment.yml.I plan on using helm, however how can I structure these. Do I need three helm charts?, one per application or is it possib... | How to structure Helm chart with different environments? |
It appears that you are wanting one line per distinctdevice_id+timecombination.You can do this with some clever uses of theCASEcommand:select
device_id,
SUM(case when measure_name = 'ntu' then measure_value end) as ntu,
SUM(case when measure_name = 'shutterspeed' then measure_value end) as shutterspeed,
SUM(cas... | I would like to know how I can swap the row and column data
It is original dataI would like to show like this by SQL query | SQL query swap column and row |
Sorted, I had to reduce the complexity of the password used for my private key (for reasons only god and Microsoft know)... Uploaded the PFX and no issues... | I followed these instructions to upload a server cert issued by Thawte:http://msdn.microsoft.com/en-us/library/windowsazure/gg465712.aspxSo, I've got a PFX file and the cert complies with the requirements, that is:- Contain a private key (well it's a PFX...).
- Purpose is Server Authentication.
- Subject name match the... | Azure upload/install SSL certificate issue - "Can't upload certificate" |
The simple solution is to backup the entire JENKINS_HOME folder. In case you need it for disaster recovery, just copy the whole thing back in. There is a number of files inside the JENKINS_HOME folder that are important to backup, such as the jobs folder which holds configuration of all the jobs, as well as a number o... |
I'm planning to practice jenkins. I want to set up 2 jenkins server on ec2 instance and one is production server another is backup. I want the jobs in the production server automatically backed up to the backup server. In case of an disaster I want to restore it to the production server. Can anyone help me with how ca... | backup and restore to jenkins in case of disaster |
15
UserPoolIdentityProvider was added in Oct 2019, official docs.
Your CloudFormation would then look something like
CognitoUserPoolIdentityProvider:
Type: AWS::Cognito::UserPoolIdentityProvider
Properties:
ProviderName: Google
AttributeMapping:
email: ... |
I want to setup a cognito user pool and configure my google identity provider automatically with a cloudformation yml file.
I checked all the documentation but could not find anything even close to doing this. Any idea on how to do it?
| Can I setup AWS Cognito User Pool Identity Providers with Cloudformation? |
This website and this website contain information on the same problem. In order to keep your tables up to date, you must commit your transactions. Use db.commit() to do this.
As mentioned by the post below me, you can remove the need for this by enabling auto-commit. this can be done by running db.autocommit(True)
Al... |
My Python program queries a set of tables in a MySQL DB, sleeps for 30 seconds, then queries them again, etc. The tables in question are continuously updated by a third-party, and (obviously) I would like to see the new results every 30 seconds.
Let's say my query looks like this:
"select * from A where A.key > %d" %... | Chronic stale results using MySQLdb in Python |
Those lines signal merge conflicts in Git.
When you do a merge, git is generally good at automatically working out how to merge files together, however there are some cases where it cannot - for example, when both branches are adding to the same kind of area in the same file, you get a merge conflict.
In these cases, ... |
I have been fumbling around on github, and now with some help I have managed to make my branch the local master. however, I get these lines that i guess are tracking where things have been changed. But I don't want them!! I really just want my current files to become the new master as they are.
What exactly are these ... | HEAD and master denotations using github |
1
You May be doing "git add .", as you mentioned that all files are getting committed.
just try doing "git add " for the file you want to stage and commit.
and for merge conflict, it occurs when you and the other person you are working with make changes on the "same line" o... |
Does anyone have this problem after cloning and making changes on the local, when trying to add and commit, it commits all of the files in the downloads instead of just the files in the project where I cloned the github repo to? I also experienced a lot of issue when I edit code on my local and my partner for the proj... | Issue with github: github adds all of my previously uncommited files to this repo when I do git add |
One good way to debug the rewrites is to specify RewriteLog and RewriteLogLevel. You set log level up to 9 which logs quite a lot of things about the rewrites. Remember to disable the logging after debugging, because it is quite heavy for the apache process.RewriteLog documentationShareFollowansweredMay 30, 2011 at 9:2... | So I setted up the following lines in order to redirect some requests to my static domain:RewriteEngine On
RewriteBase /
RewriteRule ^img/(.*)$ http://static.mydomain.com/img/$1 [R=301]
RewriteRule ^css/(.*)$ http://static.mydomain.com/css/$1 [R=301]
RewriteRule ^js/(.*)$ http://static.mydomain.com/js/$1 [R=301,L]But... | Htaccess for static content not working! |
Swarm doesn't give the option to listen on a specific interface, it defaults to listen on all interfaces. This is anopen issue. Modifying overlay networks inside of docker will not change this behavior. | When I launch an app via docker I can publish the app on a port specifying the IP.Suppose that my server has two ip (private 192.168.0.2 and public 200.168.0.2), I can expose an app on the private ip with this command:docker run -it -p 192.168.0.2:80:80 nginxHow can I achieve something similar with docker swarm?I gues... | Docker Swarm and private IP |
1
You cannot change status code or headers through Lambda Authorizer, but you can do it through Gateway Responses.
Go to API Gateway
Select the API you want to change
On the left panel, select Gateway Responses
Select the Response you want to override (e.g. UNAUTHORIZED)... |
I have a question about API Gateway authorizers and lambda functions.
My scenario is the following: I have a resource in AWS API Gateway for which the authorization is enabled. The authorizer calls a lambda function which, if the user is not authorized, redirects the user to another URL.
So basically I would like to c... | API Gateway lambda authorizer custom status code |
27
/var/run/docker will be created when you start the docker service:
systemd:
sudo systemctl start docker
upstart:
sudo service docker start
init.d:
sudo /etc/init.d/docker start
You might also need this if you get this error:
FATA[0000] Cannot connect to the Docker daemon... |
when I installed docker initially, it shows to be of version 1.0.1
Being, that the current version is 1.4.1, I found and executed the following instructions:
$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
sudo apt-key adv --keyserver hkp://keyserver.ubu... | dial unix /var/run/docker.sock: no such file or directory after upgrading to lxc-docker |
From the linux command prompt issue the command:/usr/lib/jvm/jre/bin/keytool -import -alias <> -file <> -keystore cacertsThat command uses the Java keystore tool to import the new cert file into the existing cacerts file. The <> is whatever you want to call the cert. The <> is the actual file you want imported.If you... | Recently our server got upgraded to SHA-256 based SSL certificate. And from then we are facingjavax.naming.CommunicationException. In order to resolve this issue i need to add/append a set of Certificate Chain into CACERTS file under the path/usr/lib/jvm/jre/lib/securityof our server.I found thislinkof SO which explain... | How to integrate SSL certificates to the cacerts file in /jre/security folder? |
You can pass parameters to the SonarScanner for MSBuild either on the command line or in theSonarQube.Analysis.xmlXML settings file as described in thedocs. | I have a simple C# Hello World project which I am trying to do Code Quality analysis with SonarQube.dotnet C:\git\itergo\sonar\sonar-scanner-msbuild-4.7.1.2311-netcoreapp2.0\SonarScanner.MSBuild.dll endthrows an error.sonar-project.properties files are not understood by the SonarScanner for MSBuild. Remove those files ... | Sonarqube.project.properties file not allowed |
No, you cannot do that using YAML. The only inheritance like feature in YAML is theMerge Key Language Independent Typeand that only works withing one YAML document, not between multiple documents in the same YAML file (separated by---) and certainly not between different YAML files.Howeverdocker-composereadsdocker-comp... | I have a lot of services, which use the same basic configuration in docker-compose. Actually most of the configuration is the same, with some minor tweaks.I have seen that it is somehow possible to inherit values in YAML. Can I use this in docker-compose to define a "default-service" and use this all over in the other ... | use inheritance in docker-compose.yml |
I assume you can.
Download manifest -https://github.com/aws/amazon-vpc-cni-k8s/blob/master/config/v1.5/aws-k8s-cni.yamlAnd runkubectl apply -f aws-k8s-cni.yamlDid you checkhttps://github.com/aws/amazon-vpc-cni-k8s? | I am planning to set up a Kubernetes cluster in AWS without using EKS. Since EKS providesAmazon VPC CNIfor managing networking at pod level, which provides better networking, I am planning to use the same.I need to know, whether it is possible my Kubernetes cluster withAmazon VPC CNI, if yes, can somebody provide me th... | Can we use AWS VPC CNI on Kubernetes cluster in AWS when not using EKS |
1) access to the logs from previously deployed container which can be stopped/destroyed. Rsyslog/syslog?
One option is to send your logs to an ELK stack . Using logtash-forwarder or log-courier or Beaver
2) how easy to rollback a deployment? Is that safe in terms of dropped requests? Can you send USR2 + QUIT signal... |
Read many resources but still confused about Docker from deployment point of view. Trying to find out the best practices for Rails app within Docker environment, particularly interested how to solve the following problems:
1) access to the logs from previously deployed container which can be stopped/destroyed. Rsyslog... | Deployment Rails app for Docker |
Yes, they're very different. The first is really a single array; the second is actually var+1 arrays, potentially scattered all over your RAM. var arrays hold the data, and one holds pointers to the var data arrays.
|
What is the difference between two arrays definitions? Are they realized different in memory?
int var = 5;
int (*p4)[2] = new int [var][2]; // first 2d array
int** p5 = new int*[var]; // second 2d array
for(int i = 0; i < var; ++i){
p5[i] = new int[2];
}
| Difference between two methods of creating of 2d array |
The message indicates that the browser didn’t accept the certificate and can happen when you got the wrong domain, the certificate expired (not your case) or the browser doesn't recognize the certificate authority from where the certificate came from (most likely that's the case).When creating a self signed SSL certifi... | I want to test my website in Mac with localhost.I followedthis stepto generatelocalhost.crtandlocalhost.key. Then, I double-clickedlocalhost.crtto insert it inSystemofKeychainsand then setAlways Trust.Then, I launched the website in Chrome. I still seeYour connection to this site is not secureandCertificate (Invalid).D... | Self-signed root certificate is still not valid |
First you could try the following expression:count(LATENCY{status="CRITICAL"}) > 0If it doesn't work as expected, then try the following one:count(LATENCY{status="CRITICAL"} or vector(0)) > 1 | I have metric,LATENCYand label,status.
I want to fire an alert whenLATENCYhasstatus=CRITICALLATENCY{status="CRITICAL"}LATENCYstatus will be critical only if latency is beyond a threshold.
How to check if there is at least one time series withLATENCY{status="CRITICAL"}?I usedexpr: absent(LATENCY{status="CRITICAL"}) == 0... | Prometheus : How to check if there is atleast one time series for a given metric and label combination? |
The error is getting because thedisk_size_gbmodule must be in the node_config block, as the following.node_config {
disk_size_gb = 200
}The TerraForm documentation aboutgoogle_container_clusterthe module needs to be under the block. | I am trying to add the boot disk size to the node auto-provisioned Kubernetes cluster as follows:resource "google_container_cluster" "gc-dev-kube-ds0" {
.
.
.
cluster_autoscaling {
enabled = true
resource_limits {
resource_type = "cpu"
minimum = 4
maximum ... | Setting boot disk size for autoscaling kubernetes cluster through Terraform |
Assuming you have access to the httpd.conf file or your virtual host configuration, You can add Directory sections with Wildcards, orDirectoryMatchsections to accomplish this in your httpd.conf file. You're probably looking for something akin to:<Directory /home/snippets/*>
Options -Indexes
</Directory>Make sure yo... | I've a folder structure like:home
|
snippets---other----bla
| | |
a--b--c d--e--f g--h--i
| | | | | | | | |
filesfilesfilesfilesfilesfilesI've default files (index.html) in most folders, but for the folders without default files, I used "Options -Indexes" in the home .htaccess to g... | Directory listing for one folder htaccess |
I ran the below command to get the same. I hope it solves the issue quite easily.alias util='kubectl get nodes --no-headers | awk '\''{print $1}'\'' | xargs -I {} sh -c '\''echo {} ; kubectl describe node {} | grep Allocated -A 5 | grep -ve Event -ve Allocated -ve percent -ve -- ; echo '\'''[mynode ~]# utilmy-control-0... | I am using different opensource components by pulling helm charts and installing. Now, after some time while deploying one custom helm chart I am getting resources unavailable. So, rather than counting manually is there any way to know total reserved resources.So, How to get total reserved CPU and memory reserved by Ku... | Getting CPU and Memory hard limit count in Kubernetes |
After doing some research I ended up with the following solution using classio.vertx.core.http.HttpServerRequestprivate X509Certificate extractCertificate(HttpServerRequest req) throws SSLPeerUnverifiedException {
X509Certificate[] certs = req.connection().peerCertificateChain();
if (null != certs && certs.leng... | Following QuarkusGetting Startedguide andenabling SSLthe next step I wanted to do was to get the client certificate chain.I would like to do something like this:private X509Certificate extractCertificate(HttpServletRequest req) {
X509Certificate[] certs = (X509Certificate[])
req.getAttribute("javax.ser... | How to retrieve the client certificate from a request in a REST service using Quarkus in two way SSL |
Either remove network fromdocker-compose.yml(so default is used) or adddb-networktoserver:services:
server:
build: ./Test
ports:
- "8000:80"
depends_on:
- db
networks:
- db-networkShareFolloweditedJan 28, 2023 at 11:24answeredJan 28, 2023 at 9:40Guru StronGuru Stron122k1111 gold badg... | I have been trying to connect my webapi built in ASP.NET Core 7.1 to a postgresql database. It is inside a docker container. However, every time I rundocker-compose -f docke-compose.yml up, I get the following error:Unhandled exception. System.Net.Sockets.SocketException (00000001, 11): Resource temporarily unavailable... | How to connect an ASP.NET backend to a postgres database inside a docker container |
There are two ways to handle this.Call out to CLI utilitiesThis requires that you supply the contents of thekrb5-workstationand its dependency,libkadm5, in your deployment package or via a Layer.Launch an EC2 instance from theLambda execution environment's AMIUpdate all packages:sudo yum updateInstall the MIT Kerberos ... | I have an aws lambda function(nodejs) right now that writes some data to a test kafka cluster. The one thats in production use's kerberos for auth so I was wondering if there was a way to setup my lambda function to authenticate with kerberos. I wasn't able to find much online regarding this... | kerberos authentication in lambda function |
1
The best way to make a simple problem like this memory safe is to add a destructor to node and delete the root node at the end of the program. Because root is allocated on the stack you will have a memory leak at the end currently.
Here's what the definition should somewh... |
I solve algoritm questions from sites like leetcode, hacker rank or cracking the coding interview. I do most if the questions in c++. So for most of them i have a node struct as below
struct Node {
Node* next;
//for tree
Node* left;
Node* right;
int data;
//ctor
Node(int val) : left(nullptr);....... | memory management for linked list and tree programs in c++ |
1
At the end of the day, there isn't a big difference between bind mount and Docker named volumes.
I tend to prefer keeping persistent data from Docker services in Docker volumes. You can then use tools like docker system df -v to inspect what your application uses.
As for ... |
Option 1: (named container. the volume is identified by its name. It store its data in the /var/lib/docker/volumes/nameofthevolume)
# create the volume in advance
$ docker volume create test_vol
Option: 2 (here name of the volume bind-test does not matter, what matter is which local path /home/user/test it mounts t... | postgresql persist data: which is better named volume or bind mount |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.