Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
You should change the build script in your package.json to :
"ng build --base-href ./ "
The reason it's not working in your repository is that the angular CLI by default use base href="/" in the index.html, consequently the browser can't locate the missing resources.
YOu can find more information about this in doc
|
I uploaded an app I built with Angular, Travis upload it on Github pages with the gh-pages branch but this time all I get is a blank page and the following error messages in the console :
Échec du chargement pour l’élément dont la source est « https://hdz.github.io/runtime.js ». [FCS-Training:14:1]
Échec du chargement... | My Angular app is blank on gh-pages, can't load js from travis |
1
I have a Nginx Proxy in front of my services all other services are restarting fine after reboot but nginx-proxy does not restart. I am using docker-compose file for it. To resolve this issue I have created a systemd service file called nginx-proxy-container.service in /e... |
My team is using Docker Compose to serve a Django web application. We have one container that serves Django via a Gunicorn web server, and another container that is a reverse http proxy to the first container using Nginx (it also serves static files).
We are trying to implement docker's "always" restart policy. Here i... | Nginx not working after docker restart policy = always |
According toGrafana documentation, you may capture the part of a regex to return that substring:Filter and modify the options using a regex capture group to return part of the text:
Regex:/.*(01|02)/Result:01
02Hence, you may use^(?:\*\.)?([-a-zA-Z0-9._ ]+)
^ ^See theregex demo.Here,^- start ... | I have Grafana 5.2 dashboards sourcing data from Prometheus.I have some labels in a dashboard that seem to be in the format*.<domain>for e.g.*.google.come.t.c however, this doesn't play with Grafana without some smart regex to ignore the first two characters.I have the following regex(?<=^\*\.|^)[-a-zA-Z0-9._ ]+which d... | Grafana regex to ignore the asterisk as the first character in labels |
If you are exposing your objects (pods, deployments, etc) using a K8S service you can expose them outside namespaces with an IP or with FQDNHere is an example of how to do it:https://github.com/nirgeier/KubernetesLabs/tree/master/Labs/05-Services#0403-using-the-full-DNS-nameAs a best practice you should not rely on the... | I have a Kubernetes cluster with two namespaces,dbns(where a database lives) andjobland(where jobs run from).I would like to run aJobfrom a container running in thejoblandnamespace that will connect to and run scripts against a DB living in thedbnsnamespace.When I runget pod,statefulset,svc,configmap -o wideI see that ... | Exposing Kubernetes container IP outside its namespace |
Right, I finally got to the bottom of this, looks like the routes back to the data centre and also to the pods need to be replicated on the GatewaySubnet as well. | I am building a Kubernetes Cluster on Azure (AKS). I have deployed it into a custom VNet usingthisdocument. By default, the VNet that gets created when AKS is provisioned is 10.0.0.0/8. All of our infrastructures are in 10.27.X.X space hence the need for the custom VNet.As per the document the Custom VNet is created in... | Azure AKS connectivity to Data Centre over VPN |
The only posts I could figure out (by searching on Google) are the following:
Mobile Browser Cache Limits: Android, iOS, and webOS
Mobile Browser Cache Limits, Revisited
How Mobile Browser Cache Affects Browsing on iOS, Android, and More
|
Is anyone familiar with a comprehensive list of mobile devices and their browser's cache limits for images?
I found one reference for iPhone:
http://www.niallkennedy.com/blog/2008/02/iphone-cache-performance.html
But it's 3 years old. It does state, however, that the iPhone won't cache images over 25k.
I'd like to kn... | Mobile image cache size limitations? |
Learn process-id of process, who use port 9100netstat -lpn | grep 9100Learn parent pid of processps -p PID -o ppidIf parent process issystemd(pid is 1), then find its service name viasystemctl status PIDAnd decide what to do with it.If parent process isnotsystemd, but something likecontainerd-shim, this means that this... | Node exporter is in failed state, journalctl says:level=fatal msg="listen tcp :9100: bind: address already in use" source="node_exporter.go:114"I triedreset-failedand restarting the service still the same issue. Then i listed processes using 9100 port and killed the process (the process was a node_exporter process) but... | Node exporter port already in use, service is failed |
So I found the answer to this. It seems that as of Nginx v0.22.0 you are required to use capture groups to capture any substrings in the request URI. Prior to 0.22.0 using justnginx.ingress.kubernetes.io/rewrite-target: /worked for any substring. Now it does not. I needed to ammend my ingress to use this:apiVersion: ex... | I'm deploying a simple app in Kubernetes (on AKS) which is sat behind an Ingress using Nginx, deployed using the Nginx helm chart. I have a problem that for some reason Nginx doesn't seem to be passing on the full URL to the backend service.For example, my Ingress is setup with the URL ofhttp://app.client.comand a path... | Kubernetes Nginx Ingress removing part of URL |
I normally use a ServletHolder, like this:WebAppContext context = new WebAppContext();
ServletHolder servletHolder = new ServletHolder(MyServlet.class);
servletHolder.setInitParameter("cacheControl","max-age=0,public");
context.addServlet(servletHolder, "myservletpath");While this does notexactlymatch your code you sh... | I want to prevent my CSSs from being cached on the browser side. How can I do it in embedded Jetty instance?If I were using xml configuration file, I would add lines like:<init-param>
<param-name>cacheControl</param-name>
<param-value>max-age=0,public</param-value>
</init-param>How I can turn that into the code?Rig... | How to prevent caching of static files in embedded Jetty instance? |
Actually, all the tasks run in the agents when you use the Pipeline. And the network of the agents, you can take a look here. As you see you need to allow the IP addresses of the agents, and the IP ranges vary over time. Every week you need to add the new IP addresses in the firewall rules for your organization region... |
I have a Pipeline in Azure DevOps that should build and push a Docker image to an Azure Container Registry. Therefore I have a service connection (type: docker registry) in place in order to authorize the pipeline to push. If I remove the network restriction in the container registry everything goes just fine.
As soon... | Azure DevOps Pipeline - build and push Docker Image to Azure container registry with restricted network access |
I seem to have found a work around that fixed my problem. After some additional Google research, I added the following lines to my Nginx config:proxy_buffers 8 16k;
proxy_buffer_size 32k;However, I still don't knowwhythis worked and why only Firefox seemed to have problems. If anyone can shed light on this, or offer ... | I am running a website locally, all the traffic is routed through NGinx which then dispatches requests to PHP pages to Apache and serves static files. Works perfectly in Chrome, Safari, IE, etc.However, whenever I open the website in Firefox I get the following error:502 Bad Gateway
nginx/0.7.65If I clear out cache an... | Nginx 502 Bad Gateway error ONLY in Firefox |
6
Anyone trying to figure out how to copy your dependencies (.jar) into java/lib directory, this is maven snippet from a project -
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler... |
I built two project and added layers to AWS Lamba successfully.
And my functions use these two layers.
This is my structure of layer
When I execute the function, an error happened:
java.lang.NoClassDefFoundError
I know the location of the layer is inside/opt,
but how can I use the layer's library in function... | How can I use AWS lambda layer by java (Layer is success in Lambda)...error is NoClassDefFoundError |
Following "pull/push from multiple remote locations", you could set up your local repo in order to push to both upstream repos in one command.
[remote "upstreams"]
url = [email protected]:user/repo.git
url = your/dropal/sandbox.git
|
I have a drupal sandbox project up and running which is being updated by me frquently. But the same is not showing up when I log into my Github account on github.com . Is there a way to integrate both so that whatever changes I push to my drupal sandbox and the commit history also appear on github.com ?
| clone drupal sandbox project into github account with commit history |
The easiest way to "make a copy of an instance" is tocreate an Amazon Machine Images (AMI).The AMI takes a copy of all disks attached to the instance.Then, you canlaunch a new instance from the AMIand the new instance will have an exact copy of the disks from the original instance. This includes the operating system, a... | I need to make a test environment of a current running system.In order to do this, I'm thinking of making a copy of the instance but, does the cron schedules will be copied as well?
Or do I need to set up all the server settings and cron jobs? | If I make an EC2 instance copy, the server settings like cron schedules are also copied? |
If you are working on a local environment, you should set in your directorysudo chmod 777 -R pgadmin_dat/. It's going to be solving all you's future problems. Otherwise, if you need more security, setsudo chmod 5050 -R pgadmin_dat/, it will yourpgadmin_datfolder available to write.
So, you should do set the same way to... | i have a dpage/pgadmin:latest Docker container running on an Ubuntu 20.04.Client: Docker Engine - Community
Version: 20.10.8
Server: Docker Engine - Community
Engine:
Version: 20.10.8
docker-compose version 1.25.4, build 8d51620aNow i want to manually save my backups from my database created wi... | Docker dpage/pgAdmin - permission denied /var/lib/pgadmin/storage |
You can describe pod to see detailkubectl describe pod POD_NAME | I have a pod with multiple containers. Now it reports CrashLoopBackOff.
How can I find out which container crashes. It is possible that all containers crash. But I just want to make sure. | kubernetes find out which container crashes in a pod |
Yes, you can.Take a look at AWS CLI documentation:Use of Exclude and Include Filters:Currently, there is no support for the use of UNIX style wildcards in a command's path arguments. However, most commands have--exclude "<value>"and--include "<value>"parameters that can achieve the desired result. These parameters perf... | I have an S3 bucket from which I would like to copy:The entire directory structure (all directories and child directories, at any length)Wherever they are in the directory structure, all files that match a certain file-name path (Eg:*.log,*070719*.csv, etc.)Is there any way to do this from the AWS CLI? | 'aws s3 sync' only copy files with a certain extension |
1
Any jar file that is built by maven should have pom.properties file under META-INF\maven\${groupId}\${artifactId}. This pom.properties file should contain the groupId, artifactId and version of the jar
Personally I'd write a gradle/groovy script to iterate the list of jar... |
I have huge number of jars listed in text file along with its versions.
For ex:
spring-jdbc-4.3.6.RELEASE.jar
commons-codec.jar
commons-fileupload.jar
.
.
.
.
This list goes on for 500+ jars.
Problem: I need a pom.xml that comprises all these jars as dependency.
I need this for GHAS scanning in github to determine t... | Generate pom.xml file (with dependency) for all the jars name/version I have in my text file |
Try the following command :killall -s SIGHUP bashbut you shouldn't do this, you can potentially kill all bash of all users. Instead, I recommend you to usepkill -f script_name.bashandpkill -1 -f script_name.bashif needed. | 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, ... | Using killall to terminate bash [closed] |
It is usual mistake. You think that nginx directives are executed in the same order as in config file.
There are a lot phases of processing of nginx configuration files. Good, but long explanation: Nginx directive execution order
In their execution order the phases are post-read, server-rewrite,
find-config, rewrit... |
There is a param named "RedirectURL" in http request header. I want to remove it in ngx_lua and then send this request to RedirectURL, here is some snippet in nginx.conf
location /apiproxytest {
set_by_lua $redirectURL '
return ngx.req.get_headers()["RedirectURL"]
';
... | ngx_lua how to remove http request header |
1
Okaaaay... Problem was in Windows-style line separator. I change CRLF to LF in my configure.sh and it works!
Share
Follow
answered Oct 30, 2019 at 10:50
Stanislav DoroshinStanislav Doroshin... |
I have Docker file:
FROM ubuntu:18.04
COPY mylib/src /usr/src
WORKDIR /usr/src
RUN chmod +x configure.sh
RUN ls -l # it display all files, included configure.sh
RUN ./configure.sh # error there
Echo:
RUN ls -l
---> Running in d9ba6b10ed2a
total 604
...
-rwxr-xr-x 1 root root 91 Oct 28 07:30 configure.sh
...
RUN ... | RUN command throws "not found" |
3
You can use System.Web.HttpRuntime.Cache to access the cache statically.
Share
Improve this answer
Follow
answered Jun 15, 2011 at 20:20
Shane CourtrilleShane Courtrille
14k2222 gold bad... |
I have a wrapper class for Caching (CachingBL) where I store users that are currently signed in (some of their session info).
In CachingBL wrapper there is actually a dictionary of users, and I am putting that dictionary in cache like this: HttpContext.Current.Cache.Insert(...):
At the session end I would need to acc... | asp.net - deleting cache object at session end |
I believe you're looking for theonbar -vcommand/option to verify backups. You can look atonbar -v: verifying backupsin the manual for more information.onbar -v
onbar -v -w # Whole system backup
onbar -v -f filename # Spaces listed in file
onbar -v space1 … # Spaces listed on command lineWith optio... | This problem made me vexed withInformix. When the same backup command has been issued with theonbarcommand by two different members of bargroup at the same time from different sessions and one backup has failed and the other back up is successful. How can I identify whichonbarcommand issued by a member is successful, ... | Check if the back up taken by onbar command in Informix database 12.1 is successful or not? |
OpenShift has a "cronjob" resource type which can schedule a job to run at specific intervals. You can read more about ithere.You can create a custom image which contains the client to connect to your DB and supply it with the credentials mapped as secrets. This can run your executable queries at the interval you've se... | I have an existing POD containing a DB. I have a script containing executable queries in that container. I need to schedule the execution of the script. How do I go about doing this? | How to run a job in openshift to schedule a particular script? |
There are a number of ESLint GitHub Actions published to the marketplace that will do linting and annotations of pull requests. Perhaps one of those will fit your use-case.Check them out here:https://github.com/marketplace?utf8=%E2%9C%93&type=actions&query=eslintShareFollowansweredOct 11, 2019 at 12:36peterevanspeterev... | I am trying to implement eslint check everytime I push code in GitHub and I came across checks(https://developer.github.com/apps/quickstart-guides/creating-ci-tests-with-the-checks-api/) in GitHub, but get couldn’t get much on “how-to setup” though it has all the apis and other stuff to integrate eslint with checks.FY... | Github checks + action integration |
Use WMI to get this kind of info, well supported by the System.Management namespace. Get started by downloading theWMI Code Creator utility, it lets you experiment with queries and can auto-generate the C# you'll need.You want to query Win32_Process, it provides lots of info about a process. PrivatePageCount would be... | I need the memory usage and processing time for an application loaded through another application. I am using C#. Currently I am usingProcess.WorkingSetto get memory usage
similarlyProcess.TotalProcessTimeto get time for execution, but it doesn't give any value. So have you make any suggestions? | Memory usage and time for execution for another process using C#? |
OK - Done some experiments. You need to define an update policy for the scaling group. By defining an update policy, any change in the launch configuration will then trigger an update. Without this - an update won't be triggered.
You don't need an ELB in order to trigger the rolling update, but if you have one, it ... |
We are powering our AWS EC2 instances using cloud formation. We have 3 different stacks - testing, staging and production. Our workflow to update the images for any of the stacks is as follows:
Update a 'golden master' instance
Snapshot the golden master to a disk image
Change the ami reference in our cloud-formation... | Cloud formation - updating a stack behind an elb doesnt update the AMI |
After looking into one of the test files in Grafana |LogDetails.test.tsxLooks, like it must be returned must be returned asresult.data = [frame]
return result | I am trying to reproduce the steps given ingrafana log data source pluginso that I can replace the current-query function with a hardcoded log-panel compatible query function
in oci-datasource-pluginGithub link| oci-datasource-fileFrom the documentation of log-panel build guideconst frame = new MutableDataFrame({
... | What do I return from the query function of datasource.js for grafana log panel datasource plugin? |
There is a known problem with using some Python packages under OSX. Exporting this variable solved my problem:export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESSee this issue | I am trying to use Terraform to deploy a Kubernetes Cluster and Ansible for deploying K8s objects. Everything works, usingAnsible K8s, also deploying from local YAML files, but when I try to use lookup from url like describedhereI get an error:ERROR! A worker was found in a dead statePart of the Ansible Tasks:- name: F... | How to manage K8s objects with Ansible from src URL not local file? |
@mursalat - There are many things you can do to see what is going on at that time. How many processes is php-fpm spawning at that time? This could be something with your settings.
One way to check out what is going on by checking the contents of the log:
/var/log/php5-fpm.log
Another great tool that we use is NewRe... |
We have php-fpm setup on nginx, and all is working fine as far as the end-user experience is concerned, we use varnish infront of it all so usually the load is low on varnish's backend.
however sometimes when we run top, we see that php-fpm process is eating up memory, specially after varnish restarts.
Now what i am t... | how to check what php fpm is doing? |
When a user is authenticated with Cognito User Poolcognito-user-pool1, the id token includes cognito groups and iam roles:"cognito:groups": [
"cognito-group1"
],
"cognito:roles": [
"arn:aws:iam::xxx:role/iam-role1"
],We need configure Cognito Identity Pool to choose role from token when user is authenticate... | Is it possible to assume the IAM roleiam-role1linked to Cognito groupcognito-group1of cognito usercognito-user1in Cognito User Poolcognito-user-pool1?My configuration:Cognito User poolcognito-user-pool1:Cognito usercognito-user1belongs tocognito-group1Cognito groupcognito-group1has assigned toiam-role1.Cognito Identity... | Assume IAM role from Cognito group |
5
A bit late to the party but hope this helps out some people facing the same issue. I'm assuming that you're using WSL2. The notifications only work in Windows if the files are stored on the Linux filesystem.
Linux containers only receive file change events (“inotify even... |
I have my project running in a docker container, but when I make a change it doesn't update it.
My docker-compose.yml:
volumes:
- ./server:/ezzulp_server
My dockerfile:
FROM node:14.16.0-alpine
WORKDIR /ezzulp_server
CMD ["yarn", "dev"]
It seems that the volumes doesn't work?
This works perfectly on my macbo... | Why does Docker volumes not work on windows |
You should be able to useOpenSSLto create a CSR independently of IIS (see itsreqcommand). | We need to provide a secure SSL on our intranet website. Could anyone please help me query below:Is it possible to get Internal CA signed cert without a CSR?If above is Yes, how do it generate a Internal CA signed Cert without a CSR.What am I trying to achieve?We don't have Production IIS setup. And production IIS will... | Internal CA Signed Cert without CSR (Certificate Sign Request) |
looking at this step by step:you clone the repo (which belongs to heroku)this sets anoriginremote which you can pull from.you push to herokuthis involves setting aherokuremote which you can push & pull to.In order to push to git, you'll need to fork the repo or just create a new repo and point youroriginto it.These are... | I am pushing an simple application to Heroku using "git push heroku master", then I also want to push the code to github using "git push origin master". However, I got a problem like this:remote: Permission to heroku/node-js-getting-started.git denied to
github. fatal: unable to access
'https://github.com/heroku/no... | Permission to Heroku Denied to Github Repo |
Only when you start your app withpython sever.pyis theif __name__ == '__main__':block hit, where you're registering your database with your app.You'll need to move that line,db.init_app(app), outside that block. | I have an application that works in development, but when I try to run it with Gunicorn it gives an error that the "sqlalchemy extension was not registered". From what I've read it seems that I need to callapp.app_context()somewhere, but I'm not sure where. How do I fix this error?# run in development, works
python s... | SQLAlchemy extension isn't registered when running app with Gunicorn |
27
The only way I could fix this was by opening a powershell and switching daemons:
& 'C:\Program Files\Docker\Docker\DockerCLI.exe' -SwitchDaemon
Share
Improve this answer
Follow
answered Apr 1... |
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... | Docker for windows hangs while trying to see settings [closed] |
RewriteEngine On
RewriteBase /clients/nannyshareaustralia
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|assets|css)
....Added aRewriteBaserule to your.htaccessgranting thatmod_rewriteis enabled on your server.noteIf you access the directory likewww.domain.com/client... | Hi i have this folder on my server and it is clients/nannyshareaustralia and im using a codeigniter framework i already set up the config.php in the base url too. And im adding also for the htaccess fileRewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|images|js|... | Forbidden: Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request |
You need to close both ends of the pipe in the parent after you fork the children. The problem is that output oflsis going to the parent, and thewcis waiting for input. So the first wait cleans up thels, but the second is waiting forwcwhich is blocked on a pipe that's not receiving data. | I have the following code fork()'s 2 children from a common parent and implements a pipeline between them. When I call the wait() function in the parent once only the program runs perfectly. However if I try to call the wait() function twice (to reap from both the children), the program does nothing and must be force e... | fork() 2 children with pipeline, error when wait() for both |
The Serverless framework tooling uses AWS CloudFormation for provisioning resources in the AWS cloud. Have you checked theAWS CloudFormation web console? | I used serverless toolkitserverlessto deploy an application and all works fine.After I logged in ASW console and I was looking for a dashboard or something where I can found and manage the deployed application.The question is: Where I can find inside the AWS console the application deployed with serverless toolkit? | Where I can find the application deployed with AWS serverless toolkit |
With the following script you can check is a connection is up, add a few sleeps and loops and you are good.
Function ExecPing(strTarget)
Set objShell = CreateObject("WScript.Shell")
Set objExec = objShell.Exec("ping -n 2 -w 1000 " & strTarget)
strPingResults = LCase(objExec.StdOut.ReadAll)
If InStr(strPingResu... |
I need to come up with simple solution for an internet gw in SOHO environment. It has 2 internet connections - main via adsl link and backup via USB 3G modem. Both connections export standard PPP interface, so them can easily be switched on/off via command line or scripts. Script has to be able:
check if main interne... | Simple vbscript script that checks internet link's healthiness and switches to backup connection if main dropped |
You can do this using this command:docker rm $(docker ps -a -q --filter "ancestor=ubuntu")replaceubuntuwith your image name.
This basically gets all the container ids (running or otherwise) that use the image ubuntu and then removes them. | My docker sometimes create randomw container name based on my docker image e.g.yeeyiHow todocker rmall off the containers where the image isyeeyi?is there something like?docker rm all --image yeeyiin a single command line? | How to docker remove all containers based on image name |
Try this:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^8mags.com
RewriteRule ^(.*)$ http://8mags.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]
</IfModule>
ErrorDocument 404 /404.htmlI have implemented this... | I have following code in my .htaccess fileRewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.8mags\.com [NC]
RewriteRule ^(.*) http://8mags.com/$1 [L,R=301]It shows following error in firefoxThe page isn't redirecting properlyThis redirection code is written at the top of file.Below redirection code there is code for cha... | code in .htaccess does not redirect properly |
You can set verify_certs to False if you want to disable verification. Or you can set up a CA, or simply get a free SSL certificate from a widely supported CA if you own a domain name.
Also, please share the version of elasticsearch you are using as it was deprecated.
You can get morehttps://github.com/elastic/elastics... | I am dealing with ElasticSearch library on Python and at some point I need to implement on some Elastic Server. My connection attempts always fail with error InsecureRequestWarning: Unverified HTTPS request is being made to host.client=Elasticsearch(
hosts=["https:/something:something@servername:9200"],
use_ssl... | How can I implement a SSL remote certificate on Python? |
GitHub announced their intent to require the use of token-based authentication for all authenticated Git operations. They will no longer accept account passwords when authenticating Git operations on GitHub.com:Generate token:Go to your GitHub accounttoken settingsGenerate a tokenOn Mac:Go to keychain AccessPress theLo... | This question already has answers here:Message "Support for password authentication was removed."(50 answers)Closed2 years ago.Error message when usinggit push:Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please seehttps://github.blog/2020-12-15... | Use token to push some code to GitHub - "Support for password authentication was removed" [duplicate] |
http://github.com/ngmoco/cache-moneyis the way to go | Is there a technique that I can use in Rails so that whenever a simple "find" is performed on a Model object, memcached is first searched for the result, only if no result is found will a query by then made to the database?Ideally, I'd like the solution to be implicit, so that I can just write Model.find(id), it first ... | How can I cache Model objects in Rails? |
You should be able to create adist/.gitattributeswith the entry:lib -export-ignoreto turn off that attribute for that specific directory. Haven't really tried that, but the manual page implies that's the way to do it. It's unclear (to me, anyway) whether the pattern field in.gitattributesis interpreted in the same way ... | I have a folder namedlibin the root of the repository and another folder namedlibin dist folder.I'm trying to use.gitattributesfile to exclude all folders and files other than dist so that anyone downloading as zip or tarball will only git the distribution filesMy trouble is the following.gitattributesfile also removes... | How do I use .gitattributes to avoid including a folder in git root but include the folder with same name in dist folder for zip |
I just ran into the same issue-- our entire Android project would not build because we have a dependency on a Github hosted mvn repository.This appears to be a problem with Github. It seems like their "raw" hosting isn't working.This was my temporary workaround:1) Git clone the repo locally2) Use MAMP or another web se... | Since this morning, I have a strange problem on my android project on Android Studio. Gradle sync is very slow. I search and find that it is due to a github repositories.I manage to reproduce this bug on a new android studio project with this build.gradle// Top-level build file where you can add configuration options c... | Gradle and github repository, slow sync |
The problem exists in many Enterprise Library blocks indeed. It has something to do with the way Unity is implemented. The actual problem is not that the code itself is incorrect. The exception is catched, but the debugger seems to ignore that fact.The problem is described here:http://entlib.codeplex.com/workitem/28528... | What am I doing wrong here or what am I not doing?
(I am using this code in a .NET 4.0 WCF Service)private static ICacheManager GetCacheManager()
{
try
{
return CacheFactory.GetCacheManager();
}
catch (SynchronizationLockException ex)
{
... | What is wrong with the "Microsoft.Practices.EnterpriseLibrary.Caching" when trying to access "CacheFactory.GetCacheManager();"? |
Grafana does not save data from Prometheus. It queries Prometheus and displays UI. In this case, you would have to look at purging Prometheus data.Prometheus by default has a 15 day retention period. But this could be adjusted by the -storage.local.retention flag to suit your needs. | I'm using Prometheus and Grafana for monitoring the servers.
Grafana data were stored in/home/user/datafolder.This folder occupied the majority of the file system .Need to remove the old data in Grafanadatafolder ( Data which is older than a month ) | Clear old data in Grafana |
username and password are for HTTPS URL.Creating an SSH key would be ignored in that case.So make sure to try and create a repo usinggh(cli.github.com), nothub(obsolete).Firstgh auth login(use a token)Thengh repo createShareFollowansweredDec 13, 2020 at 2:02VonCVonC1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k b... | I'm trying to set up Github on my new laptop. I've created a new project locally, then SSH key.Hub create:with username and password: 401 (bad credentials. The API can't be accessed using username/password authentication. Please create a personal access token)with token: 401 (unauthorized)So I manually created the repo... | Hub commands returning a 401 |
4
Update: as of August 23rd 2018, you can now set the Configuration via CloudFormation:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-crawler.html#cfn-glue-crawler-configuration
Currently there does not appear to be any way to set the C... |
Schema change policy section in web colsole for aws glue crawler contains 3 points while cloudformation section template defines only 2. Is there a way to set "Inherit schema from table" parameter from cloudformation template?
| How set "Inherit schema from table" for glue crawler via cloudformation? |
This seems like Memgraph is not configured to use SSL, and the client is trying to make the SSL connection.
If that's the case, and Neo4j's Python driver is used, the client should be configured with disabled encryption:
from neo4j import GraphDatabase, basic_auth
driver = GraphDatabase.driver("bolt://localhost:7687",... |
I am trying to run memgraph 1.2.0 - with docker and getting the following SSL connection error -
ERROR services/memgraph/tests/collapse_test.py::test_incorrect_pseudo_node - neobolt.exceptions.SecurityError: Failed to establish secure connection to '[SSL: WRONG_VERSION_NUMBER]
How can I solve this?
Thanks!
| How do I solve this Memgraph SSL connection error? |
Full disclosure: I'm the author of Dockernel.By usingDockernelPut the following in a file calledDockerfile, in a separate directory.FROM python:3.7-slim-buster
RUN pip install --upgrade pip ipython ipykernel
CMD python -m ipykernel_launcher -f $DOCKERNEL_CONNECTION_FILEThen issue the following commands:docker build --... | I want to switch my notebook easily between different kernels. One use case is to quickly test a piece of code in tensorflow 2, 2.2, 2.3, and there are many similar use cases. However I prefer to define my environments as dockers these days, rather than as different (conda) environments.Now I know that you can start ju... | Jupyter starting a kernel in a docker container? |
Thanks to Ahmed forthe link.As a quick point of reference to anyone too lazy to click on it here's the bit I was after...THE_REQUEST
The full HTTP request line sent by the browser to the server (e.g., "GET /index.html HTTP/1.1"). This does not include any additional headers sent by the browser. This value has not... | What is returned by %{REQUEST_FILENAME} and %{THE_REQUEST}?I was just checking over our .htaccess file and it dawned on me, I have very little knowledge of this. The code below uses both. It works I just want understand it.#remove / at the end of URL
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}... | What are the .htaccess elements REQUEST_FILENAME and THE_REQUEST? |
PKSIs Pivotal's answer to running kubernetes in PCF (regardless of IaaS) | I have a requirement to use Docker containers in PCF deployed in Azure.
And now we want to use kubernetes as container orchestration.
Does kubernetes can be used here ?
Or PCF will take care of the container orchasteration ?
Which one would be the better approach here ? | Using Kubernetes as docker containers orchestration in PCF |
The statement converts a PKCS#1 key into a PKCS#8 key. Here are generally two passwords to specify, that of the PKCS#1 key:-passin file:<path to file with password>and that of the PKCS#8 key:-passout file:<path to file with password>s.openssl pkcs8andopenssl passphrase options.If the PKCS#1 key is not encrypted, the-pa... | I need to generate some keys using OpenSSL and I use this command:openssl pkcs8 -topk8 -in rsa.txt -inform PEM -out rsa_key.p8And the utility asks me for a password:> Enter Encryption Password:
> Veryfying - Enter Encryption Password:How can I avoid setting password from a stdin and read it from a file rather?I tried s... | OpenSSL pkcs8 - use encryption password from file |
Add the remote:git remote add origin http://github.com/user/repo.gitThen push the changes.ShareFolloweditedMar 27, 2021 at 18:48evolutionxbox4,02066 gold badges3737 silver badges5353 bronze badgesansweredMar 27, 2021 at 14:17jessehouwingjessehouwing110k2222 gold badges264264 silver badges358358 bronze badges3Ok that's ... | With some help I managed to recover a local git project from afatal: not a git repository (or any of the parent directories): .gitissue...Why does git not recognise my local repository?But now my local git is ahead on a new local branch (that doesn't exist on the GitHub remote) and is disconnected from the existing rem... | Reconnect git local to GitHub remote without losing a new local branch and commits |
%has special meaning in a crontab (it represents a newline), so you need to escape it to specify a literal percent sign.0 5 1 * * goaccess ... > /home/xan/reports/report-week-$(date +\%Y.\%m.\%d).html | I want to add0 5 1 * * goaccess -f /var/log/nginx/access.log -a > /home/xan/reports/report-week-$(date +%Y.%m.%d).htmlbut crontab always complains about that:Subject: Cron <root@deimos> goaccess -f /var/log/nginx/access.log -a > /home/xan/reports/report-week-$(date +
MIME-Version: 1.0
Content-Type: text/plain; charset=... | crontab script fail: end of file unexpected (expecting ")") when call $(date) |
You can't usefunctions.database.ref()for reading data. That's only for specifying the path where you want to changes to the database to trigger your function. To write a cron-like function, you're not going to write a database trigger. You probably want an HTTP trigger instead, as shown in thesample code. You trigg... | I am in a situation where I need to read the Firebase Realtime Database with a "cron" job.I analysed and played withthisrepository, but I can't seem to understand how I can simply retrieve the list of ALL of the users or all of the data in the Realtime Database. The only function of thefunctions.database.refisonWrite, ... | How can I just read data using the new Cloud Functions for Firebase? |
AppHarbor will build all branches which is great forContinious Integration purposes. You can specify what branch to deploy off bysetting the tracking branch.ShareFollowansweredSep 21, 2012 at 2:28friismfriism19.2k55 gold badges8181 silver badges116116 bronze badges11Thanks for the quick response. You guys provide grea... | I have a master and a development branch in Github and the repository is configured to sync changes to AppHarbor. I configured the master branch as specified at thesupport site.Is there a way that I can isolate the development branch and only push from the master branch? | How do you prevent a development branch in Github from syncing to AppHarbor |
Yes, you should be able to use WebSocket connections to services deployed on Kubernetes. And also the other way around where services in Kubernetes is WebSocket clients with connections to external services. | Is it possible to consume an external (to Azure) API that requires you to establish a wss connection to receive notifications of changes in some kind of Azure container (Kubernetes/Durable Function)?Or do I need to run a Virtual Machine with a background service keeping the socket alive until it's got no more data to s... | Theory: Azure Websockets |
The first 2 rewrite conditions will ignore existing files and directories, but the root directory (normally) always exists. Try to remove the first block.This will be sufficient:RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]For angular routes to work you need anothe... | All I want to do is preventing the site for going http rather than https. Here is my .htaccess configuration. Only www.mywebsite.com and mywebsite.com doesn't go https. Angular routes are ok too. If i write mywebsite.com/signup it goes https as well. What should i do to be able to redirect all scenarios to https ?SCENA... | HTTP redirect to HTTPS while keeping angular routes (.htaccess) |
Configure your HAProxy, or use the port_in_redirect off; directive.
|
I have a setup in which haproxy listens on example.com:80 and proxies HTTP requests to an nginx instance listening on server 20080.
All that nginx is doing is serving static files from /usr/share/nginx/html.
So for example, http://example.com/doc/ maps to /usr/share/nginx/html/doc/.
However, a request to http://exampl... | Nginx behind a proxy: avoid auto-redirects to internal port |
I finally found the problem (thanks the code browsing ;) ).I set the URL for my build tohttp://localhost:8080/jenkins, but the correct URL isHudson:http://localhost:8080/jenkins/job/MyJobName.But unfortunately, this plugin does not meet my requirements, but this is another problem! | I want to monitor the build stability of my continuous integration builds. To do that, I am using theBuild Stability Pluginfor Sonar, but unfortunately, I was not able to make it work correctly.At the end of the build (basically amvn clean install sonar:sonar), the logs display the following information:[INFO] Sensor ... | Build Stability Plugin for Sonar does not gather data from Jenkins / Hudson CI server |
What you should use is ENTRYPOINT
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
RUN pip install numpy==1.12.0
ENTRYPOINT ["python", "t_1.py"]
Now when you run the docker command
docker run -v ./t_1.json:/data/t_1.... |
Below is my Dockerfile content:
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ADD . /app
RUN pip install numpy==1.12.0
CMD ["python", "t_1.py", "t_1.json"]
I want to pass this file(t_1.sjon) as argument with docker run comman... | How to pass json file as an argument using docker run command |
You should store the secrets as config vars in the environment.
|
I have a django project deployed in Heroku. It uses python-instragram.
I have a 'client secret' from an instragram client that I have.
I use git/github for version control.
This client_secret is imported from an untracked file because I don't want to have it on my public github repo. I do something like this:
from cor... | GIT/Heroku sensitive info |
I believe I've gotten this working. I had to restart my Docker daemon with--exec-driver=lxcas I
could not find a way to pass cgroup arguments tolibcontainer. This approach worked for me:# Run with absolute limit
sudo docker run --lxc-conf="lxc.cgroup.cpu.cfs_quota_us=50000" -it ubuntu bashThe necessary CFS docs on band... | I'm trying to set absolute limits on Docker container CPU usage. The CPU shares concept (docker run -c <shares>) is relative, but I would like to say something like "let this container use at most 20ms of CPU time every 100ms. The closest answer I can find is ahint from the mailing liston usingcpu.cfs_quota_usandcpu.cf... | Setting absolute limits on CPU for Docker containers |
Githubgh-pagesis an orphan branch.Orphan branch means that you have a clean branch without history.you create it using the--orphanflag.Once creating the orphan branch you get the latest commit content(same as any othergit checkout -b ...) but without any history.ShareFolloweditedMar 3, 2015 at 13:51answeredMar 3, 2015 ... | I'm new to git and github. I've just created an github page for my project, and I fetched the remote and found it just create another branch named "gh-pages" for me, which is great but strange enough when I see the history of that unique branch: it has a clean history, not relay on the master branch as I had thought, ... | In git, how can I create an 'isolate branch' (act just the same as master branch)? |
1
My bad, deploy key was enter incorrectly. For anyone looking to automate github deployment I would recommend this simple approach
Share
Follow
answered Oct 5, 2015 at 20:54
user4831... |
I have been trying to move away from FTP for some time now.
After getting to grips with GIT (what have I been missing!), pushing commits to GitHub and then finally pulling the changes to my remote server I am looking to have this last stage automated (The remote server should always watch for new pushes to Github and ... | Watch github for push and automatically pull to remote |
Answering my own question:
It seems that it's not as simple as setting something as "public" and expect everything to work. Basically you need to write a policy and apply it to a bucket if you want your bucket to be viewable by public.Here's the page where you can build your policy:http://awspolicygen.s3.amazonaws.com/... | I've started using S3 to host images connected to Rails models. Images are not uploaded by users so I just use aws_sdk gem to store images to S3 buckets.So far I've succeeded in storing the image, but I am confused about the permission. Maybe I'm wrong but it seems most of the documents talking about S3 permission are ... | S3 permission for hosting public images for a web app |
Because ingitbookyou need specify direct link(raw):gitbookis separate project and it can't understandgithubblob link. | I have a document which is hosted ingithuband synchronizes togitbook. The image of this doc display normally ingithub:While it can't be displayed ingitbook:The code of embedding image is as follows:Why does the image display nor... | Why does the image display normally in github, while not in gitbook? |
Assuming that IstioGatewayis serving TCP network connections, you might be able to combine oneGatewayconfiguration for two external ports 80 and 5556:apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: myapp-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
server... | I have a container which exposes multiple ports. So, the kubernetes service configured for the deployment looks like the following:kind: Service
apiVersion: v1
metadata:
name: myapp
labels:
app: myapp
spec:
selector:
name: myapp
ports:
- protocol: TCP
port: 5555
targetPort: 5555
- protocol: ... | How to configure Istio's virtualservice for a service which exposes multiple ports? |
Like @Samirasays it should beif: github.event_name == 'release'.
And i find out that it fires multiple times because release has more than one type. So now my final Github Action looks like this:name: Java CI
on:
push:
release:
types: [published]
jobs:
build:
runs-on: self-hosted
steps:
- uses: a... | i want to upload on a release the builded jar of my maven project on a release commit but i have no plan what im doing. My action at this moment looks like this:name: Java CI
on: [push, release]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses:... | Is there a function to upload with github actions on a release the builded jar to github? |
Do you have the Hamachi VPN client installed on your Mac? It reserves the 5.x.x.x IP addresses for communicating with other Hamachi hosts, meaning that your computer can't talk to anything that has a real address starting with 5. Seethe Wikipedia articlefor more detail. | Since I've upgraded my mac from lion to mountain lion, the ip 5.9.31.48 (api.shellycloud.com) appear to be down (ping said that "Host is down"). So I think that there is somewhere a firewall rule that block all request from this ip or hostname.I use Little snwitch, so to be sure I've clossed it, same for the mountain l... | Ip blocked since I updated my Mac to Mountain Lion |
Generally with helm charts you have a documentation which explains and details all the configurations that you can update.
If there's no documentation, go into the code and check if you find a {{ .Values.xxx }}. The "xxx" will be the name of the config to use to update the value.So you can add these values in thevalues... | I installgarafana/lokiwith helm , now I want to change some configuration file , how can i edit it ? for example increaselogstore size and etc. | How to edit configuration file Helm chart |
As you already found inthe docs:AllowPrivilegeEscalation: Controls whether a process can gain more
privileges than its parent process. This bool directly controls
whether theno_new_privsflag gets set on the container process.AllowPrivilegeEscalationis true always when the container is: 1) run as Privileged OR 2) hasCAP... | I want to set AllowPrivilegeEscalation to false in a nonprivileged container but running with CAP_SYS_ADMIN capability. As per docs "AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged OR 2) has CAP_SYS_ADMIN." . In this case it will be set to true or false ? | Setting AllowPrivilegeEscalation:false |
From thedocker-lab, its seems you missing two more property to make it working with Linux properlyThe default-no-chmod.json profile is a modification of the default.json profile> with thechmod(),fchmod(), andchmodat()syscalls removed from its whitelist.security-seccomp{
"defaultAction": "SCMP_ACT_ALLOW",
"architectures... | I have this seccomp profile:{
"defaultAction": "SCMP_ACT_ALLOW",
"architectures": [
"SCMP_ARCH_X86_64",
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
],
"syscalls": [
{
"name": "chmod",
"action": "SCMP_ACT_ERRNO",
"args": []
},
{
"name": "chown",
"action": "SCMP_ACT_ER... | Docker seccomp works for alpine/busybox but not ubuntu |
47
Does not seem to be mentioned anywhere in the docs though,
If you have created the client app with client_secret you should add the client_secret to the params for it to work.
curl -X POST \
'https://<Cognito User Pool Domain>/oauth2/token?
grant_type=authorization_cod... |
I am having difficulty with the authorization code flow in Amazon Cognito. The workflow that I am trying to build is the following:
A user authenticates with the built-in Cognito UI.
Cognito redirects back with the authorization code.
I send the code to server where it's exchanged for tokens using /oauth2/token endpo... | TOKEN endpoint returns invalid_client without client secret |
1
It is the norm and you should not push and deploy code without going through this process.
Often, a pull request can also trigger a pipeline that will run a test job to ensure that the code is still working.
A single change of code could break everything so this is import... |
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
... | Pull Request Best Practises? [closed] |
Well I didn't figure out a solution with this issue so I moved to another approach which use CloudWatch Event to create a Rule type:schedule and select a target as SQS Queue (the one configured with the worker).
Works perfectly! | I have an application deployed to Elasticbeanstalk and run as worker, I wanted to add a periodic task ti run each hour, so I create a cron.yaml with this conf:version: 1
cron:
- name: "task1"
url: "/task"
schedule: "00 * * * *"But during the deploy I always got this error:[Instance: i-a072e41d] Command fai... | Aws Elasticbeanstalk cron.yaml worker issue |
Step 2 is the only thing you need to do for reports.Here's the detailed instruction:http://pic.dhe.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cc.10.1.0.doc%2Fug_cc_id9882change_schedule_credentials.html | Right now in Cognos, We are getting scheduled reports from a guy X. But since X has left the organization. I want to replace X , from my mail-id, such that everybody gets the scheduled reports from my mail-id. I have already done following with no results:
1. Changed the email credentials for cron jobs in Data Manager... | Cron Jobs in Cognos- Changing owner |
I think Stephen had the right idea. But for what it's worth, I only needed one rule to remove three types of trackers:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)(fbclid|gclid|utm_)[^\&]*\&(.*)$
RewriteRule ^(.*)$ /$1?%1%3 [R=301,L]
</IfModule>I needed this for a Wordpress blog, bec... | I need a proper solution to delete the URL parameter.Example:Input:https://www.hostever.com/blackfriday/?fbclid=IwAR3s1aVKUQELAb0EGW9_mh4qyR-i9ZqfNjFFB6xv_MoNRal2cH--lKofqHMOutput:https://www.hostever.com/blackfriday/So it will delete thefbclid=Input: https://www.hostever.com/?s=blogger
Output: https://www.hostever.com... | How to remove specific QUERY_STRING parameter in .htaccess |
thank you for your feedback,After more hours of investigation I found out what was slowing down my GPU because of this callback ActivationStatshere is the code of my learner:learn = vision_learner(
dls,
'resnet18',
metrics=[accuracy, error_rate],
cbs=[
CSVLogger(fname='PTO_ETIQUETTE.csv'),
... | I am currently using fastai to train computer vision models.I use a development environment of this style.On this machine we have :CPU 16 cores
RAM 64go
GPU Nvidia A100
SSD 200goI devellope on a jupyterlab container, on a 1 node docker swarm cluster.
The jupyterlab instance is installed on this image :
nvcr.io/nvidia... | Low utilization of the A100 GPU with fastai |
See the "or push an existing repository from the command line" to push existant files to your repository. You won't have to load them by a form but with your command line from your project.ShareFollowansweredJan 13, 2018 at 16:37ScoobyDamScoobyDam37933 silver badges1313 bronze badges5cant i upload my files directly fro... | I am new to GitHub and I have to submit one assignment through GitHub.I have been readingthis blogfor uploading files through github, but am not able to see any button labeledUpload fileson my home screen of the repositoryWhat am I missing? | Not able to upload file in the github repository |
4
As you said for Amazon REST API Gateway there are resource policies that can have whitelisting/blacklisting rules based on client IP addresses, example.
HTTP API Gateway does not have a concept of resource policies and it is not possible to whitelist IP addresses with t... |
I am using Amazon HTTP API gateway (v2- which is announced in Dec 2019). Is there any way I can whitelist certain set of IP address which can access this? I know we can achieve this using resource policies in case of REST API Gateway, but can't find any way to do this for HTTP API gateway. There is no "resource policy... | How to whitelist IP addresses in Amazon HTTP API Gateway (v2)? |
<div class="s-prose js-post-body" itemprop="text">
<p>To Install:</p>
<ol>
<li>Go <a href="https://docs.docker.com/desktop/install/mac-install/" rel="noreferrer">Here</a></li>
<li>Click the "Get Docker" or "Get Docker Desktop for Mac (Stable)" button.</li>
<li>Double-click the DMG</li>
<li>Drag Docker into Applications... | <div class="s-prose js-post-body" itemprop="text">
<p>My question is</p>
<p>How to easily install docker to have it available in terminal and how to uninstall docker on osx?</p>
</div> | How to easily install and uninstall docker on MacOs |
As far as I know the inventory report does not run on-demand. It's quite a heavy operation for AWS for many buckets have billions of objects, so I can understand why they don't provide that service for free.The aws cli can be used of course to get an inventory but it's incredibly slow (takes HOURS if not days just to l... | Is there any way to manually kick off an Amazon S3 Inventory report job?I'm working on a project that creates daily inventory reports to another account but I can't seem to find a way to manually kick off the run. We're in the design / development phase of a data telemetry project and are tweaking our inventory configu... | Manually trigger an Amazon S3 Inventory Report |
Just in case some one comes looking for the answer here. I noticed that if you have multiple apps scattered across multiple heroku teams using same wild card certificate, only in that case you get this issue. To add the certificate you need to transfer all apps under one team and then add the certificate to your desire... | When I try to add a custom domain to my app. It all the time give me following error. Can some one point out what wrong am I doing?Just to clarify I have removed all ssl certificates on all my apps.
But still the error says thisDomain "mysubdomain.domain.com" could not be created:
mysubdomain.domain.com conflicts with ... | Unable to add custom domain to my heroku app |
Welcome to the wonderful, horrible world of time!;-)In the USA we don't have a unique start time of "Black Friday". We don't even all celebrate New Years at the same moment. Instead we follow our local time zone rules. Not only are there multiple time zone rules covering the single country, even some individual stat... | I have rankings by country and month, I need to reset the ranking at the beginning of the month 1st day at 00:00.I have a cron task every 15 minutes checking if with the timezone of the country is day 1 of the month at 0:00 (because some timezones have deviations +x.45 or +x.30 minutes). But, what is the criteria when ... | Running periodic task each month by country with different timezones |
Just thought I'd answer this for anyone coming along - as far as i can make out the answer to the question is no, not really - unless I'm doing it the wrong way - ( and I think not ) then the best method of backing up a custom theme is to first compress the entire app, skin and media ( if relevant) directories into on... |
I am making some changes to a purchased magento theme. Is there any simpler way to backup my work other than by copying the relevant folders inside app skin and media and their directory structures.
| Backup Magento Theme |
After some reading in:https://www.terraform.io/docs/providers/aws/r/s3_bucket_notification.htmlthe solution is:resource "aws_s3_bucket_notification" "bucket_notification" {
bucket = "${data.terraform_remote_state.stack.bucket_id}"
lambda_function {
lambda_function_arn = "${module.some_lambda.lambda_arn}"
e... | How do I add a trigger to aws lambda using terraform?
the desired trigger is s3, object created all.my terraform source code arouond the lambda is:module "s3-object-created-lambda" {
source = "../../../../../modules/lambda"
s3_bucket = "${var.s3_lambda_bucket}"
s3_key = "${var.s3_lambda_key}"
name = "${var.lamb... | terraform - how to add s3 Object Created trigger for lambda |
You can clear in-memory cache in Picasso only per image:Picasso.with(context).invalidate(imagePath);Removing all cache is somewhat tricky and describedhere.File cache is delegated to HTTP Client, so it's not possible to clear it from Picasso. For more information refer thisanswer. | I am using the Picasso library on my Android app to load images. I would like to add an option called "Clear images cache" on my app that would remove all the downloaded images from the cache, but obviously that would remove the downloaded images from my app only (I mean not from the other apps).Is there a simple way t... | Clearing Picasso images cache |
That will not be doable AFAIK since therun_idordsis only available for each DAG/task run. You need to handle this at your script by passing in parameters in the task definition. Example:t1 = BashOperator(
task_id='t1',
bash_command="extract.py --path='{{run_id}}'")
...Using the parameters, let the scrip... | I am using airflow with kubernetes executor.It works when I use executor_config to mount a PersistentVolumeClaim.However, I would like only to mount a subPath that would be dynamic, something like this :executor_config={
"KubernetesExecutor":
{"volumes": [
{
"name": "workdir-... | Airflow - Kubernetes Executor : How to only mount only a directory of a Persistent Volume Claim that correspond to the run_id |
Try this command:git remote set-url origin https://[email protected]/SRIDEV1999/stack_overflow_nextjs14.git/This command updates the remote URL for the "origin" remote in your Git configuration. After running this command, subsequent Git operations that involve the remote will use the updated URL with the specified use... | when I try to a next JS project to this repository -'https://github.com/SRIDEV1999/stack_overflow_nextjs14.git/' .
It says remote: Repository not found. fatal: repository 'https://github.com/SRIDEV1999/stack_overflow_nextjs14.git/' not found
How can I push my project to this repositorywhen I try git push - (remote: Re... | remote: Repository not found -while git push |
Did you check if you have.dockerignorein your project?DockerCOPYwill silently ignore all patterns mentioned in.dockerignore.ShareFollowansweredNov 5, 2016 at 8:29TombartTombart31.4k1616 gold badges128128 silver badges142142 bronze badgesAdd a comment| | First I would like to thank you for helping me.
Please be kind as it is my first post here.I am trying to build a docker container but the COPY step seems not to work properly.Here is my DockerFileFROM maven:3.3-jdk-8
RUN apt-get update
RUN apt-get -y install vim tree unzip
WORKDIR /usr/src/app
COPY . /usr/src/app/Her... | Docker copy misses some files |
If you haveRUN bundle config --global frozen 1in your Dockerfile you'll need to remove it. | Running normalbundle installon a Rails container.Met with..You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the /application/Gemfile freeze
by running `bundle config un... | `bundle install` on Docker: fails because 'deployment mode' |
Proof that your syntax is fine:
#Create a minimal, reproducible example
gene_id <- gl(3, 3, 9, labels <- letters[1:3])
start <- rep(1:3, 3)
href_pos <- data.frame(gene_id=gene_id, start=start)
d1 <- ddply(as.data.frame(href_pos), "gene_id", function(href_pos) href_pos[which.min(href_pos$start), ])
gene_id start
1 ... |
What I am trying to select the rows that have the same gene_id, but have the minimum value of the start coordinates: href_pos$start. Why do I get this error, even though I have a memory limit of ~ 16Gb? Or what am I doing wrong? I have the following code:
head(href_pos, 5)
chr region start end str... | error when trying to extract row from a table with a condition in R |
If the text is a string and if its required to set a condition that if it exists then best way is to use the below condition in set processor.ctx.prometheus?.labels?.namespace!=nullThis is how I implemented the above scenario by using ingest node pipeline."set": {
"field": "kubernetes.pod.name",
"copy_from": "prome... | I want to create a new field called kubernetes.pod.name if fields called prometheus.labels.pod exists in the logs. I found out that from the set processor I could copy the value which is present in prometheus.labels.pod to a new field kubernetes.pod.name but I need to do this conditionally as the pod name keeps on chan... | How to copy a value from one field to other if a field exists by using ingestnode pipeline |
Make a list of 1 and replicate it.
L <- rep(list(x), 1000)
|
Suppose I have some object (any object), for example:
X <- array(NA,dim=c(2,2))
Also I have some list:
L <- list()
I want L[[1]], L[[2]], L[[3]],...,L[[100]],...,L[[1000]] all to have the object X inside it. That is, if I type into the console L[[i]], it will return X, where i is in {1,2,...,1000}.
How do I do this ... | Populate list with same object efficiently |
There is nothing integrated in .NET related to that.
But I think this is what you're looking for (can use in .NET) ;) :
http://research.microsoft.com/en-us/projects/Accelerator/
also FYI: http://brahma.ananthonline.net/
|
With .Net 4.0 coming up, and the new parallel extensions, I wondered if the CLR will be able to optimize and push some calculations to the GPU? Or if any library which can help with the task exists?
I'm no GPU programming expert at all, so forgive me if this is a silly question. Maybe the CLR doesn't support interfaci... | Is it possible to push simple, parallel calculations to the GPU in .Net? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.