Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
For PowerShell Core you will need to explicitly import the AWSPowerShell.NetCore module before your script or command runs. Due to the large number of cmdlets (over 5000 currently) in the module we cannot at present list the exported cmdlet names in the module manifest and are exploring other alternatives (such as in f... | I have a script that works perfectly to upload to an S3 bucket with Windows PowerShell, but it doesn't work with PowerShell Core. According to Amazon, most of the cmdlets that work in one should work in the other.This is the command I'm using:Write-S3Object -BucketName $bucketName -Folder $localDir -KeyPrefix $targetFo... | Uploading to an Amazon S3 bucket with PowerShell Core |
Try the following query:sum(custom_metric{label1=~"abc|def|jkl"})It works in the following way:It selects time series matching label selectorcustom_metric{label1=~"abc|def|jkl"}- seethese docs. Note that the required values for thelabel1are enumerated in the regexp filter with|delimiter.It sums values for the selected ... | I have my metrics exposed by Prometheus as:custom_metric{label1="abc", label2="xyz"} num1
custom_metric{label1="def", label2="uvw"} num2
custom_metric{label1="ghi", label2="rst"} num3
custom_metric{label1="jkl", label2="opq"} num4I want to query the metric such that I get sum of metric forlabel1="abc",label1="def"andla... | Prometheus Query to aggregate metrics by certain label values |
Unfortunately, MATLAB is actually running out of memory when it attempts to concatenate your matrices. There are certain memory tricks you can do to try to make this process go smoother (kill certain programs before starting matlab). Ideally you would want as little as possible running while you are trying this operati... | My code reads 7 folders of images and extract features in 7 matrices and collect all 7 matrices in one big matrix by using "vertcat", In total I have a matrix which contains features of 1745 Images and i want to classify them using Multi-SVM classifier.
This is the Error:Error using vertcat Out of memory. Type HELP MEM... | How can i solve "Error using vertcat Out of memory"? |
-1Unless I've misunderstood your question, you should be able to usealiasByNodeto achieve this.Click on the metric editor, and you should be able to add it like in the example.Here's theexample | As the title suggests, I have a Grafana 'graph' that I populate with points from InfluxDB. The elements of the time series have two fields: 'rate' and 'source'. The graph is time on the x-axis of course, and 'rate' on the y-axis. I'd like to see 'source' when I hover over a point. Is this possible with Grafana / In... | Using a field from influxdb as the title / label for a point on a grafana dashboard |
Use environment variables to hide your sensitive data. Likespring.data.mongodb.host=${MONGO_DB_HOST}
spring.mail.host=${MAIL_HOST}Set the values at your dev environment.I don't have any idea about how to hide your old commits. | I have a repository on GitHub that I would like to make public so recruiters can view it.
This repository though holds my SMTP and a MongoDB URI that shouldn't be shared with others. This information is in my application.properties file.What's thesimplestway to hide this sensitive data and also make sure no one can go ... | Spring and GitHub: hide sensitive data |
Two possible solutions.First one, you can usecdin your cron:my cron : 1 * * * * cd /xyz/local/www/abc/ && vendor/bin/phing testSecond solution, use the-foption:my cron : 1 * * * * /xyz/local/www/abc/vendor/bin/phing -f /path/build.xml testIf you have problems with relative paths inside your buildfile you should also se... | I am stuck from quite a few days,I need few good ways to call phing task from cron job.The actual issue is after calling phing task from cron, the php engine cannot locate the build.xml file, which is located to the main directory of my projectbuild.xml path : abc/build.xmlphing path : abc/vendor/bin/phingmy cron ... | Call phing task from cron |
You can execute the command as root by doing:systemctl --host[email protected]reload nginxThe example.com host needs to PermitRootLogin
As you don't want to prompt for password you need to create a certificate just like you did rsync and stick it into ./ssh/ | I'm using rsync to relay nginx configuration from server A to server B:0,10 * * * * rsync -avz -O --delete /etc/nginx/sites-available -e "ssh -i /home/ubuntu/key.pem"[email protected]:/etc/nginxOnce that is done (every 10 minutes) I need to reload the remote server's configuration. How can I executeservice nginx reload... | How to reload nginx of remote server using cron as root user |
The description of the problem seems inconsistent. Most likely, the claims that "All possible firewalls are disabled [... and] all ports in Inbound Rules are opened" are one or both incorrect or misleading.Ifthe test client can successfully ping the destination machine, andnetstatshows that a client is listening to 0.... | I run a server (Photon) on my pc and it uses port 9090.I can access it with the local IP address, with the IP address of the internal router network but not the public one. Even through this public IP address pings perfectly.To run the server publicly I DON'T use a router but direct connection. All possible firewalls a... | How to open a publicly accessible port? |
How can I sync [a GitHub] fork to the same state as the original repository using the API or command line git commands?I don't know ifghhas anything to do it, but from command-line Git you can get reasonably close with a combination ofgit clone --mirrorandgit push --mirror.Use these with great careasgit push --mirrorca... | I did create a fork of a github repository using the API. Now after some while the fork and the original repository are out of sync.How can I sync the fork to the same state as the original repository using the API or command line git commands?I tried to remove the forked repository but I do not have the rights to remo... | How to "sync" a forked repository so it has the same state as the original repository? |
6
After some searching, it turns out the error was caused by appending the output to list in GPU. With following code, the error is gone.
with torch.no_grad():
for d in train_dl:
d = [i.cuda() for i in d[:3]]
out_list.append(model(*d)[0][:, 0... |
I am curious about the memory usage of transformers.BertModel. I would like to use the pretrained model to transform text and save the output of token [CLS]. No training, only inference.
My input to bert is 511 tokens. With the batch size being 16, my code runs out of memory. The GPU has 32GB memory. My question is ho... | How to calculate the memory requirement of Bert? |
If you want to just visualized the PostgreSQL database metrics on grafana then you can use thisplugin.However if you want to view the Spring Boot related metrics ( http response status, performance, jvm stats, connection pool stats etc.) then a more popular way is to setup Prometheus as the time series datastore and me... | I am trying to useGrafanafor visualization. I have aSpring-bootapplication which is integrated withPostgreSQL. I want to fetch the data from Postgres and show it inGrafana.So far, I have found maven dependency for grafana which is as below :<!-- https://mvnrepository.com/artifact/com.appnexus.grafana-client/grafana-api... | Grafana integration with springboot and postgres |
I don't know how it is with CUDA 4.0, but in 3.2 you simply cannot deduct if it is CPU or GPU pointer based solely on the address stored in it.
A way around it would be to create a class CudaPtr<T>, hide a pointer there and provide basic functionality (e.g. memset, memload, memstore, memalloc etc. which would in turn ... |
In C/CUDA, if I am passed a pointer, how can I programmatically determine whether the pointer points to memory on the CPU or the GPU? Is there a CUDA function for this purpose?
| How do I determine whether a buffer is on the GPU or the CPU? |
The answer is NO it does not. You can fire off a renewal immediately after generating a cert over HTTP only. | My Let's Encrypt --standalone server is serving over HTTP only.When I generate the certs in standalone mode it works fine. Obviously when you generate certs you don't have any so HTTP only makes sense.My question is, when I run ..letsencrypt renewDoes the renew command work with HTTP only? or does the renew command exp... | Does Let's Encrypt need HTTPS to renew certs? |
After every solution I found didn't work, I tried re-creating my cluster and running the same commands and it has simply worked... | I'm having trouble in installing Helm to one of my GKE cluster through gcloud shell.When I run:helm install --name mongo-rs-mongodb-replicaset -f 3-values.yaml stable/mongodb-replicaset --debugThis is what I get:[debug] Created tunnel using local port: '39387'
[debug] SERVER: "127.0.0.1:39387"
[debug] Original chart ... | Can't Install Helm on GKE Cluster |
I think I have found the reason. According to this bug report:
https://bugs.openjdk.java.net/browse/JDK-6478546
FileInputStream reserves the space directly into the native memory. It is actually worse when increasing the size of the Max heap space, since there is actually less space for native maps.
The reason why my ... |
I am experiencing a very strange issue, which I would like to reproduce in a SSCCE, but I can't.
I am running my program in Java8 (32bits) with -Xmx1024m, this code is loading a pretty big file (120MB) into an array of bytes using a FileInputStream.
The problem is that, whereas in Java6 I had no problems, in Java8 I g... | OutOfMemoryError before reaching the maximum of the heap space? |
productIdin thewishListis aString, while the_idfield inproductis anObjectId.You can change the type of theproductIdin thewishListor you can use$lookupwithletandpipelineto project the_idinproductas a String value before comparing it towishList.productId, like this:{
"$lookup":
{
"from": "products",
... | WishlistproductMy codeGetting Wishlist Blanked . please help me why wishlist array shows no data | Lookup in mongodb not working when getting objects from array of objects |
AFAIK, by default, WebView works like a regular Web browser. While it caches things, it still makes requests (with If-Modified-Since and related HTTP headers) to ensure that it has the latest editions. Also, WebView presumably honors other cache control directives sent by the server, perhaps to not cache certain thing... |
My question is, when you are in a webView, and you have gone through several pages.
You want to go back. Is the last page you have been to cached, so that you would not need internet connection to go back?
| Android: when in web view: Does the browser cache the previous page? |
This is explained in the Github API documentation, seehttps://developer.github.com/v3/repos/#list-all-public-repositories.The pagination is done by using thesinceURL parameter instead ofpage, the value ofsinceis the numerical id of the last repository that you already have seen.
If you omit thesinceparameter the respon... | I want to get all public Github repositories (api.github.com/repositories) with pagination (for example, get it by 10 repos). I triedhttps://api.github.com/repositories?page=2&per_page=10, but it's works only on search, but doesn't work on all public repos. How To get all public repos with pagination? | Get all public github repositories with pagination |
I recommend you to create a Docker volume for the image.Then it is possible to inspect the volume and edit the files directly (i.e. via VSCode).The path to the theme files iswp-content/themes/.. | Could you please point me to a right direction:Description:
I wanted to modify a WP theme using dockerized WP.
I could edit the theme (Appearance > Theme Editor) then edit the*.phpfile.
Yet, I could notUpdate File. There is the following error:Unable to communicate back with site to check for fatal errors, so the PHP c... | Customize Wordpress (WP) themes in a docker container |
All of the CUDA capable architectures released so far operate like an SIMD machine. When there is branch divergence within a warp, both code paths are executed by all the threads in the warp, with the threads which are not following the active path executing the functional equivalent of a NOP (I think I recall that the... | I have a question about branch predication in GPUs. As far as I know, in GPUs, they do predication with branches.For example I have a code like this:if (C)
A
else
Bso if A takes 40 cycles and B takes 50 cycles to finish execution, if assuming for one warp, both A and B are executed, so does it take in total 90 cycles... | nvprof produces unexpected branch efficiency results [duplicate] |
Answer to an old post, but maybe it helps someone. I have looked for a solution on forums and ultimately found it in the docs for aws-sdk. Well, a couple of hours of try&fail can save you several minutes of reading the docs or READMEs. Anyway. First, I use s3.upload instead of s3.putObject. Afterwards, the function is ... | I am trying to do a simple file upload from lambda to s3 using nodejs. The lambda execution works fine without any error, but s3 upload is not happening. Since there is no error, I am not able to debug the issue. Below is the snippet that I am trying.var s3 = new AWS.S3();
var params = {
Bucket : "testbucketuploads... | AWS s3 upload from lambda not working and no error |
That sounds like a temporary GitHub issue.
Creating a fork isn't dependent of a license or vpn. It's just a http call in your browser.
Update: I forked the repo without issue.
|
I'm trying to fork this repository, but getting an error message:
You can't fork this repository at this time.
I've read the license, and tried forking from another computer using VPN, in case of security conflict of my browser and GitHub, but it still don't work, and I can't even guess why so. Please tell me, wha... | Can't fork a repository on GitHub |
The following query would return the average percentage of paid visitors on the site during the last 5 minutes:100 * rate(paid_visitors[5m]) / avg_over_time(total_number_of_visitors[5m])Filtering bydeviceandbrowserlabels can be performed in the following way:100 * rate(paid_visitors{device="$device",browser="$browser"}... | I have the following metrics:total_number_of_visitorswhich is agaugethat increases when a visitor enters the website and decreases when they leavepaid_visitorswhich is acounterthat is incremented when a paid visitor enters the website and stays for at least 5 minutes.Each one of these metrics has two common labelsdevic... | Calculate percentage of multiple prometheus metrics and display in Grafana |
Modify your command to store the logs in log files instead of dumping it to /dev/null.Options--max-time--connect-timeout--retry--retry-max-timecan be used to control thecurlcommand behaviour. | I have 50+ cronjobs like the one given below running in my Centos 7 server.
curl -shttps://url.com/file.phpThis runs every 10 minutes. When running manually from the shell it only takes 1-2 minutes. It also is working fine using cronjob. The problem is that it does not exit after the execution. When i check my processe... | Cronjob stuck without exiting |
This case should be perfectly handled by SonarJava. Lombok annotations are taken into account at least since version 3.14 (SONARJAVA-1642). The issues you are getting are resulting from a misconfiguration of your Java project. No need to write any custom rules to handle this, this is natively supported by the analyzer.... | import lombok.Data;
@Data
public class Filter {
private Operator operator;
private Object value;
private String property;
private PropertyType propertyType;
}For code above there are 4 squid:S1068 reports about unused private fields. (even they are used by lombok generated getters). I've seen that some... | Why does SonarQube consider a private filed as unused? [duplicate] |
Your pom configuration of themaven-checkstyle-pluginandmaven-pmd-pluginhave no bearing on the SonarQube analysis. There is no way to feed existing Checkstyle or PMD reports into an analysis.To use Checkstyle and PMD rules in an analysis, turn those rules on in the relevant Quality Profile (presumably the default one). ... | I read "Sonar does not provide a mechansim to reuse reports generated by these plugins" (I am interested in PMD and Checksyle plugin) inthis post.
Does it mean that Sonar build app by itself?If I configure in my pom:maven-checkstyle-pluginandmaven-pmd-pluginpath to SonarQube server (Checkstyle Plugin and Sonar PMD Plu... | How do SonarQube plugins get data for reports? |
you can try "tty" to see if it's run by a terminal or not. that won't tell you that it's specifically run by cron, but you can tell if its "not a user as a prompt".
you can also get your parent-pid and follow it up the tree to look for cron, though that's a little heavy-handed.
|
Not having much luck Googling this question and I thought about posting it on SF, but it actually seems like a development question. If not, please feel free to migrate.
So, I have a script that runs via cron every morning at about 3 am. I also run the same scripts manually sometimes. The problem is that every time I ... | Can a bash script tell if it's being run via cron? |
Looks like there is an issue with the label selector.
Update your service to thisapiVersion: v1
kind: Service
metadata:
name: mysql-service
labels:
io.kompose.service: mysql-db-app
spec:
selector:
io.kompose.service: mysql-db-app
ports:
- port: 3306
targetPort: 3306The service label selector s... | so I've got a Kubernetes cluster where I set up a deployment with two pods. In one pod, there is a MySQL container running and in another pod an Ubuntu container. In the Ubuntu container, I want to execute a Python script, that connects to the MySQL container.But when I try to connect to the other pod, it says:mysql.co... | Kubernetes - cannot connect to MySQL pod from other pod inside cluster although service exists |
1
Just in case somebody is still looking for answer, you need to change your version.php file back to the version matching your last working configuration (in this case probably to 20.0.5.2). Definitely use backup of this file if you have it.
If you have no backup, you can ... |
After accidental run, I can't get nextcloud's database and image in sync.
My database is somehow updated to the latest version, but the image (apps) are not.
In my config.php the version is: 'version' => '20.0.5.2'
My version.php shows: $OC_Version = array(22,1,1,2);
If I spin up docker image version 20.0.12, the imag... | update nextcloud inside docker |
I think I figured it out. I still have the querysum (container_memory_working_set_bytes {namespace!=""} ) by(namespace).Then added a transformation "Add field from calculation", again with the defaults. I thought this would only work for the properties listed at the time of creating the transformation/query, but spinni... | I have Kubernetes running (K3s on TrueNAS scale). I've deployed Prometheus and Grafana and am able to access the metrics in Grafana. I now want to create a stacked line chart that shows memory usage by namespace and total memory used by Kubenetes.I got it working without the total with this query:sum (container_memory_... | How to get Grafana to include sum of values in tooltip or legend for stacked linechart |
Check your cache manager settings.For example:RedisCacheManagerhas an overloaded constructor where you can specifycacheNullValues; this is false by default - try setting it to true.https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/cache/RedisCacheManager.html#RedisCacheManager-org... | I am using@Cacheableannotation to cache the results of my method. For performance reason I want to cache bothnulland non-null values returned from method.But problem here is Spring is caching non-null values but not caching null for some reason.Here is my code:@Cacheable(
cacheManager = "promoCacheManager",... | Spring Boot Cacheable - Cache null values |
You cannot pass those parameters when usingkubectl create.There are two alternatives:Use tkn cliYou can usetkn, a purpose made CLI for Tekton. Then you can start a run of a Pipeline with, e.g.:tkn pipeline start build-deploy \
--param registry-address=yay \
--param repo-name=nay \
--workspace name=source,cl... | I have a TektonPipelineandPipelineRundefinitions. But, I couldn't achieve to runPipelinevia passing parameter.apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: build-deploy-
labels:
tekton.dev/pipeline: build-deploy
spec:
serviceAccountName: tekton-build-bot
pipelineRef:
name: bui... | Tekton running pipeline via passing parameter |
Runningsudo crontab -ewill create cron tasks for the root account, and these tasks will be executed as root. Runningcrontab -ewithout sudo will create cron tasks for your user, and the tasks will be executed as that user. | By accident made 2 different crontabs:First with sudo crontab -eSecond with crontab -eJust asking what happens (because did not find an explanation):1) If they are different, are both being executed?2) If both are identical, which one is executed? Or prone to a 'collision'? | Effects of 2 crontabs |
You'll likely need to set up account linking on your skill first. It can be a bit of a process, but check out this page here. I would suggest using Google or Amazon as your OAuth provider.
Account linking allows you to associate a particular user and their echo with an entry in a database you own. So after you have a... |
I am currently developing an Alexa skill based on health care. So I need to store information about diseases, their diagnosis and symptoms. I have made a basic skill including information about one disease in a file, made a zip file, uploaded it to AWS Lambda and got certified by Amazon. Now I need to make this more e... | How to store the data for the Alexa skill I am developing? |
TheKind: EncryptionConfigurationis understood only by the api-server via the flag--encryption-provider-config=(ref); in AKS, there’s no way to pass that flag to the api-server, as it’s a managed service. Feel free to request the feature in thepublic forum.ShareFollowansweredJul 20, 2019 at 4:07Alessandro VozzaAlessandr... | I am unable to figure out how to change my kube-apiserver. The current version I am using from azure AKS is 1.13.7.Below is what I need to change the kube-apiserver in kubernetes.The kube-apiserver process accepts an argument --encryption-provider-config that controls how API data is encrypted in etcd.Additionally, I a... | Encrypting Secret Data at Rest in Kubernetes AKS? |
In order to just make sure that the features are working in a given browser (very synthetic test), you can do as followsTest 1: testdns-prefetch(just DNS) with Chromeserve the following HTML on localhost<!doctype html><html><head>
<link rel="dns-prefetch" href="//ajax.googleapis.com">
</head><body></html>go tochrom... | I'm trying out the<link rel="dns-prefetch">and<link rel="preconnect">tags and I'm trying to see whether they help for my site. I can't find any online resources about how verify if these hints are working using browser dev tools, extensions, or other software. It seems like you just evaluate whether they may be useful ... | How do you test the effects of dns-prefetch and preconnect |
You require a standard front-controller pattern, which can be achieved with a single directive in.htaccess:FallbackResource /index.phpAny request that would otherwise trigger a 404 is passed to/index.phpinstead.An alternative method (which is perhaps more commonly seen) is to use mod_rewrite instead. For example:Rewri... | The URL I want to achieve:https://example.com/VdnbzeHfua/ep1_mp4Note : My page (index.php) is located in root folderwhen I access this URLhttps://example.com/VdnbzeHfua/ep1_mp4it should not look forward for sub foldersi will get and use the values in the URL with PHP (index.phpin root folder) like this<?php
$url ... | Htaccess and PHP Direction or routing |
I would check the target groups's health check since it is waiting for a replacement task to become healthier. Is your current deployment of ECS targets HEALTHY? If they are not, the ALB will be trying to bounce these containers to try and refresh them to have a health check passed. Also, does your CodeDeplot have acce... | As the title suggests, the blue/green deployment for ecs never finishes because theinstalllifecycle event never finishes and timesout.This is the picture showing that:The appspec file:version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: <TASK_DEFINITION... | AWS Blue/Green CodeDeploy to ECS install lifecycle event timesout |
0
Strongly recommended here use of logrotate utility available on most of *nix distros. It has following options of your interest:
compress
Old versions of log files are compressed with gzip by default.
dateext
Archive old versions of log files adding a daily ext... |
I have a ubuntu bash script that makes a .zip file of the home directory of that user, for example admin, the name of the zip is like this YYYY_MM_DD_HH_MM_backup_admin.zip but for example after that I make another backup of the user admin2.
Those files are going to the folder /home/admin/files_zip, then with that I w... | ubuntu bash script to make backup of /home/$user but keep the newest one |
You can use thePopenfunction ofsubprocessto grab thestderrand print in python console, asDocumentationsays forsubprocess.callNote Do not use stdout=PIPE or stderr=PIPE with this function as that
can deadlock based on the child process output volume. Use Popen with
the communicate() method when you need pipes.proc =... | I'm trying to download a specific Docker image, where the user will input a version. However, if the version doesn't exist, Docker will throw an error.I'm usingsubprocess.callto pipe to the Terminal from Python 3.Sample code:from subprocess import call
containerName = input("Enter Docker container name: ")
swVersion = ... | How do I catch a subprocess.call error with Python? |
I was working on a similar thing lately, here is the code I was able to get working usingaws-requests-auth, it has built-in support for boto3:(Notice:host, region and quote method safe parameter)import requests
from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
auth = BotoAWSRequestsAuth(
aws_host='awis.us... | I'm able to authenticate and connect to AWSQueryConnection using Boto3, but whenever I try to get information about a URL using the 'UrlInfo' method, I receive a204response with no data.import boto
from boto.connection import AWSQueryConnection
conn = AWSQueryConnection(aws_access_key_id='', aws_secret_access_key='', ... | How to make AWS AWIS UrlInfo api request using Boto3 credentials |
As this topic might be quite opinionated I will simple go on from you wonderings:Yestwodevelopmentbranches sounds logical in your caseThemasterbranches (two in your case) (they don't have to be named master at all) would alwaysreflect a production-ready state(like described inA successful Git branching model) | We're small team migrating to Git and I'm wondering which branching model we should choose. I read many articles online already I found out that the Gitflow as describedhereorhere, even if generally seems fine, may not fully suit out needs.What I found missing is the support for 2 major releases at the same time. Let's... | Git branching strategy for parallel release lines |
Please change this line:RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Into this:RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]This means if the visitor go to http (which is port 80) will get redi... | So my issue is if I visit my website it is unsecured. However, if I puthttps://www.websitename.co.ukit will display the website with https and secure bar. However, when I upload my htaccess file the website just doesn't want to connect.If I comment out the code below from the htaccess file, the website works but doesn'... | Force http to https via htaccess file, not working |
The first one uses the git protocol and the second one uses the ssh protocol. As github does not provide git protocol access you are getting an error.
|
I'm following the git basics guide at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository, and after having had my initial question answered at Can't clone repo using git clone git://... - ok with git clone http:// regarding how to use the git URL to clone a repo, I'm now wondering what the difference is be... | git clone: what's the difference between url[email protected]/... and url git://github.com/ |
There is nothing wrong with passing configuration through the environment (that's how you're supposed to use Docker).
However, depending on what you're trying to achieve, it might be more relevant to actually build the container image ahead of time, and include the cloned repository in there.
You could actually have m... |
I want to be able to declare a variable in dockerfile and pass it as an argument when container runs for user to provide. The variable is actually a git hub URL that needs to be cloned in the container.
So far I thought about declaring a ENV variable and passing it using -e in run command. How else can I pass a varia... | Passing variables as arguments to docker container |
You can't store like this in Redis. Instead you can use a reference of that list inside the value and make use of it.
Here is an example:
I have a hash contains NAME and urls. where urls is a list.
hset("publisher","NAME","Domain");
hset("publisher","Urls","UrlsList");
When you get Urls from hget("publisher","Urls").... |
I am trying to save a list as value in set for specific keys but could not find any way, Is it possible in redis?. I am not sure weather we can use redis save data like this . If not please correct me and help to do that.
I want to store sample data like in below format
publisher
{ NAME : Domain,
//l... | How to save list as a value in set in Redis |
Accessing a Kafka cluster from outside a container network is rather complicated if you cannot route directly from the outside to the pod.When you first connect to a Kafka cluster you connect to a single broker and the broker returns the list of all brokers and partitions inside the Kafka cluster. The Kafka client then... | I have a landoop kafka image running on a Pod on minikube k8 cluster on my mac. I have 2 different services to expose the port 8081 for schema registry and 9092 for broker. I have mapped the ports 8081 -> 30081 and 9092 -> 30092 in my NodePort services so that I can access it from outside the cluster.
But when I try ... | Access kafka broker outside k8 minikube cluster |
Use a mapping template.
First, in the Method Request section, you should see userId and id as Request Paths
Then, in the Integration Request, do not choose Proxy Integration.
Then in the Mapping Templates section, add a new mapping template for application/json of the form
{
"id" : "$method.request.path.id",
"... |
I have a lambda, written in Java, that accepts a Request Object of the structure
{
"id": "be1c320a-144f-464d-b32c-38ec7fb4445b",
"userId": "foobar"
}
When I call this Lambda through the test interface with such an object, it works fine.
I want to create an API where a GET request to
/users/foobar/items/be1c320a-... | How do I map path parameters from an API Gateway API to the Request Object of a Java Lambda |
All inputs and outputs are strings.. so you need to do string comparison like == 'true'.You can also use toJson and fromJson like thisecho ::set-output name=foo::${{ toJSON(false) }}
if: fromJSON(steps.bar.outputs.foo)ShareFollowansweredFeb 2, 2022 at 20:16KafKafOwnKafKafOwn49633 silver badges88 bronze badges3thx, but... | I need to trigger the 'Slack Notification About Invalid Case Ids -- Stage 2' job only if INVALID_CASE_IDS_ARRAY is not empty.So I've created the 'Stage 1' job to get the boolean variable for triggering my 'Stage 2' job, but it just skips the 'Stage 2' job.I've already triedif: ${{ steps.invalididslackreport.outputs.inv... | Troubles with if statement on github actions |
I had the same problem. It turned out that I had version 7.0 of PHP active rather than version 5.6. Once I switched to 5.6, it all worked fine. | I am trying to upgrade from an earlier version of sagepay php integration to the new v3.0. First step is to get the demo working. I downloaded VspPHPkit from the site and installed it under localhost/sagepay on my Ubuntu development environment.I have setup the MYSQL and have checked that the mod_rewrite on Apache is... | Sagepay v3.0 php integration demo not working |
I think you may be after the 'QSA' flag, which will append the query string from the original request to the redirected request, e.g:#example.com/regions/fife/
RewriteRule ^regions/([A-Za-z0-9\-\+\']+)/?$ /regions.php?region=$1 [L,QSA] | I have a couple of rewrite rules in htaccess. They work on one server but not another. My script is as follows (I've commented out how the urls look):RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/images/
#example.com/regions/fife/
RewriteRule ^regions/([A-Za-z0-9\-\+\']+)/?$ /regions.php?region=$1 [L]
... | RewriteRule variables blank |
Ok, here's how you can set up Jenkins to set GitHub build statuses. This assumes you've already got Jenkins with the GitHub plugin configured to do builds on every push.Go to GitHub, log in, go toSettings,Developer Settings,Personal access tokensand click onGenerate new token.Checkrepo:status(I'm not sure this is nece... | Is there a way to show the Jenkins build status on my project's GitHub Readme.md?I use Jenkins to run continuous integration builds. After each commit it ensures that everything compiles, as well as executes unit and integration tests, before finally producing documentation and release bundles.There's still a risk of i... | How to notify Github after merge job is finished? [duplicate] |
Fromthis article:select sys.schemas.name 'Schema', sys.objects.name Object, sys.database_principals.name username, sys.database_permissions.type permissions_type,
sys.database_permissions.permission_name,
sys.database_permissions.state permission_state,
sys.database_permissions.state_desc,
state_de... | Is there a check I can make to see if a user has modify rights to any object on theserverwithout running the query as that user?I need to create a logon audit report that lists logon times for accounts that have insert/update access for something on the server(i.e. on any database on the server)This also needs to not i... | tsql for getting a user's permissions without impersonation |
sonar.cs.vscoveragexml.reportPaths=myReport.xml should have something like myReport.coveragexml. Convert xml file to .coveragexml
It should work | I'm using Visual Studio 2013 to generate coverage file and sonarqube-5.1.1 for viewing code coverage, after analysis by sonar-runner-2.4.The output of sonar-runner is:Sensor org.sonar.plugins.csharp.CSharpSensor@7aa9b038 (done) | time=33447ms
Sensor org.sonar.plugins.csharp.CSharpCodeCoverageProvider$CSharpCoverageRep... | Visual Studio 2013 coverage XML file found(parsed) still Sonar 5.1.1 not able to produce code coverage |
Not sure if your issue is caused by the problem described in thistroubleshooting. But maybe you can take a try, it shows below:Make sure that the default network security group isn't modified and
that both port 22 and 9000 are open for connection to the API server.
Check whether thetunnelfrontpod is running in thekube-... | Before I could run this commandkubectl logs <pod>without issue for many days/versions. However, after I pushed another image and deployed recently, I faced below error:Error from server: Gethttps://aks-agentpool-xxx-0:10250/containerLogs/default/<-pod->/<-service->: dial tcp 10.240.0.4:10250: i/o timeoutI tried to re-b... | How to deal with error "dial tcp 10.240.0.4:10250: i/o timeout" to see pod's logs in AKS? |
It appears thatPHP Photo Gallerywill do what you want, and if it doesn't, it shouldn't need much tweaking. | Basically, I want to upload about 10,000 family photos that have been organized into folders according to names of the people involved. What I'm looking for is php driven software that allows me to put passwords on each of the folders initially and then allow the family members themselves to manage their folder by addi... | Does a php folder management script exist? |
Referencing System.Web and using
HttpContext.Current.User.Identity.Name
worked like a charm.I didn't know about it. Thanks.
I do it like this:Membership.GetUser().UserNameWhich way is quicker?ShareFollowansweredMay 4, 2009 at 18:10Dmitry44Dmitry4483111 gold badge77 silver badges1010 bronze badges2Considering User o... | I'm trying to implement basic auditing with some of my models (like CreatedAt, UpdatedAt, CreatedBy and UpdatedBy).The date/time part is done. I'm throwing events on my models when a property is changed (implementingINotifyPropertyChanging, INotifyPropertyChanged) and can update the correspondent fields just fine.I jus... | Getting the username inside a model class |
Application rate limit (like yii2) more flexible. You can write different limits per user, for example. Or put request to some queue for future execution. But each request over that limit still hit PHP scripts.
Nginx limits less flexible, but allow to stop request before PHP script.
Nginx limits usually used as DOS pr... |
what is difference between rate limiting via yii2 versus using nginx for example as reverse proxy and rate limiter ?
REF: Yii2 Rate Limiting Api
| rate limit in yii2 vs using nginx for rate limiting |
I believe an active-active setting is on the roadmap. The failover feature may be important for some architecture but it is less important for artifactory HA running in k8s. The primary node pod will be rescheduled by k8s if it is down. It only takes a few mins for the primary to comes back again. HA cluster can keep f... | We are planning to setup Artifactory Highly Available Setup in Kubernetes.
One should be primary and other should be secondary, both sharing the same database. There should be automatic fail over to secondary if the primary is not available.Please share your recommendations if you have implemented this kind of HA setup... | Jfrog Artifactory Highly Available Setup in Kubernetes |
If the sql is in a loop then you are overwriting the file each time. Also placing variables inside string is not advisable as arrays don't evaluate unless you use curly brackets too!
<?php
for($i=0;$i<sizeof($tables);$i++)
{
$query = "SELECT * INTO OUTFILE '".$tables[$i]."_Out.txt' FIELDS TERMINATED BY ',' ENCLOSE... |
I am trying to save a array of tables into separate file. Why doesn't this code work?
<?php
$query = "SELECT * INTO OUTFILE 'pessoa_Out.txt' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '#' FROM $tables[$i]";
?>
I have already tried to save a single table and I was successful. I can also list t... | Export a PHP/MYSQL database, table by table |
The docker secrets functionality is implemented only in swarm mode. You can make a single node swarm cluster very easily (docker swarm init) and run your container as a service. Some will simply mount a file containing the secret for one off containers as a single file read only host volume. e.g.:docker run -v "$(pwd)/... | I am just wondering whether it's possible to provide docker secret created from any file to docker run as an argument, or is it possible to mount docker secret during docker run.
I know it's possible using docker service where we can specify --secret while creating secret but I didn't see such option for docker run. | Is it possible to provide secret to docker run? |
Very simply by doing the following:
Setting the default close operation to:
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
Adding a new WindowAdapter to your frame and override (hooking) on its windowClosing method like so:
frame.addWindowListener(new WindowAdapter() {
@Override
public void wi... |
As i want to go for backup before the closing of program.How i can call backup function when user click on (Right corner button of closing that JFrame) button closing over a JFrame? and after back i wants to be frame get disposed system get exited. I have setted default closing Operation setDefaultCloseOperation(javax... | How can I call a function at time of closing of JFrame? |
You can use the ´printf` function in the Go template like this
docker ps --format "{{printf \"%.12s\" .ID}}\t{{.Command}}" --no-trunc
|
There is a command: docker ps --format "{{.ID}}\t{{.Command}}" --no-trunc (used https://pkg.go.dev/text/template)
which outputs the full text of the '{{.Command}}' (which I need), but outputs too long '{{.ID}}'
I need to take the first 12 characters from '{{.ID}}' and all characters (--no-trunc) from '{{.Command}}'. H... | docker -ps --format output with substr |
I would setup admin.mysite.com and have that hosted on another server...or use nginx to proxy requests from that domain to your admin.js node app.ShareFollowansweredOct 21, 2012 at 19:02chovychovy73.9k5555 gold badges237237 silver badges309309 bronze badgesAdd a comment| | IntroI'm trying out Node.js right now ( coming from PHP background).I'm already catching thevibeof the workflow with it (events, promises, inheritance..haven't figured out streams yet).I've chosen a graphic portfolio web app as my first nodejs project. I know node.js might not fit best for this use case but I it's a go... | Do I need 2 separate applications in Node.js, one for visitors and one for CRUD admins? |
Your rule currently is: (broken down to multiple lines for better display/understanding):RedirectMatch
301
/citycards/citycards-locations/muenchen/((?!citycards/citycards-locations/munchen/citycards-trachtenvogl-reichenbachstr-47-munchen|citycards/citycards-locations/munchen/citycards-4-you-munchen-hirtenstrasse-... | I use aRedirectMatchrule which should exclude the following two URLs:citycards/citycards-locations/munchen/citycards-trachtenvogl-reichenbachstr-47-munchencitycards/citycards-locations/munchen/citycards-4-you-munchen-hirtenstrasse-18-munchenI use this rule with regex, but I get a 500 Internal Server Error:Redir... | Redirect Match with excluding URLs doesnt work |
I totally advocate the use of a service discovery system. It may be a bit hard to deploy at first but surely it will worth it in the future.That said, Prometheus comes with a lot ofservice discovery integrations. It's possible that you don't need a Consul cluster. If your servers are in a cloud provider like AWS, GCP, ... | We are using prometheus in our production envirment recently. Before we only have 30-40 nodes for each service and those servers not change very often, so we just write it in the prometheus.yml, but right now it become too long to hold in one file and change much frequently then before, so my question is should i use f... | Prometheus target management |
solved other way, have changed structure. | Currently there is code in .htaccessRewriteCond %{HTTP_HOST} ^subdomain\.domain\.zone$ [OR]
RewriteCond %{HTTP_HOST} ^www\.subdomain\.domain\.zone$
RewriteRule ^/?$ "http\:\/\/subdomain\.domain\.zone\/folder" [R=301,L]which redirecting users from subdomain.domain.zone to subdomain.domain.zone/folder/I want users to see... | Hiding folder and redirecting with .htaccess |
Yes, when you pay for a reserved instance, you will be billed wether you use it or not, and you could theoretically terminate and create a new instance ever day (week, month, hour etc), and still only pay for the single instance that you previously agreed to pay for, for the term you agreed to pay.Its a bit tricky, but... | I am trying to understand Amazon EC2 reserved instances pricing structure. It is my understanding that the Reserved Instances are no more than a different pricing for my instances.My question is what happens if I pay upfront for an instance and later for whatever reason I need to terminate it before all of the period o... | What happens if I decide to terminate an instance for which I paid upfront? |
If you refer to the cloud formation documentation,
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
you can locate the Role attribute to replace your role.
It needs in arn format, not simply the rolename.
arn:aws:iam::554668579590:role/ProdAdmin
"FunctionName": {
"Type... |
I'm using CloudFormation to create a lambda function. Most of the documentation assumes the role will be created in the template. Is there a way to specify a role that has already been created via say the console? This question tackles a similar question but for EC2 instance creation: Associate existing IAM role with ... | Using existing IAM role when creating AWS Lambda Function |
Refer Following Document for configuration of jenkins with fastlane.https://docs.fastlane.tools/actions/upload_to_app_store/#jenkins-integration | i'm working on iOS project which have continous intergration set up, i wanted to create a jenkins pipeline for my project to run automation steps to do build,test and etc operations. For the automation process i'm using Fastlane tool, so how can i sync up the jenkins pipeline with my Fastlane commands in it? I got few ... | Can configure Jenkins pipeline with fastlane commands in xcode project file |
Make sure first your SSH URL works from command line:ssh -Tv[email protected]cd /path/to/local/repo
git remote -v # do you see an SSH URL[email protected]:<me>/<myrepo>?
git ls-remote # do you see remote branches SHA1?Then, you would need to reference your private key in your RStudio settingsSha... | For the past three weeks I've been working on my personal iMac, developing a graphical analysis. It was already linked to a GitHub repository, but I kept working locally until I had something substantial to push up to GitHub. Today I tried to push the changes to GitHub and got the message that GitHub no longer supports... | Reactivate Push & Pull buttons in RStudio |
You haven't mentioned which WCF channel you're using- I'll assume basicHttpBinding. Generally, if your local service is bound to 127.0.0.1 using self-hosting, and the on-box client accesses it that way, you should be fine. No firewalls I'm aware of will screw with your loopback adapter. If you bind the service to the m... | Simple issue. I'm working on a proof-of-concept for an application with additional database connection, so I will create a WCF service to wrap around the database. Multi-user environments will get this service installed on a centralized server with a client application on their local system. These users will automatica... | WCF services and firewalls... Any issues? |
This sort of per-request handling is not suited to a metric system like Prometheus. This would be considered profiling, for which something more custom would be in order.It's also recommend to export the timestamp for this sort of thing, not how long ago it was. This is resilient to the thing updating the time no longe... | I use the Prometheus Java Client to export session information of my application. We want to show how long sessions have been idle.The problem is that we have a maximum of 1000 sessions and sessions are removed after a certain period. Unfortunately they do not disappear from Prometheus:My code looks like this:static fi... | How to remove no longer valid Gauges |
1
First answer:
No, this is not guaranteed. See [expr.sizeof]/1, and the associated footnote:
... sizeof(char), sizeof(signed char) and sizeof(unsigned char) are 1. The result of sizeof applied to any other fundamental type (3.9.1) is implementation-defined. [Note: in part... |
I need to do GPU computations on an boolean array bool[] (note, not a std::vector<bool>) which was created in CPU memory (with C++11 code) and then copied to the GPU via cuMemCpy or similar.
First question:
sizeof(bool) reports 1 byte. Is this guaranteed by the C++11 standard?
Second question:
Is true (false) always r... | Portable way of accessing an array of bool (C++11) from Nvidia PTX |
I have managed to find the solution(s)
docker-it-scala
Working container definition
val cassandraContainer: DockerContainer = DockerContainer("spotify/cassandra:latest")
.withPorts(9042 -> Some(9042), 9160 -> Some(9160))
.withReadyChecker(DockerReadyChecker.LogLineContains("Listening for thrift clients"))
To... |
I am quite desperately trying to set up docker tests in Scala.
I have created an example project on GitHub to understand how should I set up the environment. It is available here: https://github.com/atais/sbt-scala-docker-cassandra
I have selected spotify/cassandra:latest image https://github.com/spotify/docker-cassa... | Can't connect to Cassandra docker container in Scala Tests |
0
Hard to answer, since there's not much info to go on so i'll answer this fairly generically. A graph showing memory usage over time, or a graph showing degradation of response times would be helpful.
Anyway, i've got a similiar setup (Rails/Passenger/Nginx/MongoDB/VPS-1G... |
I am running a rails app (Passenger and nginx with mongodb and memcached) app on a ubuntu VPS (1GB RAM)- from a couple of days, I see that after starting nginx, ruby process slowly takes up all the memory of the box even though there are no requests on the server. new_relic shows the following
top Output
top - 12:02... | Rails application takes up all of the server memory |
change nginx config (Also necessary if you already enabled "always https"):
server {
listen 80; # ADD THIS
listen 443 ssl;
server_name <URL_HIDDEN>;
ssl_certificate /etc/nginx/own-certs/server.crt;
ssl_certificate_key /etc/nginx/own-certs/server.key;
location / {
proxy_pass http://... |
I'm trying to setup https using nginx and cloudflare. I generated a certificate and key using cloudflare and added them to my nginx config (See below).
server {
listen 443 ssl;
server_name <URL_HIDDEN>;
ssl_certificate /etc/nginx/own-certs/server.crt;
ssl_certificate_key /etc/nginx/own-certs/server.ke... | Cloudflare Nginx HTTPS proxy_pass every path |
The server side request queue is provided by application container and not by servlet itself.In case of Tomcat the component responsible for that is called Connector which can be configured (server.xml) in terms of the number of threads that serve incoming requests, timeout that request can stay unprocessed in the queu... | Can anyone suggest a simple setup of a servlet in java that supports pipelining?(It is for unit testing, so simplicity is better than scaleability). | How can I test client pipelining in java? |
14
I was facing the same issue, I simply sign out from Github Desktop app in File > options > Signout
Share
Improve this answer
Follow
answered Jul 29, 2019 at 9:10
AqibAqib
34433 silver b... |
I have installed GitHub Desktop as the uploaded local project tool, I uploaded a project "F:/test", and it could show successful in my GitHub homepage, then I delete this repository.
But I re-publish this project to GitHub.
Github Desktop shows this history of the repository, and prompt error
The repository does not... | github desktop error “The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.” |
If I understand correctly you try to build something likeSpark -> Graphite -> Prometheus -> Grafana. Avoid to do that since Graphite adds overhead to your monitoring system.You have several options available:Query Graphite directly from Grafana withGraphite data sourceSetup Jmx Exporter properly. You can refer thediscu... | I am running a standalone Apache Spark cluster in a Kubernetes environment.There is a need to export metrics to Prometheus and then finally display them in Grafana.I found that installing a Graphite exporter was the simplest solution to do this since I am experiencing some trouble with getting all Spark metrics while o... | Graphite exporter mapping regex difficulties |
GuiFalourd does indeed have the correct answer, but I did have to improve on it a bit.If you want to use the workflow on a private repo, you do need to add an authorization token. Here's an example that uses GitHub context to populate everything besides the label name you want to delete:curl --silent --fail-with-body \... | I havea workflowthat is triggered when the pull request is labeled (viapull_request_target).I would to automatically remove the label that triggered the analysis as the last step of that workflow.How can I do that? | Github Workflow - Remove label at the end? |
You're on the right track by usingcudaStreamWaitEvent. Creating events does carry some cost, but they can be created during your application start-up to prevent the creation time from being costly during your GPU routines.An event isrecordedwhen you you put the event into a stream. It iscompletedafter all activity that... | Is it possible to synchronize two CUDA streams without blocking the host? I know there'scudaStreamWaitEvent, which is non-blocking. But what about the creation and destruction of the events usingcudaEventCreateandcudaEventDestroy.ThedocumentationforcudaEventDestroysays:In case event has been recorded but has not yet be... | Non-blocking synchronization of streams in CUDA? |
If you use Oracle 10g or later, you can use built in auditing functions. You paid good money for the license, might as well use it.Read more athttp://www.oracle.com/technology/pub/articles/10gdba/week10_10gdba.html | I have an existing application that I am working w/ and the customer has defined the table structure they would like for an audit log. It has the following columns:storeNo
timeChanged
user
tableChanged
fieldChanged
BeforeValue
AfterValueUsually I just have simple audit columns on each table that provide a userCha... | database audit table |
You have to expose the ports for that pod, so that other services can access it.Please refer:https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/ex.apiVersion: apps/v1
kind: Deployment
metadata:
name: hello
spec:
selector:
matchLabels:
app: hello
tier: backend
... | We are starting an embedded activeMq server in our java application. This will run in a kubernetes pod.broker = BrokerFactory.createBroker("broker:(tcp://localhost:41415)?persistent=false");
broker.setBrokerId("ActiveMqBroker" + 1);
broker.setUseJmx(false);
broker.start();Now we have one application which accesses it i... | cannot access embedded ActiveMq within kubernetes cluster |
You are correct. All Amazon CloudWatch metrics are for a defined period.
The maximum period for a metric is one day, so this is not suitable for a cumulative counter that you wish to continue beyond one day.
You would need to find an alternate method of storing the count, such as an Amazon DynamoDB table. Use an atomi... |
AWS Cloudwatch receives a count of 1 every time I start an image download. I am downloading 1,000s of images (on a cluster of EC2 instances) and would like to track the total progress.
I can't find any documentation on how to plot the cumulative sum of a metric. The AWS Cloudwatch Math Expressions looked promising, bu... | Cumulative sum of AWS Cloudwatch Metric |
Use this command:keytool -export -alias keystore_alias -file your_cert.cer -keystore keystore.jksHerekeystore_aliasis the alias of the keystore. You will prompted for the keystore password, which you also must know in order to generate a certificate.This website is a great reference for the various things that can be ... | I need to authenticate with two-way authentication. I have two JavaKeyStore files keystore.jks and truststore.jks that I use when authentication with java client , now I want to use Python client that needs .cer file . so how can I create the certificate file from the jks files ? | How to create certificate from keystore.jks and truststore.jks files |
Usegit for-each-refwith--merged=HEADto filter on merged branch then use a format to get the committer by getting the last person to commit to that branch.git for-each-ref --merged=HEAD --format='%(committerdate) %09 %(authorname) %09 %(refname)' --sort=committerdateYou can add agreponrefs/remotes/origin/to get only rem... | We have a team of 50+ developers and people do not delete their feature branches after merging them on the main-stream branch.We have four main-stream branchesdevelop,staging,demo, andmaster. We follow to create a separate branch for each JIRA ticket and that branch should be deleted once it merged on the origin branch... | Get List of merged branches on github along with branch creator |
Fixed this HPA issue :
need to add '---' at end of HorizontalPodAutoscaler section in deployment.yaml this is required because it is inside loop and k8s needs to understand that iteration is over.ShareFollowansweredMar 26, 2022 at 16:57architarchit5111 gold badge11 silver badge77 bronze badgesAdd a comment| | When I am applying helm deployment yaml file in below format (with range) deployment works fine but it applies HorizontalPodAutoscaler only for one of the deployment.{{- range .Values.services }}
{{ if .enabled }}
apiVersion: apps/v1
kind: Deployment
{{- range .Values.services }}
Metadata:
.
.
.
spec:
.
.
.
apiVersion:... | kubernetes does not deploy HorizontalPodAutoscaler when applied within range |
1
See this:
The initial password can be set at start up time via the ELASTIC_PASSWORD environment variable:
docker run -e ELASTIC_PASSWORD=MagicWord docker.elastic.co/elasticsearch/elasticsearch-platinum:6.1.4
Also, for newest image (docker.elastic.co/elasticsearch/elasti... |
Can i know, how to set initial password for elasticsearch database using docker-compose
bin/elasticsearch-setup-passwords auto -u "http://192.168.2.120:9200
| Set elasticsearch initial password via docker-compose |
check the tasks which are running:ctr task lsThen you will see something like thatTASK PID STATUSv0 62166 RUNNINGDoctr task kill v0orctr task kill -s SIGKILL v0 | What is the equivalent ofdocker stop [containerID]using ctr? I can't seem to find it via contianer option or I am missing some ctr concepts... | How to stop container in containerd/ctr |
1
There's no way to automatically solve conflicts.... other than instruct to use the code from one of the branches.
Share
Follow
answered Jun 21, 2020 at 15:42
eftshift0eftshift0
28k44 gol... |
I have multiple repositories and multiple developers are working on multiple repositories, now if i create a feature branch of the develop branch on any of the repositories and there are other developers who also created a feature branch and they have merger their code in the develop branch, so when i raise pull reque... | Sync feature branch with develop branch |
That's the wayOctopressprocess Jekyll site : one branch for code and one branch for generated files. I sometimes use this method when I need plugins or Gulp/Grunt tasks. It's more elaborated than simply pushing to one branch but I don't feel it's 'hacky'.I've made a rake task that helps automate deployment. You can fin... | FYI: This is a weird request, but I feel this may benefit other people.I'm usingJekyllandGitHub Pagesto publish a website. I don't have any problems with Jekyll, really. However, I do need to usegeneratorsto build a number of dynamic pages from adata file. As you can see in the generators link, the blue box specificall... | Commit half of repo on one branch, rest on another |
use the command like this:php app/console server:run 127.0.0.1:8080to run the server on port 8080 or change the port to your own preference | I'm getting this error when I'am trying to runmyproject, symfony2 project. I think that the error came up because on that port8000I haveajentiserver running withnginx.Server running on http://127.0.0.1:8000
Quit the server with CONTROL-C.
RUN '/usr/bin/php5' '-S' '127.0.0.1:8000' '/srv/myproject/vendor/symfony/symf... | Symfony server:run error |
Put the following code in a htaccess file in server root directory:RewriteEngine On
RewriteRule ^youtube/detail/(.+)$ youtube/detail.php?id=$1 [L] | When I go tohttp://www.example.com/youtube/detail/abvcdein my browser, I want to internally rewrite the url tohttp://www.example.com/youtube/detail.php?id=abvcde. I tried to do this with the following .htaccess, but it gives a 404 error.Currently my .htaccess looks like this:RewriteEngine On
RewriteCond %{REQUEST_FILEN... | Rewriting subfolders using nice url |
Also, if you have any errors in your view, sometimes it won't load the layout. It will just spit out the view until the point where it experienced the error. Perhaps the error is not in displaying your layout, but some odd circumstance where you are generating an error with a Helper.ShareFollowansweredAug 11, 2011 at 2... | I have a CakePHP site whose homepage is cached for 10 minutes at a time using Cake's default options. However I've been alerted that "every once in a while", once a day or so, it's losing the layout, just displaying the page content without the header, styling etc.Removing the cached version and regenerating the page ... | CakePHP Page Occasionally Losing Layout - Help? |
My understanding is that minimum and maximum can only be set with Auto Scaling policies for ECS services.https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html.
You will need to create auto scaling policies to set these.Service Auto Scaling is made possible by a combination of the Amazon ... | How can I set the minimum and maximum number of tasks of an ECS Service through an API call? I know you can set the desired count of tasks through the following api, but I'm not seeing anywhere to set the minimum and maximum tasks? Am I missing something? I am using the PHP API, but any insights here will help.https://... | How to set ECS Service minimum & maximum tasks |
I'm using crontab as well to execute my Node JS project. I have to explicitly state the path of my.envfile like so:require('dotenv').config({ path: '/var/www/html/myproject/.env' });In python-dotenv, I believe it can be done similarly by using:# OR, explicitly providing path to '.env'
from pathlib import Path # Python... | I am running a python script from a python library which loads some environment variables from a.envfile in the root of the library using dotenv.This works from the command line, but when I try to run as a cronjob using the following:* * * * * source ./path_to_venv/activate; python ./path_to_script.pyI get a key error ... | Can't find dotenv environment variables from cron job |
The problem is not about puttingErrorDocumentin the top or in the bottom of your htaccess.You have an infinite loop because of your rule (the one rewriting tophpextension).You need to check if it exists before rewriting it, otherwise you'll get a loop conflict between your rule andErrorDocument.You can replace your cur... | I had a custom 404 error redirect page working just fine through htaccess. However, after adding new code to htaccess, it stopped working. What's causing the conflict and how can I fix it?EDIT: I've tried putting the ErrorDocument line at the top of the page and it still doesn't work.htaccess code:RewriteEngine On
#Re... | htaccess 404 Stopped Working |
<include domain="database" path="device_info.db"/>Here, the domain indicates the root directory in which thepathis interpreted.databasemaps to where SQLite databases are stored by default, if you use:getDatabasePath()onContextSQLiteOpenHelperwith just a plain filenameopenOrCreateDatabase()with just a plain filenameIn t... | My app uses a small SQLite database that I'd like to have backed up. I'm assuming this won't happen automatically, without my coding for it using fullBackupContent, shown below. How do I modify the content of my backupscheme.xml to set the include path correctly? I prefer to set the db location at runtime.My backupsch... | Automatically backing up SQLite database |
Pods arecattle, not pets (devops.stackexchange.com). Thus, pods do not have an identity. We should therefore never directly communicate with a pod, but rather expose pods through aServiceand communicate with the service instead. The service has a well-defined and constant name. | I need to make some automation testing on the Kubernetes pod but the pods names keeps changing
like at first it washisham-7cc8f99597then after some time it is like thishisham-7cc8f99597-8j8ljis there a way I can know what is the name of the pod right now so I can use the name in the automation scenario ? | kubernetes pod names Keep changing |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.