Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
I figured it out. I had the arguments in the wrong order. This works:
scp -i mykey.pem somefile.txt [email protected]:/
|
I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.
However, when I want to copy a file to the instance using scp I am asked to enter a password:
scp somefile.txt -i mykey.pem [email protected]:/
Password:
Any ideas ... | scp (secure copy) to ec2 instance without password |
It seems you're using Windows XP SP2 COM API, which is known to have issues on Windows Vista/7 and newer versions.It's recommended that you use the newer API:(I have not tested this)Type netFwPolicy2Type = Type.GetTypeFromProgID("HNetCfg.FwPolicy2");
INetFwPolicy2 mgr = (INetFwPolicy2)Activator.CreateInstance(netFwPoli... | Windows 7, 8.1I get an exception when I tryto disableWindows Firewall. I try to do it with admin rights. But I haven't the same problem for Windows Firewallenabling.Type NetFwMgrType = Type.GetTypeFromProgID("HNetCfg.FwMgr", false);
INetFwMgr mgr = (INetFwMgr)Activator.CreateInstance(NetFwMgrType);
// Get the Windows ... | How can I disable Windows Firewall? |
I got an answer for the question. I'll post it here in case anyone else has trouble.
Apparently, overhead is a more general term in Computer Science that I'd never heard before, referring to extraneous resources - in this case, bits.
When referring to cache overhead, the question was referring to bits that are neces... |
I've been given a problem by my computer architecture professor but it is using some terminology that I cannot find in our textbook.
Basically, I'm given a cache with the following parameters:
-4KB address space
-Byte-addressable memory
-Direct-Mapped
-2 blocks in cache
-4-word blocks
I have no problem drawing out ... | How to Calculate Cache Overhead? |
1
You could forward environment variables etc from the parent image by writing to a file and the copy it into the next image. Then in your entrypoint somehow read it and export variables etc. But i would say it's a bit exotic design.
But in your case there seems to be quite... |
I have an application packages as .bin and it runs on rhel7-init base image. The following is the Dockerfile with the parent image and child image.
FROM registry.access.redhat.com/rhel7-init:7.3 as base
COPY yum.repos.d/ /etc/yum.repos.d/
RUN yum -y install sudo systemd
RUN yum install https://download.postgresql.org... | How to create Docker multistage build with Linux dependencies and environment vars from parent image? |
104
On MAC, if above-mentioned tricks don't work, do the following:
Open Keychain Access
Search for CodeCommit. You should find this:
Select 'git-codecommit....' and press delete
Confirm the delete.
Now try again. It should work. You may have to do it again next time... |
My local laptop is a Mac.
The ssh key is configured properly. This is the content of ~/.ssh/config
Host barthea
Hostname git-codecommit.us-east-1.amazonaws.com
User AVVVVVVVVVVVVVVVVVQ
IdentityFile ~/.ssh/aws-aws.pem
Running ssh barthea gets me
You have successfully authenticated over SSH. You can use Git to intera... | running git clone against AWS CodeCommits gets me a 403 error |
Cronjob commands should contain minute(m), hour(h), day of month(dom), month(mon) and day of week(dow).You should write them using the format below :# (m) (h) (dom) (mon) (dow) commandYou're missing one parameter in your case.For example, if you want to run your code at 08:55 everyday, you can use :55 08 * * * /usr/bi... | I am using Putty and it does not have Python3 it has python2 or python so tried both to run python file by using command55 08 * * * /usr/bin/python2 /home/user/file.pyand couple of other commands BUT nothing is working.The python file I have runs totally fine with spark2-submit command. This is a pyspark file converte... | Not able to run python file in Cron Job in putty |
You might consider:
making sure your submodule B, in repository A, follows a branch (main, for instance)
using a multi-project pipeline
You can set up GitLab CI/CD across multiple projects, so that a pipeline in one project can trigger a pipeline in another project. You can visualize the entire pipeline in one plac... |
I have a project A and I have added a submodule to another project B.
I see that the submodule used in A is referring to a particular commit, and I would like this to be updated every time a new commit appears in B.
Is it possible to trigger an automatic pull/push of the submodule in A when B is updated?
Or this proce... | Trigger automatic pull/push for submodule after new commit appear |
I believe the proper way to do this in symfony 1.2 is as follows:sfContext::switchTo('frontend'); //switch to the environment you wish to clear
sfContext::getInstance()->getViewCacheManager()->getCache()->clean(sfCache::ALL);
sfContext::switchTo('backend'); //switch back to the environment you started fromShareFollowan... | I would like to clear my frontend application's cache from an action in my backend application.How can I achieve this? | Clearing Symfony cache for another application |
In your other PC the file.gitconfigshould not be the same as on the first one.This file is your git config for the local user. It can contain colors settings, alias settings, and more importantly, regarding your problem user settings:[color]
diff = auto
status = auto
branch = auto
[user]
name = Exemple
email ... | I work alone in a repo at Github. Then I saw two collaborators working on this project. Both share my username but only one account is linked to my profile. The other I without any profile link has made over 80% of the commits.As note: I switched to my other PC, cloned the repo withgit clone https://github.com/myaccoun... | Github shows me twice as collaborator |
Helm supports passing arguments to dependent sub-charts. You can override the architecture of yourredissub-chart by adding this to yourvalues.yamlfile.redis:
architecture: standalone | InChart.yamlI specified dependency:dependencies:
- name: redis
version: 15.0.3
repository: https://charts.bitnami.com/bitnamiIndeployment.yamlI specify service:apiVersion: v1
kind: Service
metadata:
labels:
app: redis
name: redis-svc
spec:
clusterIP: None
ports:
- port: 6355
selector:
... | Helm: install single redis instance from chart dependency |
1
Although it is not possible to set an alias for the exec mode when using a container it is however possible to do it for run mode using the script below:
%runscript
alias python3='python3.6'
eval ${@}
The difference between exec and run is that exec runs the comm... |
I have been trying to set some aliases in my container but I haven't been able to do it successfully. While building the container I put alias python3=python3.6 in %post and things work fine; the alias is correctly declared and is used throughout the container building process.
However, after the container is built an... | How to set a Python alias in a Singularity container upon execution? |
1
As told by mario, the problem is that s3 resolution is higher than those other models, so images are bigger in dimensions and, therefore, also in memory consumption.
Although it is worth to say that the S3 seems to have a little maximum heap size givin its resolution, s... |
Samsung Galaxy S3 uses 32mb heapsize almost instantly on my app, where on almost any other android device it starts at +- 5mb (saw this in logcat, can send screenshots from two different devices if necessary). Think this is the reason for my app crashing with "OutOfMemory" Exception's on only the Galaxy s3, works perf... | "OutOfMemory" Exception only on Samsung Galaxy S3 |
The native pragmaautousewill load modules needed when plainsubroutinesare called:use autouse 'My::Module::A' => qw(a_sub);
# ... later ...
a_sub "this will dynamically load My::Module::A";For proper OO methods,Class::Autousewill load modules (classes) whenmethodsare called:use Class::Autouse;
Class::Autouse->autouse( '... | Given the following module:package My::Object;
use strict;
use warnings;
use My::Module::A;
use My::Module::B;
use My::Module::C;
use My::Module::D;
...
1;I would like to be able to call My::Object in the next 2 scenarios:Normal useuse My::Object;My::Module->new();Reduced memory use. Call the same object but with a ... | How to dynamically avoid 'use module' to reduce memory footprint |
#redirect empty user agent, UNLESS it's accessing the RSS feed
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteCond %{REQUEST_URI} !^/rss.php # <-- path to rss.php
RewriteRule .* http://%{REMOTE_ADDR}/ [R,L]Archived Source:http://wiki.e107.org/index.php?title=Htaccessexample | Is there any solution for preventing http request that has an empty user agent string preferably using .htaccess? | How to block an empty user agent request |
In CloudFormation you createAWS::EC2::Instance. To have thelatest AMI of Amazon Linux 2, you can usedynamic references.The basic example of them:Parameters:
LatestAmiId:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'
Resources:... | Is it possible to use the AWS CloudFormation stack with Amazon Linux 2? Currently, I only found Amazon docs that are pointing to Amazon Linux AMI. Unfortunately, AMI would stop being supported in 2023 (and is marked as deprecated already). | (AWS) CloudFormation stack with Amazon Linux 2 |
I removed the known_hosts file from my ~/.ssh folder, which did the trick. Everything works now.
|
OS - Windows 7 professional 64 bit
GIT for windows - Git-1.9.0 - Using Git bash
I started having problems with "git fetch" suddenly out of nowhere.
Sometimes git.exe would error out and sometimes the "git fetch" would just hang.
So I decided to start everything from scratch.
I uninstalled git for windows and reinst... | git clone hangs at "checking connectivity" |
Your analysis is indeed correct, but I guess your professor is looking for an explanation like this:Suppose the single cycle processor also has the stages that you have mentioned, namely IF, ID, EX, MA and WB and that the instruction spends roughly the same time in each stage as compared to the pipelined processor vers... | I have to compare the speed of execution of the following code (see picture) using DLX-pipeline and single-cycle processor.Given:an instruction in the single-cycle model takes 800 psa stage in the pipeline model takes 200 ps (based on MA)My approach was as follows.CPU time = CPI * CC * ICSingle-cycle:CPU time = 1 * 800... | Pipeline processor vs. Single-cycle processor |
Just wrap theseries selectorintolast_over_time()function with some pre-defined lookbehind window in square brackets. For example:sum(last_over_time(my_metric_counter[5m]))In this case the query result shouldn't depend on the interval between points on the graph in Grafana. | I’m quite a beginner of Grafana and Prometheus, I’m facing a strange situation about a stat widget showing a number, the prometheus query is simply this:
sum(my_metric_counter)I tried to compose a screenshot where you can see steps I do to reproduce what I think is a problem, but I understand that the interval query op... | Interval in query options and the resulting number changing from resolution to resolution |
Re:will this execute in Executor or Driver?Once you call tableList.collect(), the contents of 'tables.txt' will be brought to the Driver application. If it is well within the Driver Memory it should be alright.
However the save operation on Dataframe would be executed on executor.Re:This will throw Out of Memory Error... | I'm trying to read a config file in spark read.textfile which basically contains my tables list. my task is to iterate through the table list and convert Avro to ORC format. please find my below code snippet which will do the logic.val tableList = spark.read.textFile('tables.txt')
tableList.collect().foreach(tblName =>... | Use RDD.foreach to Create a Dataframe and execute actions on the Dataframe in Spark scala |
-1you can use self-signed certificate, but it might work only with edge, the latest versions of major browsers didn't trust self-signed certificates, you can navigate to "Security" section in "Developer Tools" to see the exact error.want to see an example? see this:https://www.youtube.com/watch?v=0kvOQJj7gVkbut it won'... | is it possible to have a verified certificate for xampp localhost? I able to navigate to https in localhost but i got this error "Connection is not secure".I want something like this when i navigate to localhost.Thanks. | Posibility of implement trusted HTTPS in localhost (xampp) |
... Connection reset by peer at /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/Net/SSL.pm line 145You are running a very old version of Perl (from 2004) together with an old version of the SSL libraries (i.e. Crypt::SSLeay instead of IO::Socket::SSL) and my guess is that this goes together with using a very... | I am trying to call a web service using ssl. It gives following error:500 SSL negotiation failed:I searched forums and applied offered methods but none of them worked.2 methods I applied are listed below:1-) setting enviroment before call:$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;2-) passing parameter ssl_opts => [ SSL_ve... | Perl Webservice SSL Negotiation Failure |
Google Colab has by-default the latest stable tensorflow and python version installed. You need not to install the tensorflow-gpu to have GPU support enabled in Google Colab untill you need a specific tensorflow version required for your code. You can access the tensorflow package with gpu enabled directly by importing... | At first I choose the runtime to be GPU and selected the available T4 GPU. Then I try to install TensorFlow GPU in Google Colab by running the command !pip install tensorflow-gpu!pip install tensorflow-gpuBut I encountered this error:Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-
wheels/... | Error installing TensorFlow GPU in Google Colab: subprocess-exited-with-error |
Apache cannot do this. You can use jquery but it might not be accurate unless you perform long-polling on the page. Your question has been answered here in full on StackOverflow:
How to measure a time spent on a page?
|
Is there a library or solution for quick apache/nginx log parsing and finding out how much time a user has spent on each page?
UPDATE: spent on every 3rd level domain.
For example AWStat can do that ( A full log analysis enables AWStats to show you the following information: Visits duration and last visits)
| time user spent on the page |
You're essentially correct, though there are a few ways that it was typically done to make it look less awkward:
Foo* someFoo = [[Foo alloc] init];
self.foo = someFoo;
[someFoo release];
Or more succinctly:
self.foo = [[[Foo alloc] init] autorelease];
|
I am using ARC but reading the MRR part of Objective-C, and it seems like if a property of ViewController is (for non-ARC):
@property (retain, nonatomic) Foo *foo;
then the viewDidLoad of ViewController will need to do a release right after alloc and init:
- (void)viewDidLoad
{
[super viewDidLoad];
self.foo ... | In Objective-C MRR, if foo is a retain property, then self.foo = [[Foo alloc] init] will need to be released immediately? |
Use resolver in nginx config
The nginx resolver directive is required.
Nginx is a multiplexing server (many connections in one OS process), so each call of system resolver will stop processing all connections till the resolver answer is received. That's why Nginx implemented its own internal non-blocking resolver.
If ... |
After deploying to AWS EKS I get this error
Gtihub repo: https://github.com/oussamabouchikhi/udagram-microservices
Steps to reproduce
Create AWS EKS cluster and node groups
Configure EKS cluster with kubectl
Deploy to EKS cluster (secrets first, then other services, then reverserproxy)
. kubectl apply -f env-secret.... | nginx: [emerg] host not found in upstream "udagram-users:8080" in /etc/nginx/nginx.conf:11 |
2
TeamCity has an 'Automatic Merge' feature. Please have a look at the documentation and the related blog post
Share
Improve this answer
Follow
answered Mar 27, 2016 at 8:34
Oleg RybakOle... |
Does anyone know if it is possible to update source files during a build (from an external source for e.g. like checking if there are new translations and merging those in) and then merge those changes to a git branch via a Pull request with TeamCity as part of the build steps?
| TeamCity automatically update sources and merge to git repo |
This issue can be resolved by setting options.secure to true as mentionedhere. | I have a simple web application using peerjs here:https://github.com/chakradarraju/bingo. I was planning to use github.io to put up a demo, and github.io will be served only in HTTPS, the default PeerServer that is used by the peerjs library doesn't support HTTPS.Is there any public HTTPS PeerServer that I can use? | Is there any public PeerServer over HTTPS? |
Docker images can be served at the moment ONLY with a private registry/hub and not as standalone even if you want to just use amazon s3 as backend so you have to run this registry somewhere and I believe you can use any cheap VPS other than amazon EC2 micro if you want to run it more cost efficiently but you HAVE to do... | I am setting up an EC2 Container Service task but am looking use some private container images. Int the Docker Registry container, you can choose an interface to S3 as a storage backend. Is it possible to point a task definition image reference to an S3 bucket instead of a running a full private registry/hub? That woul... | AWS ECS - Images from S3 |
Wordpress doesn't check the rewritten url (/category/1), but parses the original request url (/hello), and so it doesn't know what to do with/hello. To fix this use the proxy flag. So[L]would become[L,P]ShareFollowansweredMay 30, 2012 at 9:54GerbenGerben16.8k66 gold badges3838 silver badges5656 bronze badgesAdd a comme... | I'm trying to add some rewrite rules to a Wordpress site, to go a little further than wp's own rewrite capabilities, but i am having trouble when I place those rules BEFORE wordpress own rules: if my rule rewrites to something that wordpress will rewrite later, it doesn't work. E.g:www.domain.com/hello -> www.domain.co... | htaccess rules before wordpress own rules |
Ahost path volumeisbind mountedinto a container. So anything available on the host will become available in the container.A FUSE volume is not directly supported by kubernetes, as in provisioning a PVC on a node via some fuse driver buthostPathshould work fine. | if a filesystem writted in FUSE mounted on host, can containers started by Docker use it? I use k8s to deploy containers and want to do something by FUSE. | Does Docker support filesystems written in FUSE mounted on host OS? |
According to theJenkins documentationyou should use on:Linux/Unix:${MY_GLOBAL_VARIABLE}or$MY_GLOBAL_VARIABLEWindows:%MY_GLOBAL_VARIABLE%SonarQube Scanner for Jenkinshas supported using environment variables since version 2.5 (seeSONARJNKNS-267 Support using env variable to configure Scanner for MSBuild), so it should b... | I'm using the "SonarScanner for MSBuild for Jenkins" and i'm trying to change sonarQube projectVersion number automatically.I have a windows system variable that contains the number that i want put in this window.
I try in many diferents ways (with no success):ProjectVersion: %MY_GLOBAL_VARIABLE%
ProjectVersion: MY_GL... | How to change sonarqube projectversion number automatically in jenkins |
Git cares only about the executable bit. The rest is left to the system. Unix systems have a per-process umask value, set and maintained by the umask command, that says which permissions not to grant. 0022 and 0066 and 0077 are common settings for that. My Arch linux default is 0022, don't grant write privilege to a... |
I cloned the same project from Github on my MacBook (Sierra) and Linux machine (Ubuntu 16.04), and I see the file mode on my MacBook is "-rw-r--r--", but in my Linux machine, it is "-rw-rw--r--".
Is there a way to make them consistent? Thanks!
| Why the file modes on OSX and Linux are different when cloning code with git |
1
I had the same problem.
My approach was to sanitize the repo by BFG and then push the clean repo to the new server.
Here an example:
git clone --mirror git://some-server.com/some-dirty-repo.git
java -jar bfg.jar --delete-files /some-dirty-path/some-dirty-files-pattern
cd... |
My company has a Git repo that supports LFS.
The LFS was set up before I joined.
I believe person set it up didn't tell other people. So over time, there are missing LFS objects here and there.
That brings it to today.
I was tasked with moving the current repo to a new repo.
However, when I try to fetch and push the L... | Git LFS Missing Files |
This looks like a git submodule to me:✓ Folderis a double grayed out folder icon on GitHub✓ When repo is cloned, files from the folder are not copied locally✓ Can commit files in the folderLooks like you may have accidentally created agit submodule. The way to fix this would be to look for a.gitmodulesfile in the root ... | So I have a blog up and running fine using Jekyll and GitHub. The weird thing is that when I view my repo via the GitHub website and navigate to the folder containing my blog, it is greyed out (the icon is a double grayed out folder one on top of the other).Also when I clone my repo the folder doesn't copy any files lo... | Jekyll GitHub Blog Folder Not Accessible |
As for my experience, You should use multiple levels of cache. Implement both of Your solutions (provided that it's not the only code that uses "SELECT title, body FROM posts WHERE id=%%". If it is use only the first one).
In the second version of code, You memcache.get(query.hash()), but memcache.put("feed_%s" % id, ... |
Something I'm curious about.. What would be "most efficient" to cache the generation of, say, an RSS feed? Or an API response (like the response to /api/films/info/a12345).
For example, should I cache the entire feed, and try and return that, as psuedo code:
id = GET_PARAMS['id']
cached = memcache.get("feed_%s" % id)
... | How granular should data in memcached be? |
It is the constraint from the ETCD.The limit is 1MB because that's the limit for etcd.size limit | I am trying to upload a jar file in a config map. I am able to upload the small jar file of size 1 MB but not a file of size 4MB. I am using below command to create configmap.kubectl create configmap configmap-test --from-file=jarfile.jarIs there a way to increase this size limit?Client version is GitVersion:"v1.14.1" ... | Can we increase the size of configmap to store binary data of size more than 1 MB? |
From the Mystik-RPG folder:
git rm -rf mapeditor
|
I'm trying to delete the folder mapeditor from my Java engine on GitHub here (https://github.com/UrbanTwitch/Mystik-RPG)
I'm on Git Bash.. messing around with rm and -rfbut I can't seem to do it. How do I remove mapeditor folder from Mystik-RPG completely?
Thanks.
| Deleting a folder from GitHub |
-1A root as defined inRFC5280, Section 3.2:(a) Internet Policy Registration Authority (IPRA): This
authority, operated under the auspices of the Internet
Society, acts as the root of the PEM certification hierarchy
at level 1. It issues certificates only for the next level
of authorities, PCA... | May the root store contain non-self-signed certificates, i.e. the issuer and subject are different?If so, will certificate chain validations return “success” upon encountering a non-self-signed certificate in the root store, or will the validation continue in the root store until either a self-signed certificate (“succ... | May the certificate root store contain non-self-signed certificates? |
I do confirm the issue. Thetickethas been created (planned for SonarQube 5.2). | I have SonarQube 5.1.1 installed and have several plugins as well.I'm testing out thesonar.web.contextparameter and it seems to be working just fine for the most part, but when I try to load or apply my saved Issues Filters, nothing loads and it gives me a 404 error in the console since the web context is missing. Is a... | SonarQube sonar.web.context causing issue filters to fail |
These variables are probably going to be read from your environment, so just define them.export JAVA_PERM_MEM...About the PermGen exception, do you may be use spring DM? or some spring related osgi bundles? There are a couple of issues around that. | I am trying to figure out how to increase karaf's permgen memory. In the karaf's start up script I see that there is:if not "%JAVA_PERM_MEM%" == "" (
set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -XX:PermSize=%JAVA_PERM_MEM%
)
if not "%JAVA_MAX_PERM_MEM%" == "" (
set DEFAULT_JAVA_OPTS=%DEFAULT_JAVA_OPTS% -XX:MaxPer... | Apache Karaf startup script. How to set more perm memory? |
This would better be a comment, however, I've got not enough reputation to do so:Could you clarify your problem? You wrote, that nginx is serving content from/usr/local/var/www. What do you expect instead? Did you specify a different folder? If so, which one, and in which config did you do this?Normally,nginx.confis us... | I am using nginx on Mac, I installed it using Homebrew, and it used to work fine until this morning. Now, after a reboot, it doesn't read mynginx.conf(from/usr/local/etc/nginx/nginx.conf) anymore and loads its defaultindex.htmlfrom/usr/local/var/www. If I force pass the config file explicitly using -c switch (sudo ngin... | Nginx does not read my config file |
Yes, it can be done using Prometheus and Alert manager but you will something to export the metric that you want to monitor to promethes. In your case script_exporter will work. You would have to setup the exporter inside that container and configure it to execute something likels | wc -lin the folder you want to monit... | I'm looking to write a prometheus rule to constantly check for message queue length(exim mail relay) which is the total number of files in a directory in an app's container and alert a slack channel via alert manager. Is this possible at all with Prometheus/Alert manager ? | Prometheus rules - check file count inside a directory of an app container |
As I explained in "Git submodules: Specify a branch/tag", you can use agit configcommand to edit the.gitmodulesfile.git config -f .gitmodules submodule.<path>.branch <branch>But then, don't forget to do:git submodule update --remoteThat will update the submodules content to the latest of their assigned branch.How 3.0.1... | Fromffmpeg-android, I find the repo depends on ffmpeg repo. I find the version offfmpegis3.0.1.I have tried to edit.gitmodules.[submodule "ffmpeg"]
path = ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git
branch = release/3.4
[submodule "x264"]
path = x264
url = git://git.videolan.org/x264.git
[subm... | Update gitmodule |
5
If you don't appear in a repository's contributors graph, it may be because:
You aren't one of the top 100 contributors.
Your commits haven't been merged into the default branch.
The email address you used to author the commits isn't connected to your account on GitHub.
... |
Why my github commits are like this. Is this the reason that I am not showing up as a contributor.
| Why am I not showing up as contributor in github? |
I found something interesting, it is kind of hack:count_values without() ("my_new_label", start_metric) | Some query returns:{id="cart"} 0.014961101137043577
{id="payment"} 0.014961101137043577
{id="products"} 0.013670539986329524But I would like to have:{id="cart", a="0.014961101137043577"} 1
{id="payment", a="0.014961101137043577"} 1
{id="products", a="0.013670539986329524"} 1I've looked everywhere, but I am wo... | PromQL - Prometheus - query value as label |
It turned out that this was due toa recent Docker updatewhich caused problems with the older 3x kernel found by default on Ubuntu 14.04 LTSHelpfully it is possible to upgrade the kernel version on 14.04 rather than upgrading the whole OS. It can be done as described onthis Ask Ubuntu article, but in short:sudo apt-get ... | With Jenkins running on a Ubuntu 14.04 LTS server we began getting crashes on startup of test containers with the following error:OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknownIniti... | Docker crashing on Ubuntu 14.04 for any container |
kubectl get allshows you the resources you createdin this case it starts with the kind and the resource name.You can easily typekubectl delete pod/my-ngnixto delete the pod. Your commandkubectl run my-ngnix --image nginxcreated just the pod without a deployment.ShareFollowansweredAug 17, 2021 at 20:15ManuelManuel1,9872... | I ran this command to create my pod:kubectl run my-ngnix --image nginxNow, I'm trying to delete the pod/deployment with the following command:kubectl delete deployment my-nginxThe problem is that my terminal is telling me that is not possible. Since it couldn't found the right info.Error from server (NotFound): deploym... | Kubectl is not letting me deleting anything - How do I delete all the current deployments? |
You can use buildx in docker-compose by setting ENV variableCOMPOSE_DOCKER_CLI_BUILD=1, also if buildx is not set as default, you should addDOCKER_BUILDKIT=1:COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build | I can build my dockerfile separately using following command:docker buildx build --platform linux/arm64 -t testbuild .now I want to use buildx in docker-compose file, but how, and how to say I want to use the arm64 architecture? This is the structure when I use the normal build.testbuild:
build: …/testbuild
image: test... | Use buildx build linux/arm64 in docker-compose file |
.0 is the current release.The documentation for the upcoming next release (1.1) is available from the options and settings menu (gear icon) in the top right corner of the istio.io site.On the kubernetes setup page it says that it's been tested on Kubernetes 1.10, 1.11, and 1.12.https://preliminary.istio.io/docs/setup/k... | Is there a link that shows the mapping of Istio and supported Kubernetes? The FAQ section just mentions this... "For our 1.0 release, Istio supports environments running container orchestration platforms such as Kubernetes (v1.9 or greater) and Nomad (with Consul).". What about the releases after 1.0? | Istio on Kubernetes - Version compatibility mapping |
You can achieve this by usingSet-ItResult, which is a Pester cmdlet that allows you to force a specific result. For example:Describe 'tests' {
context 'list with content' {
BeforeAll {
$List = @('Harry', 'Hanne', 'Hans')
$newlist = @()
foreach ($name in $List) {
... | I would like to be able to skip tests if list is empty.a very simplified example:No name is -eq to "jens", therefore the $newlist would be empty, and of course the test will fail, but how do i prevent it from going though this test if the list is empty?context {
BeforeAll{
$List = @(Harry, Hanne, Hans)
$new... | Pester test if list is empty do not run the tests |
How about this?You need to run as:sudo umount /dev/xvdf | I have create an EBS drive, attached it to the Instance and created file system usingmkfs.ext3.
Now i want to unmount and delete the drive, i've tried many things but nothing seems to work. Although i am able to detach the drive from instance and delete using EC-2 Console,
but when i am checking partition usingdf -hkit... | Amazon EC2: Unable to unmount and remove EBS drive file system |
Leaving aside issues of exactly-once semantics, one way to handle this would be to have a parallel source function that emits the SQL queries (one per sub-task), and a downstreamFlatMapFunctionthat executes the query (one per sub-task). Your source could then send out updates to the query without forcing you to restart... | I need help on Flink application deployment on K8we have 3 source that will send trigger condition as in form of SQL queries. Total queries ~3-6k and effectively a heavy load on flink instance. I try to execute but it was very slow and takes lot of time to start.Because of high volume of queries, we decide to create mu... | Flink - multiple instances of flink application deployment on kubernetes |
The only way to update a pull request is to push to the branch that's been PRed - so even the original repo's owner can't amend the PR, by default. It does make sense - for traceability's sake, at least.
So if you want to finish that work, the best thing you can do is to fork the original repo, clone it on your machin... |
In a repository which is not mine, a third person opened a pull request. One of the owners suggested some changes to make before being able to merge it. However, the author of the pull request has not done it, and it remains open for several months without the modificqtions have been implemented.
Actually I am referin... | Is it possible to continue a pull request opened by someone else on Github? |
You can set the fragment_cache_store in your environment.rbActionController::Base.cache_store = ActiveSupport::Cache::MemCacheStore.new()http://api.rubyonrails.org/classes/ActionController/Caching.html#M000628 | Is there any way of using Memcached for fragment caching in Rails? | Fragment Caching with Memcached |
There are several problems with your code:
you store all characters into the first byte of allocated memory
you read characters into a char variable, you cannot correctly test for EOF.
you will run an infinite loop, allocating all available memory and finally crash if standard input does not contain a '\n', such as r... |
I'm learning C programming and I have to implement a program that read an input string of of unknown size.
I wrote this code:
int main() {
char *string;
char c;
int size = 1;
string = (char*)malloc(sizeof(char));
if (string == NULL) {
printf("Error.\n");
return -1;
}
print... | What is the difference between these two methods to get string input in C? |
The sample might help you. I think this is a duplicate of Nginx multiple ports
server {
listen 80;
listen 8000;
server_name example.org;
root /var/www/;
}
|
I want to listen to ports with nginx and set the proxy.
here is the conf of the server
server{
listen 8080;
location / {
proxy_pass http://127.0.0.1:82;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-live;
proxy_set_heade... | How to listen 2 ports in nginx? |
Tryhttps://sourceforge.net/projects/nbuexplorer/- it should be able to open .nbf files.It is/was a C# project, and it only provides Windows exe as release download, however, I could get this .exe to run on Ubuntu 18.04 usingmono; and I could also get the project sources to compile on Ubuntu usingxbuild(the result again... | I am using a Mac and have a Nokia phone. Therefore I cannot sync it with my computer, but I found out, that making a backup on the creates a .nbf-file, which contains all the data I want (contacts and messages).
The contacts are stored easily accessible as vCards, so that's cool. Unfortunately the messages are stored e... | Encoding of SMS-files from Nokia backup (.nbf)? |
Theydosolve the same problem.Let me start off with pro/con, then I'll move into technical differences.git-annexPros:Supports multiple remotes that you can store the binaries.Can be used without support from hosting provider (for more details seehere).Cons:Windows support in beta, and has been for a long timeUsers need ... | git-annexhas been around for quite some time, but never really gained momentum.Git LFSis rather young and is already supported by GitHub, Bitbucket and GitLab.Both tools handle binary files in git repositories. On the other hand, GitLab seems to have replacedgit-annexwithGit LFSwithin one year.What are the technical di... | How do Git LFS and git-annex differ? |
Firebase Hosting by default uses a shared certificate from Lets Encrypt. While your domain name propagates, it is normal that your browser may show the site as not secure. This should resolve itself as your domain propagates, which typically happens within a few hours.If you don't want to use a shared certificate, have... | This question already has answers here:Firebase hosting ssl certificate is showing different domain(1 answer)SSL certificate generated by Firebase Hosting does not include connected domain(2 answers)Firebase hosting using custom domain has SSL cert pointing to firebase.com(3 answers)SSL Issue : Firebase Issued differen... | SSL certificate for weird domain [duplicate] |
Possible cluster-wide policies are listed here,https://kubernetes.io/docs/concepts/policy/pod-security-policy/You can set pod-level security policies or you can limit resource-usage, both of which don't include the revisionHistoryLimit parameter. I am not aware of any other alternatives, so the answer to your question ... | I'm setting up a new server with kubernetes and because of storage limitations I need to changerevisionHistoryLimitfor all our existing and new projects to 2 or 3. I know I can change it in each deployment withspec.revisionHistoryLimitbut I need to change it globally.Thank you for answers and tips. | Is there a way/config where I could change default revisionHistoryLimit from 10 to another limit? |
Unfortunately the error message is misleading, the problem is thatResource-Level Permissions for EC2 and RDS Resourcesaren't yet available for all API actions, see this note fromAmazon Resource Names for Amazon EC2:ImportantCurrently, not all API actions support individual ARNs; we'll add support for additional API act... | I'm trying to constrain the images which a specific IAM group can describe. If I have the following policy for my group, users in the group can describe any EC2 image:{
"Effect": "Allow",
"Action": ["ec2:DescribeImages"],
"Resource": ["*"]
}I'd like to only allow the group to describe a single image, but wh... | How can I limit EC2 describe images permissions? |
0
I suggest you to use Azure IaaS VM backup to backup and restore your VMs. Azure backups can be created through the Azure portal. This method provides a browser-based user interface to create and configure Azure backups and all related resources. You can protect your dat... |
I currently use Azure snapshots to backup my Azure-hosted Windows servers. The problem is that if my Azure-hosted Windows VM fails restoring a snapshot can take hours. That is way too much downtime. Is there a solution that will let me backup an Azure VM and restore it directly to Azure that is faster and/or better... | Azure VM Backup strategy |
My first guess is that it's dying on "dot" directories. In Unix there are two directories in every directory/folder: "." and "..". You'll either need to specifically skip those in your script:next if File.directory?(x) # OR
next file x.match(/^\.+$/)-- OR --Look specifically for whatever filetypes you are wantingDir[SO... | I have a ruby program to convert video to MP4 format using ffmpeg. And I'm using the crontab to run the ruby program every 15 minutes. crontab actually runs the ruby program, but the conversion of the file is not complete. The process is stopped before completing the conversion. My sample code for testin is below.def c... | cron job is not completing the process? |
Dedicated GPU memory is basically the VRAM on-board the GPU
System GPU memory is memory that the graphics card driver is using the GART (Graphics Address Remapping Table) to store resources in system memory... AGP and PCI Express both provide regions of memory set aside for this purpose (sometimes referred to as aper... |
I am trying to hunt down a possible memory leak in my Sharpdx / DirectX application.
I am getting the following information from process explorer which I do not know how to interpret.
What is Dedicated GPU Memory?
What is System GPU Memory?
What is Comitted GPU Memory?
| Interpreting GPU information from Process Explorer |
You might try this instead:RewriteBase /
RewriteCond %{QUERY_STRING} ^target=value1$
RewriteRule ^php_file.php$ http://www.website.com/newpage/? [R=301,L]
RewriteCond %{QUERY_STRING} ^target=value2$
RewriteRule ^php_file.php$ http://www.website.com/OtherNewPage/? [R=301,L]The Key here is to use?at the end of your redi... | For .htaccess file, I am creating a 301 redirection for my new website:I want this:Fromhttp://www.website.com/php_file.php?target=value1tohttp://www.website.com/NewPage/ANDFromhttp://www.website.com/php_file.php?target=value2tohttp://www.website.com/OtherNewPage/i was tryingRedirect 301 /php_file.php?target=value1 http... | Htaccess Redirection 301 FROM "with parameter" to "without parameter" |
Looks like the iframes acting as a browser are receiving the hostname instead of the full path to the resources. Can you set up the following ReverseProxy headers and give it a go:proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add... | We are trying to update our internal server infrastructure and to proxy all accesses to our R shiny webservers through an Nginx server. Im able to get a response from the shiny server but Im not able to get related files like css/js through the Nginx server.Setup:2 docker container (1 for hosting nginx, 1 running R for... | Nginx: Proxy pass / proxy redirect to shiny web applications |
Create a .htaccess under website root with this rule:RewriteEngine On
RewriteRule ^(.*)$ subfolder1/subfolder2/subfolder3/$1 [L] | Let's say my domain is mydomain.com
My structure is root>subfolder1>subfolder2>subfolder3>index.php
How can I redirect domain so that mydomain.com points to subfolder1>subfolder2>subfolder3>index.php without changing url? I have a htaccess in subfolder3 which takes care of parsing url so it has to be unchanged..htacces... | Redirect main domain to level 3 subfolder without changing url |
As stated in thedocs for docker-compose file network_mode:Notes
This option is ignored when deploying a stack in swarm mode with a (version 3) Compose file.
network_mode: "host" cannot be mixed with links.Thenetwork_modecannot be used when deploying on docker swarm usingdocker stack deploy. This is not new with ver... | For a small project, I want an application in a docker container to connect to the localhost of the machine. An answer to this question:From inside of a Docker container, how do I connect to the localhost of the machine?tells me the preferred way is to use--net="host"in the docker run command.I use a compose file to st... | Docker Version 18.04.0-ce ignores unsupported options: network_mode |
As @Ajan comments, Java 8 doesn't have a "permgen" heap space anymore, and that option will be ignored.
But this isn't a permgen problem at all. In fact, it is most likely a sign that the main Java heap is full. This exception gets thrown if the JVM detects that the GC is taking too large a proportion of the total C... |
This question already has answers here:
Error java.lang.OutOfMemoryError: GC overhead limit exceeded
(24 answers)
Closed 8 years ago.
I am running my application using Java 8, Howe... | Java 8: OutOfMemory Error, change MaxPermSize? [duplicate] |
From the dashboard, it is not possible to trigger cross region Lambda. When you create a CloudWatch event rule, select a Target to invoke, under Lambda function only the lambdas in the current region are shown.
|
Can an AWS CloudWatch event in region us-east-1 trigger a lambda in us-west-2? Or do I have to deploy my lambda in both regions?
| Can a CloudWatch Event in one region trigger a Lambda in another region of AWS? |
There're two theoretically possible ways to solve your issue:Nginx with ngx_stream_ssl_preread moduleHAproxy (for balancing) -> proxy_protocol -> Nginx (with ssl certs) | Host A has https serviceserviceAand provides two IP for high availability。e.g. Bose [ip1:443] and [ip2:443] are routed to theserviceA.Host B (do not has ssl_certificate and ssl_certificate_key) use Nginx proxy module to proxies the requests towards the actualserviceA.
How to simply forward 443 port traffic toserviceAwi... | How to disable ssl certificate and only used to forward traffic on port 443 in Nginx? |
17
Did you do apt-get update before that?
And then
apt-get -y install python-pip
Share
Improve this answer
Follow
answered Apr 1, 2015 at 15:24
mrhmrh
45933 silver badges77 bronze badges
... |
Unable to install pip in Docker running Ubuntu version 14.04. See below log.
root@57da7dd8a590:/usr/bin# apt-get install pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip
root@57da7dd8a590:/usr/bin#
| Unable to install pip in Docker |
Your error message points to a bug in the openssl version you use. Seehttps://bugzilla.redhat.com/show_bug.cgi?id=1022468. In short: the client advertises capabilities it does not have and if the server picks such capability you get this error message. Needs to be fixed by upgrading your local openssl installation. A w... | I have the following code to use:def createCon(host,auth):
con = httplib.HTTPSConnection(host)
return con
def _readJson(con,url):
con.putrequest("GET",url)
...
r = con.getresponse()It is working on a specific server, but on another I'm getting SSLError. If I open the url from browser, I need to acce... | Python httplib disble certificate validation |
You can create a new service and leverage theinterpreterSettingNamelabel of the spark master pod. When zeppelin creates a master spark pod it adds this label and its value isspark. I am not sure if it will work for more than one pods in a per user per interpreter setting. Below is the code for service, do let me know h... | First of all I'm pretty new on all this (kubernetes, ingress, spark/zeppelin ...) so my apologies if this is obvious. I tried searching here, documentations etc but couldn't find anything.I am trying to make the spark interpreter ui accessible from my zeppelin notebook running on kubernetes.
Following what I understood... | Expose spark-ui with zeppelin on kubernetes |
The answer I was waiting for.I decided to give Ruby a try and it is okay. I like how it is compact, but it isn't pretty looking :(.This works:#!/usr/bin/env ruby
require "yaml"
require "open-uri"
time = Time.new
backupDirectory = "/storage/backups/github.com/#{time.year}.#{time.month}.#{time.day}"
username = "walterj... | I'd like to periodically create a backup of my github repositories. Is there a quick way to pull all of them without knowing what the entire list is?Walter | Backup / Mirror Github repositories |
I'd say thereisa benefit of using an additional counter: naming. Say you have a histogram namedhttp_request_duration_seconds, the associated counter is namedhttp_request_duration_seconds_count, whereashttp_requests_totalwould be a much better name. | For example imagine that we need to measure two metrics: requests number (counter) and request duration (histogram). Histogram already has inner counter, so when I what to query requests rate I can use histogram metric instead of counter.Are there some benefits for using separate counter metric? | prometheus: are there some benefits to use counter if I also use histogram for the same kind of metric? |
Sorry, it's just not a feature.You could implement some sort of semaphore thing by using incrond to monitor the local filesystem, then do something (touch a file, trigger a script, etc.) on the remote machine to tell it there's been an update, but there's no native functionality in NFS. | Can I trigger a filesystem event on Linux, without an actual file change?
Is there some system call that acts like the file was written?
Is that even possible?I have a NFS share mounted and want to getinotifyevents in the virtual machine, when a file changes on the server site.It seemsinotifydoesn't work with NFS.
Is t... | trigger inotify event over NFS on Linux? |
On Windows, you have to create a new thread in order to increase stack size:import sys
import treading
def my_function(*args):
# write you function here
pass
if __name__ == "main":
sys.setrecursionlimit(5000)
threading.stack_size(2 ** 22)
thread = threading.Thread(target=my_function,
... | I want to set higher stack size in a python script as i am working with a larger dataset. I found thislinkuseful but it only corresponds to the Linux. Could someone provide package with proper instructions on how to implement that.So, for clarity this is the code that gets the job done in Linux&BSD:import resource
reso... | Setting stacksize in python script(Windows) |
Download the Library from Github.
Unzip.
In Android Studio go to File > New > Import Module and set the directory to "Library" folder inside "segcontrol-master".
|
I want to add this repository to my Android Studio project and I tried multiple dependencies but it just doesn't work. Any help, guys ?
My build.gradle (app) file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.... | Add library to Android Studio project |
From Actions, Resources, and Condition Keys for Amazon S3 - AWS Identity and Access Management:
ListBucketVersions: Use the versions subresource to list metadata about all of the versions of objects in a bucket.
I tested this as follows:
Created an IAM User
Assigned the policy below
Ran the command: aws s3api list-... |
I currently have a lambda that uses the node sdk call listObjectVersions to list all the versions of a specific file. However, I can't figure out what permission in my policy will grant the lambda permission to make this call. I've searched the AWS documentation and I can not find any information.
Here are the current... | What permission is needed to use S3 listObjectVersions in AWS? |
sizeof(Rz3DContourNode) == 6*4 = 24 bytes ... not 12!
The stride is the # of bytes between the start of each vertex, not the padding. Although 0 is a special value that indicates tightly packed data.
So, if you're using 3 floats as vertex data, there's no difference between a stride of 0 and 12 (because 3 floats are ... |
I have following struct to store my vertex data.
struct Rz3DContourNode {
float x; //pos x
float y; //pos y
float z; //pos z
float nx; //normal x
float ny; //normal y
float nz; //normal z
};
I store list of vertices in STL vector as follows :
std::vector < Rz3DContourNode > nodes;
When I try to us... | C++ struct memory layout and OpenGL glVertexPointer? |
It was actually just a matter of doing a:
php composer.phar self-update
|
I'm trying to include a repository I created on github, using Composer.
In my composer.json i have:
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/unknownfrequency/zendservice_discogs"
}
],
"require": {
"unknownfrequency/zendservice_discogs": "dev-master",
}
When i... | Can't user Composer to install own git repository |
If it shows younon-fast-forward updates were rejected, that means your local and remote repository are out of sync because you or someone else made changes to the upstream repo and this could be a possible cause of your problem.Try tofetchand thenrebaseor just usepull --rebasecommand.Source:https://help.github.com/arti... | I have a rudimentary understanding of Github: I know how to create, add, commit, push and clone repositories. I've also started exploring Github pages to host my projects. My latest project I started in March and pushed it to a gh-page. I have since then refractored and improved the code and made quite a few changes. O... | Github pages showing old code |
no, not through a direct link.
"Loading" a folder from a git repo only means sparse checkout (partial clone).
Any other solution would indeed mean building an artifact and upload it.
Update August 2016 (2 years later): you can have a look at this answer and the DownGit project, by Minhas Kamal.
|
I have a repository that has several folders of code. I'd like to be able to provide a link to the code in a single folder so another user could download just the relevant bits of code without being bloated by the rest of the codebase and without requiring that they have git installed on their machine.
Of course, th... | Generate download link for a single folder in GitHub |
When you create a service of type "load balancer", a new load balancer is created by your cloud provider (here aws). Load Balancer naming is of the responsibility of the cloud provider. I don't think you can tell amazon how to generate the load balancer name. And it may depends of the load balancer type - alb, internal... | Say I have the following YAML representing a service:apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:91371:certificate/0a389f-4086-4db6-9106-b587c90a3
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
servic... | Give EKS service a name (instead of being auto-generated) |
3
The code in a PR is run "as is". If there was an "environmental" issue that was fixed, rerunning the jobs would indeed solve it.
In this case, another PR was merged in order to fix the problem. You should rebase your PR on top of the fix (probably on top of the main or ma... |
We have some pull requests people have made, which fail an automated analyze test/check (the failure was not related to any change the PR did, but I think a change in the analyze or formatting checks).
Another person has since fixed the issue with a new PR which has been merged which was causing the other PRs to fail ... | GitHub PR still fails test after another merged PR fixed the failing problem |
Open theAmazon EC2 consoleathttps://console.aws.amazon.com/ec2/.On the navigation pane, underLOAD BALANCING, chooseLoad Balancers.Select yourload balancer.On theListeners tab, forSSL Certificate, chooseChange.On theSelect Certificatepage, do one of the following:If you created or imported a certificate using AWS Certif... | Godaddy SSL certificate is already installed on my server. But now I want to change it to namecheap but I don't know where to put my new certificate files as last time it was installed by another developer. can somebody please help? | How can I renew my SSL certificate on aws normal ec2 instance |
The main difference between the two is, PutItem will Replace an entire item while UpdateItem will Update it.
Eg.
I have an item like:
userId = 1
Name= ABC
Gender= Male
If I use PutItem item with
UserId = 1
Country = India
This will replace Name and Gender and now new Item is UserId and Country.
While if you want to ... |
Based on DynamoDb documentation why would anyone use updateItem instead of putItem?
PutItem - Writes a single item to a table. If an item with the same primary key exists in the table, the operation replaces the item. For calculating provisioned throughput consumption, the item size that matters is the larger of th... | Difference between DynamoDb PutItem vs UpdateItem? |
Although the@amzn-main repodoesn't have PHP 7.2 yet (as far as I know), you can use remi-php72. According to hisrelease blogyou can install the EPEL and Remi repositories via:wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh ... | I haven't seen anyyumpackages forphp7.2 on AWS EC2 and the release has been out over a month.I have triedyum list | grep php7and only able seephp70andphp71packages.Has anyone installedphp72on AWS EC2?Is there anotheryumrepo to connect to?Does AWS have a delivery scheduled? | need help to install php 7.2 yum packages on aws ec2 |
Option 1 add www-data group to my-user:sudo adduser www-data my-userOption 2 change user of php-fpm into my-user (ref):find options user and group in www.conf, and change it into[my-user] group=mygroup | I have followed this upvotedanswerand did the following:sudo chown -R my-user:www-data /var/www/domain.com/
sudo find /var/www/domain.com/ -type f -exec chmod 664 {} \;
sudo find /var/www/domain.com/ -type d -exec chmod 775 {} \;
sudo chgrp -R www-data /var/www/domain.com/storage /var/www/domain.com/bootstrap/cache
sud... | How to setup laravel file permission once and for all |
Solution
Make a .gitattributes file in your working directory and add the following line to it:
*.docx binary
Why not just set core.autocrlf=false ?
This is useful too. But configuring .docx as a binary format solves not only this problem, but also potential merge issues.
What is the origin of this problem?
From ... |
I put several .docx, .txt and .pdf file into a .git repository. I can open, edit, save the local .docx file; however, when I push it to github, and download it back to my computer, Word complains that it cannot open it.
In order to store .docx file on github, is there some essential steps I should do to the git setti... | What should I do if I put MS Office (e.g. .docx) or OpenOffice( e.g. .odt) document into a git repository? |
Set the privilege to Read only for the Backup folder (~/Library/Application Support/MobileSync/Backup). | In OSX before Catalina we could use:
defaults write com.apple.iTunes DeviceBackupsDisabled -bool true
to disable iPhone backups
Does anyone know how to disable in Catalina? | Disable iPhone backup in Catalina |
-1There have two variants.First one is:php_value date.timezone 'Region/Zone'The second one is:SetEnv TZ America/WashingtonAnd you can use the time for redirect something like this:RewriteRule ^$ /news/%{TIME_YEAR}%{TIME_MON}%{TIME_DAY}-%{TIME_HOUR}.mp3 [R=301,L]I did not test it and am not sure it works. | I want to redirect to an external dynamic url, one which contains today’s month, date, day, hour. E.g.http://url.com/20170706-2200-048.mp3I read that using the .htaccess file and mod_rewrite I could use something likehttp://url.com/news/%{TIME_YEAR}%{TIME_MON}%{TIME_DAY}-%{TIME_HOUR}-048.mp3.How would I set this up in ... | URL redirect based on date and time |
From Python3.10, OpenSSL 1.1.1 or newer is required.(Ref:PEP 644,Python3.10 release)I have tried changing some of your code like below and worked.delete:openssl-develadd:openssl11openssl11-devel.ShareFollowansweredOct 24, 2021 at 8:34shimoshimo2,23744 gold badges1717 silver badges2323 bronze badges0Add a comment| | I'm trying to compile and install Python 3.10 into a Amazon Linux 2 but I'm not being able to get it with https support. Here the commands that I'm using to compile it:sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel
wget https://www.python.org/... | Compiling python 3.10 at Amazon Linux 2 |
The main issue with your code is that looping through all files in the directory with ls * without some sort of filter is a dangerous thing to do.
Instead, I've used for i in $(seq 9 -1 1) to loop through files from *_9 to *_1 to move them. This ensures we only move backup files, and nothing else that may have acciden... |
I was able to script the backup process, but I want to make an another script for my storage server for a basic file rotation.
What I want to make:
I want to store my files in my /home/user/backup folder. Only want to store the 10 most fresh backup files and name them like this:
site_foo_date_1.tar site_foo_date_2.tar... | shell backup script renaming |
To see how to make this work, have a look at a working example, such as:
https://github.com/sonatype/sonatype-aether
However, this won't help if you like to release the individual pieces. In that case, you have to just copy the <scm> elements into all the poms.
This is an active topic of discussion on the maven dev li... |
I'm trying to release a multi-module maven project that uses git as the SCM, and among the first problems I've encountered is the way in which the maven release plugin builds the release.properties scm.url. My parent POM looks something like this:
<packaging>pom</packaging>
<groupId>org.project</groupId>
<artifactId>p... | Releasing a multi-module maven project with Git |
2
No. Celery offers no way to run anything on GPU. However, nothing prevents you to use Keras, TensorFlow, or PyTorch in your Celery tasks (as a matter of fact I see many questions here about these projects and Celery).
Share
Improve this answer
... |
The question is - It is possible to run celery on gpu?
Currently in my project I have settings like below:
celery -A projectname worker -l error --concurrency=8 --autoscale=16,8
--max-tasks-per-child=1 --prefetch-multiplier=1 --without-gossip --without-mingle --without-heartbeat
This is django project.
One single ta... | It is possible to run celery on gpu? |
1
As mentioned in this stackoverflow answer by ttfreeman
Have you tried Kaniko? It can save the cache in gcr.io and and if
you have built your Dockerfile with right steps (see
https://cloud.google.com/blog/products/gcp/7-best-practices-for-building-containers),
it should... |
I want to cache the previously stored google cloud image while creating a new build for the project.
I have followed the official documentation : https://cloud.google.com/build/docs/optimize-builds/speeding-up-builds but while building it doesn't seems to be caching the data.
The yaml file I am using is:
steps:
- ... | How can I use cache to optimise google cloud build? |
The solution is to not use legacy unsupported versions of nginx. Starting from version 1.3.15 (pretty old one), nginx does not log the 400 errors in such cases.See changelog for information:http://nginx.org/en/CHANGES*) Change: opening and closing a connection without sending any data in
it is no longer logged to ac... | Amazon Elastic Load Balancer (ELB) performs periodic health checks:In addition to the health check you configure for your load balancer,
a second health check is performed by the service to protect against
potential side-effects caused by instances being terminated without
being deregistered. To perform this chec... | Configure nginx to not log ELB secondary healthcheck |
yes, it may cause some conflict in your web server, for example, you have to X-Frame-Options in your response header, I suggest you to not do that. handle you're in just one level, do whatever you can with the Django and do the rest with your web server (as I know for example Feature-Policy cant be handle in Django cl... |
Now which is better for adding security headers configuration
at the application level or the nginx level like
add_header X-Frame-Options "SAMEORIGIN";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protecti... | Which is best practice to add security headers for django application? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.