Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
The issue was with the header. Replacing "basic" with "token" helped solve the issue.
$headers = @{
Authorization = "token $($token)"
Accept = "application/vnd.github.v3+json"
}
Thanks to the GH support community here.
https://github.community/t/list-all-repos-internal-included-from-a-github-org-using-api... |
I am trying to list all the repos(public, internal) within the org that I am the owner of using the below command.
$orgRepos = Invoke-WebRequest -H $headers -Uri "https://api.github.com/orgs/{$orgName}/repos"
There are about 2 public repos and 10+ internal repos but the above command is listing out only the 2 public r... | Github API: List all repos(internal included) from a Github org using API |
Opencv does quite a bit of clever memory management to avoid unnecessary copies. It often makes sense to write the simple niave solution and then profile to check if it needs or can be improved.
See http://opencv.willowgarage.com/documentation/cpp/memory_management.html
Merge may be very efficient if the destination... |
I'm dealing with OpenCV and have some memory management questions from their DFT example code.
1 In openCV, what's the most efficient way of creating a two channel image? The linked code seems to allocate two IplImages and then combine them via
cvMerge(realInput, imaginaryInput, NULL, NULL, complexInput);
I thi... | C/OpenCV Memory Management |
Boot2docker is a Virtal Machine (via VirtualBox). So the images are stored within the virtualbox image (the vmdk file). Once mounter by VirtualBox, it is linux and the images are stored at the place you stated. | I'm playing around with Docker on OS X (with boot2docker) and can't figure out where these images are being stored. I'm just curious.Thisquestion answers it for Linux which is apparently in /var/lib/docker/graph/<id>/layerI installed via Homebrew and poked around in /usr/local/Cellar/docker but it doesn't look like it'... | Where are docker images stored by boot2docker? |
0
As suggested by @Cyrus and using shellcheck, you keep the following error
To assign the output of a command, use var=$(cmd)
Then you get some errors to correct and here a working script
FILENAME=user_archive.tar
DESDIR=/home/user
FILES=$(find /shared -type d -user user)... |
This question already has answers here:
How do I set a variable to the output of a command in Bash?
(16 answers)
Closed 7 years ago.
I am trying to learn scripting in Ubuntu.
I nee... | Unix backup script [duplicate] |
If you don't know what your access pattern will be you can not choose an optimal solution. In addition if you have no working solution you can not measure your performance and can only guess what will be the best solution and you will probably guess wrong.
I suggest to implemnt your own 3D Board class with a clear in... |
Im very new to C++ and I'm having a hard time creating a 3D playing board. Size of the board can increase throughout the course of the game.
My first idea was to use nested vectors.
vector<vector<vector<int>>> board
Idea was, that it would be easily accesible (board[z][y][x]) and I wouldnt have problems with dynamic ... | 3D playing field in C++ |
0
You can use this endpoint to list the commit with the path parameter for the file's path: path/to/filename.ext. This will return a header with last-modified for the file.
https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository
Share
Improve t... |
I'm using the github3.py Python package. I'm trying to get a file's latest update timestamp from Github API.
So far I used the repo's file_content API (which uses Github's contents API ) to get the file's content and metadata, and it worked fine, until the file size grew over 1MB. At that point I got an error telling ... | How to get a file's latest update timestamp from Github API? |
5
Its due to PHP SESSION name
If you have change session name in confing file of Yii. Then you have to use add this session_name('samar_v4'); in file protected/modules/user/vendors/hybridauth/Hybrid/Endpoint.php in starting of functoin authInit
Share
Improve th... |
I'm hosting my PHP Yii application on AWS Elastic Beanstalk and hence using the database to store sessions. I've successfully implemented facebook login using Hybridauth on a shared hosting environment. When I host on Elastic Beanstalk facebook login gives the error:
"You cannot access this page directly"
The URL end... | "You cannot access this page directly" - Hybrid Auth |
+50There are different problems that people face with sharing. But the common one is a non-english character based password or a password with spaces.If you can change your password and remove spaces/special non-english characters then it should work.Other workaround that you can try is create a local user and give it ... | I am runningDocker Desktop for Windowson Windows 10 Enterprise. I get the following:PS C:\Users> docker run --rm -v c:/Users:/data alpine ls /data
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error
response from daemon: C: drive is not share it in Docker for Windows
Settings.From Docker settings in ... | Unable to share C drive on Docker for Windows |
You simply have to install the GIT for windows version from this LINK
It will automatically set the environment variable for GIT on your windows 10 machine. You do not have to do anything else.
|
os: window 10
when I create meteor project, it shows following error. So I can not learn Meteor.
C:\test>meteor create asd
C:\Users\msm08\AppData\Local\.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:218
throw error;
^
Error: Error: Coul... | meteor create project failing |
You can use the SDK'stableNotExistswaiterto ensure a table has been fully deleted before callingcreateTable. | Using node.js i try to delete and create dynamoDB table again. I need to delete all records from table and put new, so i think is good solution to just delete and recreate whole table. I try with this codedynamo.deleteTable({
TableName: tableName
}, function(err, data){
if (err) {
consol... | Delete and create dynamoDB table |
I can reproduce the issue you raise, while it does not show up when I replace the base image withdebian:10, for example.It happens the issue is not due toalpinebut to thegitlab/gitlab-runner:alpineimage itself, namelythisDockerfilecontains the following line:STOPSIGNAL SIGQUITTo be more precise, the line above meansdoc... | I was trying to catch SIGTERM signal from a docker instance (basically when docker stop is called) but couldn't find a way since I have different results for each try I performed.Following is the setup I haveDockerfileFROM gitlab/gitlab-runner:alpine
COPY ./start.sh /start.sh
ENTRYPOINT ["/start.sh"]start.sh#!/bin/ba... | Catching SIGTERM from alpine image |
+100The error is reported by tar command that try to change owner.In order to avoid tar to set owner you can set variableTAR_OPTIONSto--no-same-ownerFromtar manual:--no-same-ownerExtract files as yourself (default for ordinary users).You can add this in your docker-compose file with :TAR_OPTIONS: --no-same-ownerShareFo... | I have created a docker-compose file for local development using Wordpress, and I've finally got NFS working (normal volume mount was too slow, because of Docker / Mac issues).Except I'm running into a new issue, all files in the NFS share (which is the wp_content folder) give such error:tar: ./wp-content/themes/twenty... | Docker Wordpress tar: <file> Cannot change ownership to uid 33, gid 33: Operation not permitted |
The three things you need to do are:
Go to Site Configuration -> Performance:
Set the following options, and click Save configuration:
Caching mode: Disabled
Minimum cache lifetime: none
Page compression: Disabled
Block cache: Disabled
Optimize CSS files: Disabled
Optimize JavaScript files: Disabled
Click Clear ca... |
I'm developing a site in Drupal 6, and I'm going mad trying to work out why pages (specifically pages containing views), I'm working on locally are caching content instead refreshing the contents of the page, and that of linked js files, I'm relying on for making a mashup - is there a checklist I can check against to ... | Where can I check to be sure Drupal's caching is switched off for local development? |
UseNotepad++- it is free and much better than Notepad. It will help to save text without a BOM usingEncoding→Encode in UTF-8 without BOM:Notepad++ v6 and olders:Notepad++ v7+:When I encountered this problem in Java, I didn't find any library to parse these first three bytes (BOM). So my advice:UsePushbackInputStream(in... | I have aCSVfile with special accents and save it in Notepad by selecting UTF-8 encoding. When I read the file using Java, it reads the BOM characters too.So I want to save this file in UTF-8 format without appending a BOM initially in Notepad.Otherwise, is there a built-in class in Java that eliminates the BOM characte... | .ssh/config: line 1: Bad configuration option: \357\273\277host [duplicate] |
Actually, I will go with boring old git rebase -i HEAD~Number where Number will walk me back from the head to the inital commit. More time consuming but at least I have a vague understanding of what it is doing. Thanks for all the suggestions. | I now have a big honking, bloated, Git repository consuming mucho disk space on GitHub that I want to put on a diet. I need to discard ancient commits made early in the history of the project that are are essentially irrelevant to the current direction the project is going.I am - and will always be - the sole user of t... | git rebase. How Do I Use it to Collapse Reams of Ancient Commits |
3
Follow your first thought - save the data to a temporary file (sdcard please. 20mb in internal storage is too big). You first need to open the connection for your download.
InputStream is = URL("your_request_string").openStream();
Then create a new File in sdcard
File ... |
I am developing an application, and on first launch I anticipate downloading a lot of data in JSON format (say 10-20 MB). All this data is being transferred in a single network request (reason being the data is kind of generated dynamically per request). The fllowing code throws OOM exception when receiving the data (... | Avoiding OutOfMemory exception when making large network requests from Android application |
If your apache is already running onport 8080then its very likely that the port is not opened from your aws console.
I visited54.149.233.194and could find the apache default page.Here is a link to how to be able to openclick meCopying the answer shamelessly hereIn EC2 console, look for the column "Security Group" of yo... | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | How to open 8080 port to listen HTTP request from remote computer in ubuntu? [closed] |
- (id)init {
id e = [[XorShiftEngine alloc] init];
self = [self initWithEngine: e];
[e release];
return self;
}
// designated initializer
- (id)initWithEngine:(NSObject <RandEngine> *)e {
self = [super init];
if (self != nil) {
engine = [e retain];
// engine initialization stuf... |
I'm learning Objective-C. In my first non-trivial project I've run into a question about how to best handle resources passed to the initializer, compared to the default initializer. My class has a retained resource, engine, which can be set manually after creation, or during initialization explicitly, or during initia... | What's the idiomatic way to manage reference counts during Obj-C initializers? |
There are two issues:
In create-project, by default the command uses the stable stability to look for the package to install, that's why it works if you specify dev-master but not by default. You could however also run composer create-project vendor/packagea -s dev
After while installing dependencies, I'm guessing tha... |
I don't really understand how Composer works with the minimum-stability setting.
I have two packages. Let's say, PackageA and PackageB.
The composer.json file of PackageA looks like this:
{
"name": "vendor/packagea",
"minimum-stability": "dev",
"require": {
"vendor/packageb": "dev"
}
}
So Pack... | The package is not available in a stable-enough version according to your minimum-stability setting |
Found the solution onhttps://hub.docker.com/r/anapsix/docker-oracle-java8/~/dockerfile/:## JAVA INSTALLATION
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/we... | I am trying to install java 8 through oracle-java8-installer on a debian:jessie docker container. The following is my Dockerfile:FROM debian:jessie
ENV JAVA_VERSION 1.8.0
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
RUN echo "deb-src http:... | Installing Java8 in Dockerfile [duplicate] |
As @Mark Setchell commented, I solved my problem by launching the command with its entire path (in this case,/usr/sbin/arp) | I have scheduled a taskarp -awhich runs once per hour, that scans my wi-fi network to save all the info about currently connected devices into ascan.txtfile. After the scan, a python script reads thescan.txtand saves the data into a database.This is what mywifiscan.shscript looks like:cd /home/pi/python/wifiscan/
arp -... | Raspberry Pi - Crontab task not running properly |
This problem occurs if you are not listening to the correct port.
Server
var io = require('socket.io').listen(80);
io.sockets.on('connection', function (socket) {
socket.emit('news', { hello: 'world' });
socket.on('my other event', function (data) {
console.log(data);
});
});
Client
<script src="/socket.io... |
I know this error message has been asked in lots of question but I haven't found one that matches my situation. Below I show you the server (node.js) and the client code. The socket.io.js file is included and definitely present.
| Socket.IO - io is not defined (fails on different domain) |
Unfortunately this is not possible via Terraform directlyHowever you could run theattach-instancesAWS cli command.If this needed to be performed in terraform you could put the command into alocal-execresource. | I created 2 EC2 instances using terraform.
Is there any way to attach them into auto scaling group using terraform?
I didn't find anything about this in the docs :/I don't want to create them within the ASG, only attached them.
As I said the instances were generated by terraform script as well as everything else (ASG, ... | How to attach existing EC2 instances to auto scaling group in terraform? |
If you mean write a Dockerfile producing an image able to run an sbt project, you can take a look atWilliam-Yeh/docker-sbt:# Sbt on Java 7
#
# URL: https://github.com/William-Yeh/docker-sbt
#
# @see http://www.scala-sbt.org/release/tutorial/Manual-Installation.html
#
# Version 0.7
FROM williamyeh/java7
MAINTAINER ... | I want to write adockerfilemanually without using any sbt plugins.
I am using sbt 0.13.8. I looked atdockerfile referencebut could not get enough insights for my requirement. A demo would be extremely helpful | how to write a dockerfile to run a sbt project in container |
Well, now i feel foolish.
All I had to do was add the following line in the right place:
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
I was initially trying to add it just above the if ( $http_x_forwarded... part and I was also trying it with the always keyword at the end as well and my... |
I've got a react app running via nginx on app engine flexible environment, using a custom domain and SSL, and I'd like to add HSTS headers.
I know from what resources i could find that my application code itself needs to serve the headers, rather than putting them directly in any app.yaml file,
so i figured i could d... | How do I add HSTS headers to my nginx / react app on app engine flex? |
0
Try running
sudo gitlab-ctl tail
to view all errors.
I made a silly mistake of not creating certificates for the GitLab registry subdomain on my previous edit to my GitLab instance.
Share
Improve this answer
Follow
... |
I tried updating GitLab by running sudo apt-get update and sudo apt-get install gitlab-ce. Everything seemed fine during the install, but after it finished, nginx stopped working and I can't get it to start.
After running: sudo gitlab-ctl status, I get this:
run: gitlab-workhorse: (pid 4378) 8613s; run: log: (pid 937)... | Nginx Won't start after GitLab Update |
Does it make sense to store that information in a local databaseYes. Actually this sounds exactly like a typical caching setup. I would recommend looking into Redis instead of using a relational database for this.how do I then automatically run this function every 1 to 5 minutes in
the backgroundProbably aCronjob. Yo... | I'm working on a site that pulls product price data from Amazon.com and Walmart. I'm guessing that in the future, it will also pull data from other places.My first idea was to pull the data directly from Amazon (using their product advertising API) and then display the data on the site for every single visitor who land... | Storing Amazon API data in Local Database |
ERROR: type should be string, got "\nhttps://github.com/ben-manes/caffeine\nCaffeine provides exactly the behavior I want out of the box using refreshAfterWrite:\nLoadingCache<K, V> cache = Caffeine.newBuilder()\n .refreshAfterWrite(expireTime, timeUnit)\n .maximumSize(maxCountOfItems)\n .build(k->loader.load(k));\n\n" |
I'd like to have a cache that works like this:
A. If request is not cached: load and return results.
B. If request is cached, has not expired: return results.
C. If request is cached, has expired: return old results immediately, start to reload results (async)
D. If request is cached, has expired, reload is already ... | Is it possible to configure Guava Cache (or other library) behaviour to be: If time to reload, return previous entry, reload in background (see specs) |
Install specific version ofkubectlcurl -LO https://storage.googleapis.com/kubernetes-release/release/<specific-kubectl-version>/bin/darwin/amd64/kubectlFor your case if you want to install versionv1.11.3then replacespecific-kubectl-versionwithv1.11.3Then make this binary executablechmod +x ./kubectlThen move this binar... | I want to upgrade the kubectl client version to 1.11.3.I executedbrew install kubernetes-clibut the version doesnt seem to be updating.Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.7", GitCommit:"0c38c362511b20a098d7cd855f1314dad92c2780", GitTreeState:"clean", BuildDate:"2018-08-20T10:09:03Z", G... | How to upgrade kubectl client version |
0
Deja-Dup is based on duplicity which in turn does encrypted backup of local files/folders to local or remote storages.
so, No, you cannot. however, it has been reported that duplicity worked flawlessly with fuse based or similar ways that mount remote file systems locally... |
I know that it's possible to save backups on a remote location, but can I backup a remote location?
I have a server with data and a pc, that will keep the backups, on the same network. I can mount the data from the server on the pc, using sshfs and backup the mounted folder. I want to make backups daily and keep backu... | Deja Dup: Backup folder from the network |
The update strategy is specified in.spec.strategyin case of a Deployment and.spec.updateStrategy.typefor DaemonSets and StatefulSetsFor Deployments.spec.strategy.typecan be “Recreate” or “RollingUpdate”. “RollingUpdate” is the default value.For DaemonSets and StatefulSets,.spec.updateStrategy.typecan be "OnDelete" or "... | If there an use case where kubectl apply should not be use to get a roll-update?Despite the command original intent if we gave to kubectl apply a source file describing the resources of the cluster been updated over time, there any use case on which should not be use? | kubectl apply vs kubectl roll-update |
55
Create a backup(backups option) and restore the table with a new table name. That would get all the data into the new table.
Note: Takes considerable amount of time depending on the table size
Share
Improve this answer
Follow
... |
What's the best way to identically copy one table over to a new one in DynamoDB?
(I'm not worried about atomicity).
| Copying one table to another in DynamoDB |
It could be because its throwing an error and you are not capturing it. Try the following:01 04 * * * /bin/bash -l -c 'cd /home/appname/capistrano/current && RAILS_ENV=production bundle exec rake nightly' >> /home/appname/capistrano/shared/log/nightly.log 2>&1 | I currently have this shell script ...nightly.sh#!/bin/bash
rvm 1.9.2
cd /home/appname/capistrano/current
RAILS_ENV=production bundle exec rake nightly >> /home/appname/capistrano/shared/log/nightly.log 2>&1I use it in my crontab entry here...crontab -e42 20 * * * /home/appname/nightly.shWhen it runs I get this error/h... | Can't get rails rake task to play nice with crontab |
3
I had to change the engine to 'xlsxwriter'
with pd.ExcelWriter(stream, engine='xlsxwriter') as writer:
Happy this fixed my problem but still not sure why it did run on my local and not in docker.
Share
Improve this answer
Follow
... |
I have a script that scrapes some information, puts it in a dataframe and writes it to an excel file in dropbox.
Now my program is running perfectly fine on my local computer but once I build a docker image of my project, the saved excel file comes out corrupted.
def write_excel_to_dropbox(dbx, df, excel_path):
w... | pandas to_excel export corrupt file in docker? |
I would do date_parse. Adjust your regex accordingly.
select date_parse('Nov-06-2015','%b-%d-%Y')
2015-11-06 00:00:00.000
refd:https://prestodb.io/docs/current/functions/datetime.html
|
I am looking to convert the following string: mmm-dd-yyyy to a date: yyyy-mm-dd
e.g
Nov-06-2015 to 2015-11-06
within Amazon Athena
| Amazon Athena Convert String to Date |
-1I did not find a direct solution so I decided to create a Google Forms and a script that takes the responses and posts these as a comment in the GitHub issue. | You can create aGitHubissue from aURLby following theseguidelinesbut I was wondering how I can create a new comment on an existing issue and set the body content from theURL?I have tried:https://github.com/projecthorus/sondehub-tracker/issues/81?body=newbut that does not work. | GitHub Prefill Comment on Issue from URL |
You can actually do this with a privileged container in Docker For Mac/Windows. You can do it like this:docker run -ti --privileged ubuntu /bin/bash
echo never | tee /sys/kernel/mm/transparent_hugepage/enabled
echo never | tee /sys/kernel/mm/transparent_hugepage/defragI ended up creating an image for this and made redi... | Transparent Huge Pages is required to be disabled for the TokuDB engine and for Redis. With docker-toolbox, I could justdocker-machine sshinto the host and disable it. I no longer have access to the host OS, so how do I disable it? | How do I disable Transparent Hugepages for Docker for Mac/Windows (Native) |
1
Maybe you're launching your container with docker-compose run? There is a difference in port mapping between docker-compose run and docker-compose up [-d] [service] In this case the port configuration will be ignored by design
You can use --service-ports flag or manually ... |
I have specified port-mapping in docker-compose, but it is still not working, i still have to access site using the port no specified in expose
below is my docker-compose.yml
version: '2'
networks:
default:
external:
name: nat
services:
website:
build:
context: '.'
do... | port number not change for docker-compose |
When creating or updating your CodeBuild Project, set the ProjectArtifact type to S3 and packaging to none as explained inhttps://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectArtifacts.html#CodeBuild-Type-ProjectArtifacts-packaging.However, the above step will only work when you use CodeBuild as a stand... | So I have a CodeBuild process, the output of which I want to be a nested Cloudformation stack and a zipped Lambda deployable, both pushed to an S3 bucket.I can do the outputting process viapip install awscliand thenaws s3 cp #{stuff}inbuildspec.yml, but on reading the CodeBuild docs it feels like I should really be usi... | Can AWS CodeBuild output unzipped artifacts? |
There are a number of ways to schedule this task. How do you schedule your workflows? Do you use a system like Airflow, Luigi, Azkaban, cron, or using an AWS Data pipeline?
From any of these, you should be able to fire off the following CLI command.
$ aws athena start-query-execution --query-string "MSCK REPAIR TABL... |
I have a Spark batch job which is executed hourly. Each run generates and stores new data in S3 with the directory naming pattern DATA/YEAR=?/MONTH=?/DATE=?/datafile.
After uploading the data to S3, I want to investigate it using Athena. Also, I would like to visualize them in QuickSight by connecting to Athena as a d... | How to make MSCK REPAIR TABLE execute automatically in AWS Athena |
I would do:git reset --hard {remote_name_here}/{branch_name_here} | I have done some local changes in code stored in Git repo. I don't need these changes anymore, so I would like to discard them and get a clean copy from github.When I did a Git pull it gave me a merge conflict error.So, I didgit reset --hardbut that did not help. I also triedgit stashbut still when I try pull from gith... | Git - reset local changes |
This is a known issue and is yet to be addresses. Check out this linkDocker services need to waitYou are absolutely right that the MySql service is not yet up while your App container comes up very quickly and hence when it tries to connect to MySql, the connection is refused. On the application side what you can do is... | I am trying to link two containers using docker.MySQL Dockerfile:...
EXPOSE 3306
CMD ["/usr/sbin/mysqld"]App Dockerfile:...
ADD . /services
CMD ["python", "-u", "services/run_tests.py"]In the run_tests.py i usedself.db = MySQLdb.connect(host="mysql", user="XYZ", passwd="XYZ", db="TEST_DB")In my docker-compose.yml:app:
... | Using docker-compose Mysql + App |
7
Is it possible to add a base repo to the list?
No, not by yourself.
Github only lets you do pull requests on forks it knows about, and offers no way to register two repos as forks of one another later on.
You have two options you could try:
Contact Github support at [e... |
For a GitHub pull request, you specify a base repo (where you want the changes to go) and a head repo (where they're coming from).
However, I would like to use a base repo that is not on the dropdown list. Is it possible to add a base repo to the list? There is a relationship between the two (they share the initial ... | Change "base repo" for GitHub pull requests |
From what I read it should be something like this:<Limit DELETE>
Order deny,allow
Allow from all
</Limit> | I have a problem. My webserver sinds 403 responses when I send a DELETE request. I don't want to delete the thing in my request, I just need to know that the method used was delete. How do I configure my webserver that it doesn't send those 403 messages anymore? I don't want WebDAV enabled or something like that. I jus... | Apache DELETE request |
0
Seems similar to the post on SO
The solution described in that bug is to increase the max_allowed_packet in the MySQL server configuration.
Share
Improve this answer
Follow
edited May 23, 2017 at 10:09
... |
I am restoring mysql backup file which is of size 2.6GB...but while restoring I am getting "Unknown object in backup file" exception . How can i solve this problem. and there are no logs in mysql administrator.
Thanks,
| Unknown object in backup file in MySQL 5.1.41-3 ubuntu12.10 |
The network LB will not support X-Forwarded-For headers like the Application LB does.Application LB:Layer-7 Load BalancingYou can load balance HTTP/HTTPS applications and use layer 7-specific features, such as X-Forwarded-For headers.This is not the case with Network LB, which is a layer 4 load balancing method and as ... | I switched fromApplication Load BalancertoNetwork Load Balancerfor my application running onECSFargate because my application needed static IP address.Now I am unable to get source/client IP address fromX-Forwarded-FororX-Real-IpHTTP headers. In both of these headers, I am getting private IP. While onApplication Load B... | AWS Network Load Balancer unable to get client IP |
You could try and register some middleware that can modify requests based on the headers forwarded by nginx. You probably also want to set the remote IP address to the value of theX-Forwarded-Forheader.Something like this should work (untested):public class AppHarborMiddleware : OwinMiddleware
{
public AppHarborMid... | Applications at AppHarbor sit behind an NGINX load balancer. Because of this, all requests that hit the client app will come over HTTP as the SSL will be handled by this front end.ASP.NET MVC's OAuth 2 OAuthAuthorizationServerOptions has options to restrict access to token requests to only use HTTPS. The problem is, un... | AppHarbor's Reverse Proxy causing issues with SSL and app.UseOAuthBearerTokens ASP.NET MVC 5 |
VS2015 still does not have a file browser for Git projects. They do have a list of *.sln files that can be opened within a Git repo. If you have say a "ReadMe.txt" at the root level of the repo though, you still need to open it in explorer or command line and modify it (either by adding to VS or elsewhere), then the ... | we set up Git as version control system (we used tfs before). Now the source control explorer is not available anymore.I found this thread from 2013:Using Git in Visual Studio, how do I navigate repository files?It's 2015 now and I cannot find any info from late 2014 or 2015. Does anybody know something new?Thanks | Git with Visual Studio Source Control Explorer available yet? |
The Github help page "Can I delete a commit message?" explain how to alter:
a commit you just pushed
older commits message
But since it changes the history, you need to make anyone having already pulled from the GitHub repo aware of that change.
If rewriting the history isn't possible, you can make a new commit, wi... |
I did a git commit and pushed to github, but forgot to mention the issue number in the commit (I forgot to write something like ... closes #123).
If I had mentioned the issue number in the commit message, github would have connected the commit to the issue. Is there any way to do this after the commit, when it's too l... | Connect an issue with a commit after the commit |
Maybe too late, but I was fighting whit this too, and then sun raised and my solution came with it:Host your SLIM api in a different DIR or folder, something like /apiHost your angular app in a different DIR or Folder something like /appThen modify your .htaccess at root level into something like this:RewriteEngine on
... | I use Angularjs and more precisely ng-view, here is my index.html :<!DOCTYPE html>
<html lang="fr" data-ng-app="myApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="/" target="_self" />
</head>
<body>
<header class="container-fluid" ... | AngularJs and Slim Framework with .htaccess |
Here is the solution I found, thanks todocker login: error storing credentials `The stub received bad data.`The .docker/config.json looks like this:{
"auths" : {
},
"stackOrchestrator" : "swarm",
"HttpHeaders" : {
"User-Agent" : "Docker-Client/19.03.8 (darwin)"
},
"credsStore" : "ecr-login"
}by removin... | I have all AWS CLI and docker setup and running for a while. I changed the command codes to all run from a bash file. However, when running thedocker pushI get this errorError saving credentials: error storing credentials - err: exit status 1, out: `not implementedI triedAWS_DEFAULT_PROFILE="aaa" docker push ...anddock... | Docker push Error saving credentials: error storing credentials - err: exit status 1, out: `not implemented` |
It's not necessary. Might even be cheaper to skip it and just let the OS free up the process.
Unless any objects of yours do anything useful in their dealloc, like saving data.
|
Let's say i have a navigation controller in my app delegate.
Why is it necessary to release it on dealloc method in my appDelegate?
When the dealloc method of my appDelegate is called, it means user is exiting the app, so the leak doesn't affect my application.
So why would i release anything in dealloc method of my a... | iPhone - Memory management question? |
It is best to switch to command line (simple CMD, no bash required), after having installedGit for Windows.Go to the root folder of your repository (not path/to/file, but path/to/root/folder/of/repository), where your project is.You can then create a repositorygit init .
git add .
git config --global user.name "your na... | Using the following programs and interfaces:R-4.2.2 for WindowsRStudio Desktop: Open Source Edition (AGPL v3)Git BashGitHubI am currently in the early stages of a tech program learning Data Analytics.On my PC, working within RStudio, I've created a project that is currently not under version control. I am trying to get... | Error message"...No such file or directory" when trying to set up project to inteact with Git |
There are several problems with the .htaccess you have there.As BSen linked in the comment above, you should use FilesMatch.
Also, your regular expression is wrong.The problem with the regular expression is that you have an escaped space at the start, so all files must start with a space character (followed by one of c... | This question already has answers here:.htaccess deny access to specific files? more than one(4 answers)Closed9 years ago.I want to deny access to multiple PHP files in directory/all/cstl/.My .htaccess is also stored in this directory.This is my current code and it's not working.<Files "\ (config.php|function.php|inclu... | Deny access multiple .php files with .htaccess? [duplicate] |
The port 3306 is already in use by other application. You can deploy MySQL to another port.example docker-compose:version: '3'
services:
mysql:
image: mysql:latest
hostname: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: bookproject
MYSQL_USER: ... | I'm trying to run docker-compose.yml from here:https://github.com/Project-Books/book-project#running-the-app.I tried to run a docker-compose file in Intellij IDEA Community Edition - usingDocker plugin 202.7319.5Here's the docker-compose.yaml file used:https://github.com/Project-Books/book-project/blob/master/docker-co... | Docker-Compose: Only one usage of each socket address (protocol/network address/port) is normally permitted |
Indeed the support for metadata option has been added since 1.9.10
aws s3 Added support for custom metadata in cp, mv, and sync.
so upgrading your aws cli to this version (or even better to latest) - and the metadata value needs to be a map so
aws s3 cp test.txt s3://a-bucket/test.txt --metadata '{"x-amz-meta-cms-... |
Trying to copy a local file named test.txt to my s3 bucket and add metadata to the file.
But it always prints error:
argument --metadata-directive: Invalid choice, valid choices are: COPY | REPLACE
Is it possible to do this with the cp command, as I understand the docs it should be possible.
AWS CLI CP DOCS
This is th... | AWS S3 CLI CP file and add metadata |
you may need to update Cuda, cudnn or TF and possibly a patch for CUDA. See issue discussion and solution here:https://github.com/qqwweee/keras-yolo3/issues/332 | I'm training sentences by BERT.
I used cpu but it was slow so i decided to use gpu.I'm using RTX 3080Ti. but as i changed to gpu-setup. this error happened..how can i fix it?I1227 21:38:02.311986 10468 basic_session_run_hooks.py:606] Saving checkpoints for 1 into D:\google-research\CV\model.ckpt.
2020-12-27 21:38:34.12... | TensorFlow error( CUBLAS_STATUS_EXECUTION_FAILED) |
You can do this with a Supervisorevent listener. Subscribe it to the eventPROCESS_STATE_FATAL, and respond to the event by sending a SIGTERM to supervisord, which you are presumably running as PID 1 within the container. | I'm currently using Supervisor inside my Docker images to start and manage my services and I would like to configure Supervisor to exit if at least one of these services entered FATAL state.Doing that, I want to avoid to have Docker containers in running state when nothing except Supervisor has succeeded to start. | Supervisor & Docker: How to exit Supervisor if a service doesn't start? |
It looks like your problem could be that 1.4.2 and 1.4.3 are not numbers and would be represented as string. You would need to add some logic like splitting the string by the period and doing checks on the sub versions.
Here is a post about comparing version numbers with JS that might solve your issue.
How to compare ... |
$.getJSON("https://api.github.com/repos/theinfection/screencalculator.kdapp/contents/resources/version", function(data) {
var currentVersion = decode64(data.content);
$.get('./resources/version', function(dataVersion){
var myVersion = dataVersion;
if (currentVersion > myVersion) {
... | How do I display a DIV if the current version of the program is greater than the version I have? |
You are running Docker-in-Docker, this means when you specify a -v volume, Docker will look for this directory on the host since the shared sock enabling Docker-in-Docker actualy means your run command starts a container alongside the runner container.
I explain this in more detail in this SO answer:
https://stacko... |
I'm trying to mount a directory containing a file some credentials onto a container with the -v flag, but instead of mounting that file as a file, it mounts it as a directory:
Run script:
$ mkdir creds/
$ cp key.json creds/key.json
$ ls -l creds/
total 4
-rw-r--r-- 1 root root 2340 Oct 12 22:59 key.json
$ docker run -... | Docker run -v mounting a file as a directory |
One option you have for AWS and .NET is developing a serverless architecture app. You can refer to theAWS Code Libraryfor a .NET app example.The Photo Asset Management (PAM) example app uses Amazon Rekognition to categorize images, which are stored with Amazon S3 Intelligent-Tiering for cost savings. Users can upload n... | We are planning create a new project with .net core web api backend and Angular/React frontend.We have couple of questions about deployment in AWS,what is the best deployment solution for this type of microservice project?Does .net core web api can deploy in AWS Amazon Linux with nginx?is it possible to use docker and ... | .NET Core Web API Backend and Angular/ReactJS Frontend deployment |
Found out what the problem was:
pg_dump -h 192.168.130.240 -p 5433 -U postgres -F c postgres > C:\Users\Marko Petričević\Documents\Radni_sati_Backup\proba
needs to be like this:
pg_dump -h 192.168.130.240 -p 5433 -U postgres -F c postgres > "C:\Users\Marko Petričević\Documents\Radni_sati_Backup\proba"
Problem w... |
Im trying to make a backup in a folder C:\Users\Marko Petričević\Documents\Radni_sati_Backup\proba where "proba" is the name of backup file.
My command looks like this:
pg_dump -h 192.168.130.240 -p 5433 -U postgres -F c postgres > C:\Users\Marko Petričević\Documents\Radni_sati_Backup\proba
and then i get an error... | pg_dump: too many command-line arguments when calling from cmd |
Every RUN line in a Dockerfile is essentially equivalent to docker runing the previous line's image. By default docker keeps all these intermediate images to help with caching, this speeds up subsequent builds. You can ask them to be removed when building by specifying the --rm or --force-rm flags.
|
I know how to removed containers and images.
What I don't understand is why those <none> images are created in the process of a docker build -t my_container . or a similar command.
Running docker images will give me something like that:
REPOSITORY TAG IMAGE ID CREATED V... | Why are <none> images created and why doesn't Docker clean them up? |
The realm is usually your company name. You can "programmatically" find the realm by getting the value of the hidden realm element in the page you usually login. say for example you are logging intohttp://yourcompany.com. you will see the user login page. now open the page source in the browser and search for realm. yo... | I'm currently VPN using a web interface through Juniper that asks for username and password. I want to programmatically connect but I have to usenclauncher.exe, which requires me to enter a "realm".How do I find out which realm I'm logging into? | Find out what the realm is for a Juniper Connect VPN session? |
You should return the stream directly instead of reading it into memory first.public HttpResponseMessage CreateMessage(Stream input)
{
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
result.Content = new StreamContent(input);
return result;
}Do not forget to set the appropriate head... | I use the following code to return a byte array inHttpResponseMessage:using (WebResponse response = (HttpWebResponse)request.GetResponse())
{
byte[] bytes = ReadFully(response.GetResponseStream());
......
}
public static byte[] ReadFully(Stream input)
{
byte[] buffer = new byte[16*1024];
using (MemoryStream m... | OutOfMemory Exception while converting MemoryStream to Array |
Here are the rewrite rules from CakePHP. It's simple and has always worked for me.<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
</IfModule>https://github.com/cakephp/app/blob/master/webroot/.htaccessNote: There is a space after the ^ character. No... | I've put my first Angular project live, serving on Apache. I found an htaccess to use somewhere (don't remember where now...)<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.ht... | Trouble loading SVGs in Angular project on Apache |
It's because the target is on a mounted network volume. You're runningrsyncas root, but that only gives you permissions to change ownership on the local (client) computer -- as far as the file server is concerned, you're whatever user authenticated to it, i.e. not root (unless you're using NFS, in which case it's more ... | World!I have a backup script that would runrsyncfor every user and will archive their/User/userfolder onto our shared drive. Running into an interesting problem withrsync: when executing the script as "sudo" from the shell as the current user I'm unable to preserve the permissions of other users. It will error out and ... | Running rsync as root: Operations Not Permitted |
There is no built-in mechanism for this in Mercurial. What you want to do is to specify the correct base changeset when you generate a new bundle. That is, in Step 4, you want to run$ hg bundle --base head-used-in-step-2 changes-after-2.hgYou can do the bookkeeping in different ways: teach your parrot to remember the l... | From a Mercurial repository I want to regularly create a bundle with all my latest commits (in order to email them).Starting with a clean directory I envision a process like this:create a clean repositorywork on my directorycommitwork more in directorycommit...send a bundle with the commits.work on my directorycommitwo... | In mercurial how do I bundle my latest commits and mark them as already bundled |
Have you tried using VSCode's built in functionality for developing in a container?
Checkout this page which describes how to do this:
Developing inside a Container
You can try out some of the sample container configurations provided by VSCode and use any of those devcontainer.json files as an example to configure a c... |
I want to run vscode in docker for internal test, i've created the following
FROM debian:stable
RUN apt-get update && apt-get install -y apt-transport-https curl gpg
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
&& install -o root -g root -m 644 microsoft.gpg /etc/apt/t... | Run vscode in docker |
This first looks puzzling and shows little information because--cleanupwill kill the pods after running. One can remove it to get more information. I, thus, reran the test withhelm test myReleaseName --tls --debugThen usekubectl get podsto examine the pod used for testing. (It could be of other names.)NAME ... | We have a simple release test for aRedischart. After runninghelm test myReleaseName --tls --cleanup, we gotRUNNING: myReleaseName-redis
ERROR: timed out waiting for the conditionThere are several issues in Github repository athttps://github.com/helm/helm/search?q=timed+out+waiting+for+the+condition&type=Issuesbut I did... | helm test failure: timed out waiting for the condition |
You can't match against querystring using a Redirec directive. You need to match against %{QUERY_STRING} variable using mod-rewrite. The following rule does what you want :RewriteEngine on
RewriteCond %{QUERY_STRING} ^view=account&task=paypal$ [NC]
RewriteRule ^/?index\.php$ http://example.com/paypal/? [R=307,L]?at th... | PayPal are annoying...if you have thousands of customer subscriptions whichPOSTIPN's (Instant Payment Notifications) to a certain URL...you can never change that URL. If you want to have the IPN's sent to another URL, their advice...tell all your customers to cancel their subscriptions and start new ones after you've c... | Apache 307 Redirect to redirect POST data |
Further to your comment, any URI beginning with/fetchthat does not match a static file within the aliased path, should be redirected to/fetch/index.php.location ^~ /fetch {
alias /usr/share/nginx/html/another_folder/web;
if (!-e $request_filename) { rewrite ^ /fetch/index.php last; }
location ~ \.php$ {
... | I faced with problem in configuring nginx server for yii2 basic app.Here is my service block file :server {
listen 80 ;
access_log /var/log/nginx/access-server.log;
error_log /var/log/nginx/error-server.log;
charset utf-8;
location /fetch {
root /usr/share/nginx/html/another_fo... | Nginx Yii2 configuration in different folders |
You might want to checkHealth Checking of Istio Servicesto check the health of your pods. As mentioned in the post, you would have to configure the containers withliveness probesusing kubectl before you can actually do health checking. | Closed.This question does not meetStack Overflow guidelines. It is not currently accepting answers.This question does not appear to be abouta specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic onanother Stack Exchange site, ... | How health check of Kubernetes work with Istio? [closed] |
FromhereSince its adoption as part ofKubernetesin 2014, the Etcd community has grown exponentially. There are many contributing members including CoreOS, Google, Redhat, IBM, Cisco, Huawei and more. Etcd is used successfully in production environments by large cloud providers such as AWS, Google Cloud Platform, and Azu... | Closed. This question isopinion-based. It is not currently accepting answers.Want to improve this question?Update the question so it can be answered with facts and citations byediting this post.Closed3 years ago.Improve this questionWhen I extend kubernetes with api aggregation, i found the extension api server needs a... | Why does Kubernetes not use other databases (like mongodb) but etcd? [closed] |
With .gitignore, only untracked files are ignored.
Once the file has been added, change to that file are not ignored.
In this case, you should use assume-unchanged or skip-worktree instead.
git update-index --assume-unchanged -- wp-config.php
or
git update-index --skip-worktree -- wp-config.php
|
Changes I make to a file that's within my .gitignore are being tracked by git.
File structure:
.gitignore
wp-config.php
Contents of .gitignore:
wp-config.php
When I change wp-config.php, and then run git status I see that it has been modified:
alex$ git status
# On branch master
# Changes not staged for commit:
# ... | .gitignore doesn't stop changes being tracked in files |
I maintain theKustomization providerand unlike the helm integration into Terraform it tracks each individual Kubernetes resource in the Terraform state. Therefor, it will show changes to the actual Kubernetes resources in the plan. And, most important for your issue here, it will also generate destroy-and-recreate plan... | I have a statefulset created using the terraform helm provider. I need to update the value of an attribute (serviceName) in the statefulset but I keep getting the following errorError: failed to replace object: StatefulSet.apps "value" is invalid: spec: Forbidden:
updates to statefulset spec for fields other than 'repl... | How to update statefulset spec with terraform helm provider |
Even though they are called exactly the same thing, a GitHub pull request and a 'git request-pull' are completely different.
The git request-pull is for generating a summary of pending changes to be sent to a mailing list. It has no integration by default with GitHub.
The GitHub Pull Requests is a fully featured funct... |
I've cloned a project, and pushed a branch with just a renamed readme file to README. I am trying to create a pull-request on the command line, just to try PR from here instead of a website.
$ git request-pull origin/master origin readme:readme
The following changes since commit 51320a3a42f82ba83cd7919d24ac4aa5c4c99ac... | git request-pull: how to create a (github) pull request on the command line? |
As the error message suggests you are being denied permission to access the certificates Kubespray needs to scale the cluster, specifically it needs the Certificate Authority (CA) to generate a certificate for the new node.Ensure that you have the correct file permissions to read the certificates for the CA and for the... | I have deployed a Kubernetes cluster with 1 control plane and 2 worker nodes using Kubespray. Now, I am trying to add another worker node. I have included the IP of the virtual machine to be added as worker node ininventory/mycluster/hosts.inifile and I ranansible-playbook -i inventory/mycluster/hosts.ini scale.yml --f... | Add Worker Node to Kubespray Cluster |
I used the clearsession parameter to get a fresh pdf with updated information,
it looks like this in the url:http://servername/ReportServer/Pages/ReportViewer.aspx?/MyReport/ &rs:Command=Render&ReportID=123456 &rs:Format=PDF &rs:ClearSession=trueManaging Report Sessions on a URLShareFollowansweredAug 28, 2009 at 21:27b... | I have a web page that downloads a pdf version of an ssrs report through a link. However when I make changes to the data, the browser pulls up the same pdf file as before without the updated information (the pdf file stored in the temp folder). If I then go to another browser and download the PDF I get the new version,... | How do I force the browser to get an updated PDF file generated from an SSRS report? |
Add it to the GROUP, e.g. (1refers to first column from the SELECT):SELECT
$__timeGroupAlias(receivedat,$__interval),
SUBSTRING(message, '(?:[0-9]{1,3}\.){3}[0-9]{1,3}') AS the_address,
COUNT(message) as cc
FROM systemevents
WHERE
$__timeFilter(receivedat,$__interval)
GROUP BY 1, the_address
ORDER BY cc DES... | I try to get output from PostgreSQL into Grafana , but there is errordb query error: pq: column "systemevents.receivedat" must appear in
the GROUP BY clause or be used in an aggregate functionThis is the codeSELECT
$__timeGroupAlias(receivedat,$__interval),
SUBSTRING(message, '(?:[0-9]{1,3}\.){3}[0-9]{1,3}') AS th... | PostgreSQL agregation function with group by |
Setup a controller action or script that is web accessible and does whatever you want it to do. Have it produce no output other than headers.Setup a cron job that does something like "wgethttp://yourservername.net/do/this/thing". People will probably tell you to use curl instead, but I just like wget.
You can acoompli... | I have a database which stores the work my staff do. One particular query I run tells me how much money I owe them for the current month (month to date), based on the hours that I have recorded for them. However, I would like to store this information into a table itself, for various reasons, not least to record whet... | Auto add to database on last day of month |
Looks like I may have figured it out. I went into the sub directory that wasn't being published, did git add * and committed all of those from there, then navigated back to root and pushed. Now all of the files are up.
I believe then that this means there must be some kind of recursive option/argument that I forgot to... |
I am trying to push an ASP.NET 4.5 MVC 5 project onto Github. For some reason, whenever I do it, it acts like it isn't recursively going through the folders and doesn't push some of the project's sub files.
Here is the repo:
https://github.com/albatrosscafe/HeavyweightDocumentationV2
The repo has a couple of binary fi... | How come my entire project is not pushed to Github? |
I have Sonarqube 6.7.2 and i can't but you can copy an existing profile and modify it as you want. | Can we modify existing sonarway ruleset? | Can we modify existing sonarway ruleset? |
Try this<FilesMatch "((?<!myfile|myfile2)\.js|(?<!myphoto).jpe?g)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>This will match alljsandjpegfiles exceptmyfile.js,myfile2.js, andmyphoto.jpegusing negative lookahead/lookbehind. Kind of ugly but I couldn't find a nice way to do this.You can then ha... | I need to make browser caching with htaccess file.Fromthis questionI found out how to add extensions to htaccess file.<FilesMatch "\.(js|jpeg|jpg)$">But I need to add extensions. But exclude some of the files.I found something like this fromthis question<FilesMatch ^((myfile|myfile2)\.js$|myphoto\.jpe?g)$>Add all js an... | .htaccess caching with FilesMatch |
+100No, it is not supported yet, but is a highly requested feature.You can see that there is anopen issue (JENKINS-50455)for implementing this new feature. | I'm sending build logs to Logstash via the logstashSend method at the end of a Jenkins declarative pipeline. The logs are being written to Logstash and I can query them in Kibana. The "data" section of the message contains what looks like a pre-configured set of Jenkins job properties. I'd like to add some properties t... | Can I set "data" properties on a Jenkins Logstash message? |
I wrote to GitHub support about this, they said:
"Will,
Okay, yes. That is a long name. We should not let that happen. Thanks
very much for pointing this out.
We don't currently have a way to delete a file from the web, but I
think it's pretty obvious we've been thinking about it and going in
that direction. I'... |
When creating a file through the github.com web interface, an accident occurred where the contents of the file were pasted into the new file name text box. This created a really long file name in the github repository. The filename contained double quotes, single quotes, utf-8 weird quotes from M$ Word etc...
After ... | Long file name stops pull from github.com |
It turned out caching was caused by the server setting the session cookie. iOS/Android handles cookies automatically so it was used with every fetch call.The solutionwas to delete all the cookies on logout using thehttps://github.com/joeferraro/react-native-cookieslibrary. | I'm using fetch API for interacting with server in my[email protected]app, but facing with quite aggressive caching.Call which I proceed can be expressed like:fetch(route + '&_t=' + Date.now(), {
headers: {
'Cache-Control': 'no-cache',
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'applic... | React-Native fetch API aggressive cache |
if you ever checked out this branch locally you can use git reflog to get back to it and recreate it.
$ git reflog
434f93d (HEAD -> CMD-28) HEAD@{0}: reset: moving ...
4544567 HEAD@{1}: reset: moving ...
434f93d (HEAD -> CMD-28) HEAD@{2}: rebase (finish): returning ...
434f93d (HEAD -> CMD-28) HEAD@{3}: rebase (pick):... |
I accidentally deleted a branch on Github using this tutorial. The gif is mainly what I followed. Is there a way to undo this?
| Is it possible to recover a deleted branch that you deleted using the Github website? |
1
As docker 1.12.3 there is no way to evenly rebalance/redistribute containers on swarm nodes after a failure.
But you can try these workarounds:
Drain the node will all the containers, The containers will stop and will be started on other nodes depending on your schedulin... |
I currently have a 10 container Jenkins setup in my docker swarm environment which includes 3 masters and 4 slave nodes. I rebooted both masters and slaves a few minutes ago and noticed all the containers now showing up on one node when i do a docker ps. Not evenly distributed across masters and slaves.
Is there a wa... | Force Docker Swarm container distribution |
If you want to retrieve the value of a metric you should usequery_result(),metrics()gives you thenameof matching metrics, not the value itself.Your Query should be:query_result(passed_tests_total{job="MyJob"})And the Regex to extract just the value of metric should be/.* ([^\ ]*) .*/.ShareFollowansweredJan 18, 2019 at ... | I am pretty new to Grafana, so the question might be an easy one:I try to store a metric value in a variable. Therefore I setup a variable with Prometheus query:metrics(passed_tests_total{job="MyJob"})Surprising to me, the value returns valueNone, although metric values with that label exist. I verified that by setting... | grafana define variable with prometheus query based on metrics |
It's non-trivial, but the twistlock authz plugin supports limiting actions of individuals on the Docker engine. You'll need to configure Docker with certificates, give out certificates to the users accessing docker, remove their unix socket access by removing them from the docker group and having them login through th... |
I have just started learning docker.
I have created a group 'docker' and added users into the group so these users can avoid using sudo when doing 'docker run' etc...but I do not want these users to run 'docker rm,docker rmi, docker images' etc. Is there a way to set a restriction on these commands for users in 'dock... | Add restrictions on docker command |
The messages are store in a DB in the following location:/data/data/com.android.providers.telephony/databases/mmssms.db | What is the procedure to take backup of media and messaging? Is there any possible to do this. Anyone help me please. | Android : Taking backup for media and messaging? |
You can use this simple 301 rule in your site root .htaccess:RedirectMatch 301 ^/old(/.*)?$ /newOr else use this rule in/old/.htaccessfile:RedirectMatch 301 ^ /new | I am trying to redirect an old directory, all possibly sub-directories, and all possible files all to one new directory.Redirect anything such as:.com/old.com/old/older.com/old/index.php.com/old/older/index.phpand so on all should redirect to .com/newI've tried several .htaccess generators and tutorials, and I get a ve... | 301 Redirect directory and any possible files therein to new directory |
I suggest using Hazelcast with your spring boot application(embedded cache topology)In this case, the application and the cache data are running on the same node. When new data is written to cache, Hazelcast takes care of distributing it to the other members. So that data would be available for all the instances.Please... | We have a springboot application deployed in kubernetes with 4 pods. Now we want to maintain cache of a specific value using spring cache. Based on a specific event we need to update the cache value, but as the application is deployed on multiple instances, is there a way we can update the cache value on all the instan... | How to update cache in multiple instances in springboot application |
Which browser are you using? Are you sure that this happens? Because it shouldn't. If you include a relative URL in a link, it will get resolved relative to the URL of the document that contains the link. In other words, when you include<link href="assets/css/common.css" rel="stylesheet">in an HTML document athttp://ww... | I have created agh-pagesbranch for a project that I am working on at GitHub.I use Sublime text to author the website locally and my problem is that when this is pushed to GitHub, all the links to javascrips, images, and css files are invalid.For instance, I have this in my head section.<link href="assets/css/common.cs... | GitHub pages and relative paths |
"no Applink" explains the failure -- even though it caused ERR_print_errors_fp to also fail.On Windows to pass opened files or sockets from your exe to the OpenSSL libraryiflinked as DLL (which is the default, but overridable) you mustcompile and link into your application exe the supplied file include/openssl/applink.... | I am trying to develop a minimalclient-onlySSL/TLS app to connect to an https server. It always fails on on 'SSL_connect(). I haven't installed any certificates.Are certicates required in such a case?I've found many answers on SO and elsewhere that say NO with the caveat"unless required by the server".Details:I'm usin... | Are certificates required for client-only SSL/TLS apps? |
In general8443will be the "alternative port for HTTPS", but you are still at risk of being filtered.The proper solution should be to run proxy likenginxon port 443 and provide access to various applications based on the hostname, not the port. In example you can configure it to run your current app when user reacheshtt... | so I developed a public chat application which will run on a node server using secure socket.io.That server, which only has a single IP address already has ports 80 / 443 occupied.So I need to find the next best port to use for the chat server.
I wonder is there a recommended next best port that will allow most firwall... | Which is best port to use for secure Chat server to allow general firewall bypass (port 443 is already occupied) |
1
If you were expecting the HashSet to keep only unique int[][]s, and eliminate duplicates, that's not going to work -- the equals and hashCode implementation for int[][] (and all arrays) is identity-based. If you had been depending on uniqueness to keep the number of dist... |
I am trying to generate a set of 2D int arrays that should (at least) be 6x6. Each array stores values from 0-6. I tried using a simple HashSet<int[][]> to store them (with 512MB of memory), and I quickly got the error
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
only a short way ... | Smallest way to store a 2D array in java |
You can try out following steps so that you will not loose your current nexus-data.
#>docker run -v nexus-data:/nexus-data sonatype/nexus3
#>docker cp /nexus-data/. <container-name-or-id>:/nexus-data/
#>docker stop <container-name-or-id>
#>docker start <container-name-or-id>
docker cp will copy data from your host-ma... |
Actually, I run my containers like this, for example :
docker run -v /nexus-data:/nexus-data sonatype/nexus3
^
After reading the documentation, I discover volumes that are completely managed by docker. For some reasons, I want to change the way to run my containers, to do something like this :
docker ru... | Move docker bind-mount to volume |
kubectl top nodesis reflecting the actual usage of your Kubernetes Nodes.For example:Your node has60GBmemory and you actually use30GBso it will be 50% of usage.But you can request for example:100 MBand have a limit200MBmemory.This doesn't mean you only consume 0.16% (100 / 60000) memory, but the amount of your configur... | I try to get CPU/Memory usage of the k8s Cluster Nodes viametrics-server API, but I found the returned values ofmetrics-serveris lower than actual used CPU/Memory.The output of kubectl top command :kubectl top nodesThe following is the output of thefreecommand, from which you could see the memory usage is great than 90... | The metrics of kubectl top nodes is not correct? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.