Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
This error happens because cURL cannot find a cacert.pem file from which take the trusted signatures.
There are some ways to set this file in cURL:• Pass the cacert.pem file path directly to cURL when making the call;• Set the path to the cacert.pem file in the php.ini.You could follow below post:•https://serverfau... | I am posting this question on SO instead of ServerFault, because all my previous efforts to get Magento 2 issues sorted out, ended up being hacking some or other code in the Magento or template source.I have configured a basic install of Magento 2 with a theme for a client.Magento is running on IIS and Windows. (Not WA... | SSL error on Magento 2 Sign In for marketplace |
The solution is to provide--hostname-overrideoption to the kubelet configuration (in my case, /etc/systemd/system/kubelet.service.d/10-kubeadm.conf). Let you allow to change the kubernetes nodename without regenerating the certificates.For more info, seehttps://prefetch.net/blog/2017/12/30/getting-your-kubernetes-node-... | Version: kubeadm and kubectl 1.12I get this error when I change the hostname of one of the Kubernetes slaves.The error I get from the metric service:dial tcp: lookup ops-kube-slave-dev-1 on 10.96.0.10:53: no such hostThis IP is not the public or private IP and is completely random.I add this to the file /etc/hosts:10.0... | Kubernetes: no such host for modify hostname slave |
You could use CSV option in COPY command. Don't use REMOVEQUOTES or ESCAPE with it. CSV handles everything so in my opinion it's the best solution.http://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-format.html#copy-csv | Im trying to load a CSV file while loading I got the errorDelimited value missing end quoteCSV file Error lineREDSHIFT ERROR:line_number | 13
colname | Comment
col_length | 250
raw_line |"123"|"123"|"xyz"|"2009-06-25 21:00:14.660000000"|"0"|""|""|""|""|""|"HI,
raw_field_value | HI,
err_code ... | RedShift - CSV load with line Break |
I would rather put the before script commands in aseparate stage, and keep the rules in the first stage.That way, the first stage triggers only if the rules match.It can run the commands of the formerly "before_script".And the next stages can go on with your script.ShareFollowansweredJun 1, 2022 at 7:10VonCVonC1.3m5395... | in gitlab-ci I havebefore_script:
- apt update && apt upgrade -y
- apt install -yand in my job on stages I added a rulemerge_request:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "master"
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMI... | In Gitlab-ci is there a way to run before scripts only after rule is match |
I combed through the logs and realized the Docker Pipeline Plugin is automatically telling the container to run with the same user that is logged in on the host by passing a UID as a command line argument:$ docker run -t -d -u 1005:1005 [...]I decided to check what users existed in the host and the container by running... | I'm trying to execute an SSH command from inside a Docker container in a Jenkins pipeline. I'm using theCloudBees Docker Pipeline Pluginto spin up the container and execute commands, and theSSH Agent Pluginto manage my SSH keys. Here's a basic version of my Jenkinsfile:node {
step([$class: 'WsCleanup'])
docker.imag... | Docker Plugin for Jenkins Pipeline - No user exists for uid 1005 |
The11.10value you're specifying for theEngineVersionproperty is processed as a number by the YAML engine since you're not using quotes, so the trailing zeros are removed and the resulting value is11.1. You need to specify the value in quotes, like this:"11.10" | We use serverless-framework and Postgresql.Type: AWS::RDS::DBInstance
Properties:
EngineVersion: 11.8It was 11.8 before, we successfully upgraded it from 11.8 to 11.9 by changing the version inserverless.ymlinEngineVersion.
But now we need to upgrade it to 11.10 and we have the following issue:The error message:Canno... | Serverless-framework postgresql version upgrading problem |
Just useavg_over_time(up[2d]) == 0query. It returns scrape targets, which were completely unreachable during the last 2 days. | I have a few servers and I installed node exporter in all instances. But few servers are down from some time. I want to write a Prometheus query to find the instances that are down from the last X days. It shouldn't be in a reachable state in the last X days.I tried min_over_time(up[2d])== 0.But it didn't work for me. ... | How to find the server downtime using prometheus node exporter |
2
HEAD points to the latest commit you made its like a pointer. Type git log and you shall find all your commits. So each time you use
git reset --hard HEAD
Your changes are pushed one commit back. Beware that using --hard means the commit changes that you are trying to rev... |
I have forked a repository on github, then cloned it (cloned the master repo) created a new branch worked on some files and then added and committed the changes. I pushed the changes to my forked repo via
git push "my-remote" "my-branch"
Now, I realize I made unnecessary changes and would like to only commit one chan... | pushing back a commit to Github |
Yes, in an ARC environment you never call release. So assigning nil to the variable will release the object.
In a non ARC environment, you would do a release on your own, so the object gets destroyed. But the variable would still point to the old object adress. But there is no object anymore, so you would probably get... |
I have similar question to this: What is the difference between setting object = nil and [object release] VS [object release] and object = nil?
NSMutableArray *myExampleArray = [[NSMutableArray alloc] init];
myExampleArray = nil;
I use iOS 5.0 automatic reference counting, so in fact I don't release any objects. So i... | Assigning nil to a variable of an initialized object is releasing it? |
I recently passed from Pyro to Warrior on an iMX6 CPU, and I had some trouble with the GPU. The driver was not compiled at all, and the Gstreamer GPU plugins were not working. It finally worked with the following configuration:I added to my local.conf (or machine.conf) the line:MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " ker... | I am working on Phytec based custom board, While porting Phytec BSP from krogoth to thud, I am unable to use gpu based rendering.Krogoth:Display -> imx-drmlibegl provider -> imx-gpu-vivThud:Display -> imx-drmlibegl provider -> mesaI am using one GUI application which requires egl library. It is throwing below errorINFO... | A: Use vivante GPU on IMX6 with 4.14 kernel |
1
While my suggestion would be to have different nginx location paths with different gzip configuration, here's a better alternative solution to achieve what you want to happen.
Better Solution:
It is often referred to as bad practice to keep a connection open (and the br... |
I'm converting php code to hhvm. One page in particular sometimes needs to flush() a status-message to the browser before sending some emails and a few other slow tasks and then updating the status message.
Before hhvm (using php-fpm and nginx) I used:
header('Content-Encoding: none;');
echo "About to send emails..."... | How can I disable gzip inside php code on HHVM? (eg setting content-encoding header) |
This error is caused by out of date root certificates on your server or local machine. In order to fix this problem, follow the instructions from one of the related issues:PHP SSL certificate problemRuby certificate verify failed | I'm on a Windows system and when I try connecting to Ably, I'm getting the following errors(s):cURL error: SSL certificate problem: self signed certificate in certificate chain
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failedWhat am I doing wrong? | SSL certificate issues when communicating with Ably |
$ git pull --all
Will pull all remote branches, if you already have local branches which need updating you might consider using
$ git fetch --all
|
I am getting ready to do some work remote from my job but I have a git question. If I go into my project and I do a
git pull
does this take down all the branches from the server or just the current one?? I think just the current one.. I need all my branches updated..
| Getting Ready to work remote... Git Branches |
There is at least one way: you can setup an s3 event notifications, for each bucket you want to monitor, all pointing to a single SQS queue.
That SQS queue can then be the event source for your lambda function.
|
I'm trying to create a Lambda function that will be triggered by any change made to any bucket in the S3 console. Is there a way to tie all create events from every bucket in S3 to my Lambda function?
It appears that in the creation of a Lambda function, you can only select one S3 bucket. Is there a way to do this pro... | Is there a way for a Lambda function to be triggered by multiple S3 buckets? |
No, there is no way to do what you want.
The problem is that Linux forbids hard links across different file systems. In your case, /home/conf/application belongs to the container's root file system, which is mounted at / (it may be an overlay mount, or aufs, or something else), while the volume (/var/www/html/ and eve... |
I am in the process of refactoring and "dockerizing" a legacy application made of shell scripts, C++ binaries, and various open-sources packages (among which httpd)
Is there a way to create, in a docker container, hard links to files located in a docker volume ?
I am planning on architecting containers as follows:
se... | How to create hard link to file in a docker volume |
There are a couple ways to do this. One way would would be to put each of your user stories on separate branches, and your production code on another branch. When a feature is completed and accepted, merge the user story branch into the production branch.The other way to do it would be to cherry pick your commits fro... | I'm having this thinking over year now, and would like to ask if there's anyone who has any advice or experience on how the continue deployment workflow in GIT.My Server Structure.I got a Test Server and Production Server.Test Server is a mirror of Production Server, which has the latest version of my project.
There ar... | Need advice on GIT continue deployment from Test to Production server |
1
Secondary Namenode(SNN) was the first of numerous attempts to reduce NN load and to a certain extent provide H.A.
Since then there have been upgrades to SNN like Check Point Node, BackUp Node.
SNN: copies and merges the FSImage and edits.log periodically for faster NN st... |
Everyone has known that Name Node can store metadata and every fraction of a second what happen everything stored in Log files. To identify the bugs log files only key factors. Now come to the point by default secondary Namenode can take a backup of metadata from Namenode periodically. Name space image, edit log file... | Why Hadoop secondary Namenode take backup for every one hour? |
For your first question:
Try to require it as a VCS repository (Version Control System, see composer doc on vcs repositories), like the following:
{
"name": "...",
"description": "...",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/lube8uy/phinx"
}
... |
I have recently forked robmorgan/phinx project and modified the composer.json file in my project to use the forked version:
{
"name": "...",
"description": "...",
"repositories": [
{
"type": "package",
"package": {
"name": "lube8uy/phinx",
"version":... | Load vendor dependencies with composer.json |
You incorrectly configured TFS (in fact it created a default collection). If you readMove Team Foundation Server from one hardware configuration to anothercarefully, you have to run the Application Tier-only Configuration Wizardafterrestoring the databases. | I am using TFS 2012. I wanted to test how I can recover from server failure or any hardware failure, so I shifted TFS to a new server.I followedan articleto restore it. What I did is:I had full backup of TFS_configuration and all other collection databases.(backup taken using TFSbackup.exe)On the new server, I installe... | TF30046 Error after restoring TFS database to new server |
Those config options will be globally set once you have run them. However, I never had to set them as GitHub Desktop automatically did that for me. Go through the settings in GitHub and make sure you have defined your details correctly.If you need to run them manually, GIT.EXE will be found in the GitHub program files ... | I was trying to commit to Github desktop(windows 8.1)(my first time I only did it on Linux before), and I got this errorCommit failed - exit code 128 received, and this sectiongit config --global user.email "[email protected]"
git config --global user.name "Your Name"which apparently I should run in the prompt.The th... | Commit failed - exit code 128 received |
5
When you ask a question like that, EXPLAIN syntax is helpful. Just add this keyword at the beginning of your query and you will see a query plan. In cases 1 and 2 the plans will be absolutely identical. These are variations of SQL syntax but the internal interpreter of ... |
3 options, on a table of events that are inserted by a timestamp.
Which query is faster/better?
Select a,b,c,d,e.. from tab1 order by timestamp desc limit 100
Select top 100 a,b,c,d,e.. from tab1 order by timestamp desc
Select top 100 a,b,c,d,e.. from tab1 order by timestamp desc limit 100
| Which query is faster : top X or limit X when using order by in Amazon Redshift |
6
I figured this out in the end:
for rule in vpc_security_group.rules:
for grant in rule.grants:
ec2_connection.revoke_security_group(group_id=vpc_security_group.id, ip_protocol=rule.ip_protocol, from_port=rule.from_port, to_port=rule.to_port, src_security_gro... |
I'm currently automating the build of an AWS VPC but wish to remove the default rules added to the security group created with the VPC. I can view security group rules like so:
for security_group in vpc_connection.get_all_security_groups():
for rule in vpc_security_group.rules:
print dir(rule)
I'd be gra... | Python Boto AWS Remove VPC Security Group Rules |
Make sure that server1 is not returning compressed content. if its being returned gzipped, nginx won't uncompress it to apply the ssi rules to it.you can ensure the reponse is returned in plain text by clearing the Accept-Encoding header:location /hello-world.html {
ssi on;
proxy_set_header Accept-Encoding ""; ... | I'm trying out nginx. I would like to use it to perform the following:Retrieve a page from a server1 which includes some SSI commandsProcess the SSI commands, eventually including content from server2Return the resultant pageI've got SSI working when using a local file, but not when using the page from a server1 using ... | With nginx, how do I run SSI on a page returned from another server? |
0
As you can read at http://developer.android.com/guide/topics/data/backup.html you can save any type of data, including files.
Also take a look at http://developer.android.com/reference/android/app/backup/FileBackupHelper.html
Share
Fol... |
is it possible to use
Android's Backup Manager
to backup a minimal file
(A text file with 20 words?)
I can't quite understand if this is possible and how to do it. ..
| Android's Backup Manager to backup a minimal file |
I was able to do with this package:amazon_cognito_identity_dart_2//Create a cognito user
CognitoUser cognitoUser1;
//Send OTP
cognitoUser1 = CognitoUser(phoneNumber.text, widget.userPool);
try {
CognitoUserSession cognitoUserSession =
await cognitoUser1.initiateAuth(
AuthenticationDetails(
... | I am unable to know how to dopasswordless signinwith OTPusing cognito in flutter.
I just need assistance with the flutter code for sending the OTP and answering the auth challenger with any working cognito/amplify package. | How to do a password less signin in flutter with AWS |
The payload value is hardcoded into the docker image (in the nats-server.conf file), so you cannot change it via a configmap. The only solution I found is to build my own nats image with a modifiednats-server.conffile.Here is how to do it.First, select an image flavor fromthe official repoand download the content (for ... | my problem is that I need to increase NATS max_payload in production environment but it uses Kubernetes and I have no idea how to do that, I tried to use ConfigMap but I had not success.In local/dev environment it uses a NATS config file with docker so it works fine.Way to make it works local:NATS with moleculer. How c... | Configure NATS max_payload on Kubernetes |
Is it possible to write a fragment shader that puts results into more
than one pixel on the output?No. Shaders are designed to work individually. That is why they are so fast.You should refactor your algorithm to be "shader friendly". Try to extract the inputs so they could feed the algorithm calculating a single val... | I have a few equations that I have running in a CPU-based program to process images for iOS. The output is in the form:for (y = 0; y < rows; ++y){
for (x = 0; x < cols; ++x){
<do math>
outputImage[y*cols + x] += <some result>
outputImage[y*cols + (x+1)] += <some result>
outputImage[(y+1)*cols + x] +=... | opengl: can I write to multiple locations in the output buffer when using a shader? |
You've to reset your commit in order to add only the files you wanted to push,
git reset --soft HEAD^
you've then to unstage the files you added accidentally,
git rm --cached list_of_files_you_added_accidentally
and commit again,
git commit -m "your commit message"
Or, unstage all the files and add only what you w... |
I was trying to pull data from repository with git pull command.this command gave me an error
error: Your local changes to the following files would be overwritten by merge:
public_html/sites/file
public_html/sites/file1.txt
public_html/sites/file2.txt
Please, commit your changes or stash the... | git:use git commit or git stash? |
1
This should help.
VM is not in a state that allows backups.
Check if VM is in a transient state between Running and Shut down. If it is, wait for the VM state to be one of them and trigger backup again.
If the VM is a Linux VM and uses [Security Enhanced Linux] kernel m... |
Azure Backup is failing with "VM is not in a state that allows backups." for multiple VMs (almost 100)
Can anyone give a clue about the error and fix for that?
| Azure Backup is failing with "VM is not in a state that allows backups." for Multiple Vms |
I have found a solution here:https://www.quora.com/Git-revision-control/How-do-I-retrieve-added-files-but-not-committed-from-a-reset?share=1Basically you can retrieve the files from blobs but you have to do this one by one. I am writing a program to do so automatically now.Is there any other easier way though?If so, I ... | Yesterday, I decided I wanted to upload all of my old crappy work. It is back when I was just starting programming and just wanted to show people it. I have never used git (very bad decision in my part) and created a repository. I downloaded the windows client and the egit eclipse plugin. I used the egit plugin but it ... | Why did the GitHub windows client delete all of my work? |
Put your .json files into a new folderkube-prometheus-stack/dashboards-1.14, not into the existing onekube-prometheus-stack/templates/grafana/dashboards-1.14 | I am playing around with the kube-prometheus-stack and stumbled upon an issue which I am not sure how to approach to fix.looking at the comfigmap-dashboards.yaml (https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/templates/grafana/configmap-dashboards.yaml)
It seems that if I pu... | unable to import a grafana dashboard from json file using the kube-prometheus-stack helm chart |
Old question, not sure if you have found answer yet. But here's my take:Micrometer is lets your code be agnostic to the monitoring hosting solution you use. You could code your metrics in a single solution that could publish it to Prometheus or Azure monitor or Influx or etc. In your case you are using Prometheus as y... | I am using prometheus to monitor some out of the box and some custom application metrics.
For custom metrics, i am not using the Prometheus client library, i am using theio.micrometerpackages for custom Counters and Gauges.The custom metrics i create are still visible in the prometheus endpoint(http://localhost:9090/ac... | Prometheus metrics vs micrometer metrics (Spring 2) |
The best approach would be to use apost sync hook.Why is it necessary to run the tests in a GitHub actions workflow? Since the application is already deployed to the cluster, wouldn't it make more sense to run the tests directly on the cluster, instead of going through the trouble of communicating with Github? | I'm working in a company that uses Github Actions and Argocd.(using argocd helm chart).
Needless to say that the Github repo is private and argocd is in an internal network that used by the company only.The flow of what we want to do is that when we deploy the app and the deployment succeeded - Trigger another workflow... | Github Action - How can I trigger a workflow when argocd deployment is finished? |
First of all, you can get the tag without using an action, with${GITHUB_REF##*/}.Sample test workflow:name: Experiment
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Debug
run: echo "Works. Tag is ${GITHUB_REF##*/}"As for the chained workflows you mention - I am not sure it is pos... | I'm using Github actions with two workflows: CI and CD. The CI workflow is triggered for new tags likev1.1.1and pull requests to develop and hotfix branches.name: CI
on:
push:
tags: v[1-9]+.[0-9]+.[0-9]+
pull_request:
branches: [develop, hotfix*]The CD workflow is triggered when the previous workflow ... | How to read tag name using workflow_run |
Just reading the first rows of the page you linked, it states that no controller are started automatically with a cluster and that you must choose the one of your preference, depending on your requirementsIngress controllers are not started automatically with a cluster. Use
this page to choose the ingress controller im... | I understand there are various ways to get external traffic into the cluster - Ingress, cluster IP, node port and load balancer. I am particularly looking into the Ingress and k8s and from the documentation k8ssupportsAKS, EKS & Nginx controllers.https://kubernetes.io/docs/concepts/services-networking/ingress-controlle... | Kubernetes - Is Nginx Ingress, Proxy part of k8s core? |
There is an official docker image already available on docker hub cloud custodian:https://hub.docker.com/r/cloudcustodian/c7nif you want to use tools with custodian there is also separate docker images available on docker hub Ex. Mailer:https://hub.docker.com/r/cloudcustodian/mailerhowever, if you want to run both in t... | All,I am trying to implement cloud custodian solution on AWS ECS scheduled task on Fargate.MyDockerfilelooks like:FROM cloudcustodian/c7n:latest
WORKDIR /opt/src
COPY policy.yml policy.yml
COPY mailer.yml mailer.yml
ENTRYPOINT [ "/bin/sh" ]wherepolicy.ymllooks likepolicies:
- name: c7n-mailer-test
resource: sq... | How to set up cloud custodian on Docker |
It will limit to 20% of one core, i.e. 200m. Also,limitmeans a pod can touch a maximum of that much CPU and no more. So pod CPU utilization will not always touch the limit.Total CPU limit of a cluster is the total amount of cores used by all nodes present in cluster.If you have a 2 node cluster and the first node has 2... | Kubernetes allows to limit pod resource usage.requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m # which is 20% of 1 core
memory: 256MiLet's say my kubernetes node has 2 core. And I run this pod with limit of CPU: 200m on this node. In this case, will my pod use it's underlying node's1Core's 200mor2Core's 10... | How many cores do kubernetes pods use when it's CPU usage is limited by policy? |
As other commenters said, to get a better answer, provide a stack trace and other information.One other typical scenario for a OutOfMemory error is when you try to allocate more memory than available in one go, like when allocating a giant large array. The exception message would simply be 'java.lang.OutOfMemoryError: ... | Is there a possibility to get "Out of Memory" errors in Apache Tomcat when Xmx value is too high also?Why did I ask that?We have set the Java Heap (Xmx) to 8GB.
set CATALINA_OPTS= -Xmx8192m
Metaspace is not specified (So that it takes based on the need and there is no chance of the error because of Metaspace).Still... | Tomcat OOM Error even when heap-used is well under the limit |
You have the option to clear cache manually via Cloudflare dashboard.
Just navigate to your website inside the Cloudflare Dashboard >> Caching >> Configuration >> Purge Everything. Please note that changes take effects only after few seconds. | Let's start with my environment :Wordpress (Elementor - Optimized by Siteground extension only)Hosted on SitegroundCDN Cloudflare (free edition — Cache ttl set to 4h)My test routine :On my computer, I change the top bar color on my client website (https://www.sandorina.fr— if you want to see cache configuration)On my p... | How to properly remove cache for my customers |
If you do not "own" the remote you should just use the read-only linkgit remote add upstream git://github.com/antirez/redis | i can't seem to fetch changes from upstream with ssh key authentication.I can add the repo just fine:$ git remote add upstream[email protected]:user/repo.gitContents of my ssh folder seem ok:$ ls ~/.ssh
authorized_keys id_rsa id_rsa.pub known_hostsLogging in works perfectly:$ ssh -T[email protected]Hi user/repo! You... | Permission denied (publickey) on github when fetching from upstream |
There is a way to set the rule type using some special tags.Tag "bug" means type "bug"Tag "security" means type "vulnerability"So try for example:tags = {"suspicious", "bug"}NB: This is documented inAPI Javadoc(but hard to find I admit) | I am using sonarQube 6.3 and when adding new custom rules for Php or Javascript, they are by default declared as Code smell. I would like to declare them as Vulnerability or bug.Here is an example of a rule declaration@Rule(key = "Rule1",
priority = Priority.MAJOR,
name = "Rule 1 sould be used.",
tags = {"suspicious" }... | Declare custom rule type as Vulnerability in SonarQube 6.3 |
No, only the specific container.For the whole pod to be recreated there needs to be a change in the Pod'sownerObject(tipically aReplicaset) or a scheduling decision bykube-scheduler. | Trying to plan out a deployment for an application and am wondering if it makes sense to have multiple pods in a container vs putting them in separate pods. I expect one of the containers to potentially be operating near its allocated memory limit. My understanding is that this presents the risk of this container getti... | If you have a pod with multiple containers and one triggers OOMKilller, does it restart the entire pod? |
try this code, if not work please can you contact with me provide me your emailimport os
import requests
from atlassian import Jira
#certificates for request
CERT = '/path/to/cert'
KEY = '/path/to/key'
session = requests.Session()
session.cert = (CERT, KEY)
session.timeout = 5
jira = Jira(
url="url",
session=... | My company uses its own multi-factor authentication to login to our jira server. Everything I have searched for only suggests how to connect to the server using username/password or an api-token. But I need to use our generated certificates to try and connect.This is what I have so far:import os
import requests
from at... | Access company jira server with python-jira using certificates |
Go to your EC2 console, Actions, and then Security. Check your IAM role to make sure you have given permission to SSM to connect to your instance.Also, SSM uses temporary SSH keys behind the scenes. I think they're generated "on demand" but you might try uninstalling and reinstalling the SSM agent if the above doesn'... | I am trying to access my AWS EC2 console via session manager which was working perfectly fine before, I was testing out some Ubuntu sources list and removed openssh-client(apt-get remove)accidentally and then re-installed it again(apt-get install).Now I am trying to access the EC2 command line via session manager but i... | AWS EC2 session manager access |
+50The most cost-efficient way I see to do it is by using the resources you have already. The basic idea is to point your Route53 record to one of the EC2 instances and use "something" (I'll explain this later) to redirect the requests from this EC2 to the other. It can be either from the Windows one to the Linux one o... | There are 2 EC2 instances running:Windows Server 2012 - ASP.NET applicationLinux - Wordpress BlogThe ASP application is ondomain.com/How can you point Wordpress todomain.com/blog/instead ofblog.domain.com?You can use any AWS feature. | Pointing EC2 instance to a directory on a domain |
Try lftp or wget and use the -m flag (see https://serverfault.com/questions/25199/using-wget-to-recursively-download-whole-ftp-directories)
|
I'm looking to put together a simple scriptable backup utility to grab all the files on a remote ftp server and drop them in a backup directory on my machine. I already tried the built-in Windows "ftp" command and Filezilla's limited command line options, but neither seems to be able to grab the whole document tree in... | Downloading a full remote directory via FTP from the command line |
Is there any benefit of hosting it on github over hosting it on our own servers?The main benefit iscooperation/feedback: on GitHub, people can fork your repo and send back pull request.If you choose that publication option, I would maintain a parent repo with twosubmodules:one for the proprietary codeone for the public... | We built a library (SDK) for iOS. The source code of the library is closed (proprietary). The output we want to release is iOS frameworks, API documentation, setup guide, license file but NO source code.We are discussing differant ways to release it to public.1) One way is to create a public git repository hosted in Gi... | Releasing proprietary iOS SDK using github. |
I had this issue and made the following changes:I moved my wireguard addresses from10.0.*to192.168.*(i have a feeling that swarm is allocating on top of these).docker swarm init --advertise-addr 192.168.2.123with the wireguard ip4 address of the master node.That managed to fix it, and it still works after rebooting the... | I'm trying to setup a 3 node Docker swarm cluster on Hetzner cloud, using wireguard VPN (setup on interfacewg0) to build the local network between nodes. Networking works fine across nodes using VPN IP (ports7946/tcp,7946/udpand4789/udpare open as reportedhere). I start docker swarm cluster with the following commands:... | Docker Swarm mode routing mesh not working with wireguard VPN |
Just stumbled here and managed to get things working with this free open source alternative:https://nssm.cc/It basically is just a GUI to help you create a service. Steps I used:Download NGinx (http://nginx.org/en/download.html) and uzip to C:\foobar\nginxDownload nssm (https://nssm.cc/)Run "nssm install nginx" from t... | I am trying to run nginx (reverse proxy) as a windows service so that it's possible to proxy a request even when a user is not connected.I searched a lot around and foundwinswthat should create a service from an .exe file (such as nginx).i found many tutorials online saying to create an xml file as following
nginx
ngin... | run nginx as windows service |
-1
I think it's because with each call to the function you are creating a list a. I would have thought that as soon as the function exits the list is dumped and the used space is freed but maybe that's not the case or doesn't happen that fast.
Share
... |
I'm sure this is a naive question about python and garbage collection.
I have a function that creates a large data structure in memory, and then returns an integer.
I expected that after calling the function, the memory used by the data structure would be released.
However, if I understand what the resource call below... | Why is memory usage increasing in this python code? |
If the value can only be 0 or 1, then you can useavg_over_time.If it can have other values, then you need to convert it to 0 or 1 via a recording rule:my_metric_nonzero = my_metric != bool 0And then you can doavg_over_time(my_metric_nonzero[1m])See alsohttps://www.robustperception.io/composing-range-vector-functions-in... | I would like to calculate the percentage time that a given metric is non-zero in a time range. I know I can get the number of values in that time range usingcount_over_time(my_metric[1m])but what I would like is something likecount_over_time(my_metric[1m] != 0) / count_over_time(my_metric)I can't do this becausebinary... | Prometheus: How to calculate proportion of single value over time |
Copy everything between-----BEGIN CERTIFICATE-----and-----END CERTIFICATE-----(including these delimiters) and paste it in a new text file (usually with the extension.pemor.crt). You can use your favourite (plain) text editor for this, for example Notepad, Gedit, Vim, Emacs (depending on the system you're using).Altern... | I wanted the SSL Certificate of my LDAP Server which is Novell eDirectory. I have used openssl to connect to ldap to view the certificate.openssl s_client -connect 192.168.1.225:636It is just printing the certificate. How can I save this to some certificate format file? | How to save the LDAP SSL Certificate from OpenSSL |
kubectl expose pod test --type=LoadBalancer --port=XX --target-port=XXXXShareFolloweditedNov 8, 2021 at 12:52Tomerikoo18.8k1616 gold badges5151 silver badges6262 bronze badgesansweredNov 8, 2021 at 12:47DebolekDebolek4611 bronze badgeAdd a comment| | I created a pod with an api and web docker container in kuberneters using a yml file (see below).apiVersion: v1
kind: Pod
metadata:
name: test
labels:
purpose: test
spec:
containers:
- name: api
image: gcr.io/test-1/api:latest
ports:
- containerPort: 8085
name: http
protocol: ... | expose kubernetes pod to internet |
I think you need those two lines:proxy_set_header Host "XXXXXX.execute-api.REGION.amazonaws.com";
proxy_ssl_server_name on;Here is the explanation about the why:TheHOSTheader is required as is describedhereThe Amazon API Gateway endpoint. This value must be one of the region-dependent endpoints listed underRegions and ... | Problem:I've set up a Lambda function behind API gateway which works beautifully. I have a hosted site that I want only a certain location to hit the API.Examplehttps://www.example.com/(Serves up html from hosted server)https://www.example.com/foobar(Returns a JSON payload that is generated by Lambda and returned by AW... | Setting up proxy_pass on nginx to make API calls to API Gateway |
GitHub Pages is doing what it is designed to do: hosting the contents of that repository.The root of the question asker's repository only contained a single file (README.md). So there isn't an easy way to navigate to the other pages, e.g.repo/website/webpage.html.Consider moving your web content into the root of your r... | I'm trying to host my webpages into Github pages but for some reason it seems to only show my Readme file.GitHub repo:https://github.com/InquisitiveDev2016/InquisitiveDev2016.github.ioWebsite:https://inquisitivedev2016.github.io/ | GitHub pages only showing ReadMe file? |
This page from the apache docssays that you can do it like this:<FilesMatch \.(?i:csv)$>ShareFolloweditedNov 4, 2015 at 6:14hjpotter9279.7k3636 gold badges146146 silver badges187187 bronze badgesansweredMar 26, 2010 at 1:22Chad BirchChad Birch73.7k2323 gold badges152152 silver badges149149 bronze badges14This syntax al... | This is a rule in my .htaccess# those CSV files are under the DOCROOT ... so let's hide 'em
<FilesMatch "\.CSV$">
Order Allow,Deny
Deny from all
</FilesMatch>I've noticed however that if there is a file with a lowercase or mixed case extension of CSV, it will be ignored by the rule and displayed.How do I make this ca... | How to make this .htaccess rule case insensitive? |
It's usually a registers per thread issue (CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES). This is covered in many questions here on SO cuda tag such as this one. There are many others also such as here. In short, the total registers used per threadblock cannot exceed the limit for your GPU (see below). Total registers used ... |
I have a Numba cuda kernel which I can launch with up to 640 threads and 64 blocks on an RTX 3090.
If I attempt to use 641 threads, it fails with:
Traceback (most recent call last):
File "/home/stark/Work/mmr6/mmr/algos/company_analysis/_analysis_gpu_backup.py", line 905, in <module>
load()
File "/home/stark/W... | Why launching a Numba cuda kernel works with up to 640 threads, but fails with 641 when there's plenty of GPU memory free? |
Actually surprised myself and hacked something together. Reroutes everything that isn't www.domain.com/checkoutRewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^(/checkout)
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]ShareFollowansweredMar 17, 2009 at 18:35Andrew G. JohnsonAndrew G. Johnson26.8k30... | Well I have a site that uses relative paths for all the URLs. I just added a shopping cart so the two or three checkout pages are using HTTPS instead of HTTP. My problem is that a user is mid way through checkout and clicks a link on the navigation or whatever it seems them to that pagewithHTTPS when it is a page tha... | How to use htaccess to flip from https to http |
A file on disk doesn't have query parameters. Query parameters are only used inURLs, which are irrelevant when executing a local file on the command line.Your invocation needs to look more like:php path/to/sub-crons.php 1Inside the script you need to use$argv[1]to retrieve the parameter instead of$_GET. | I have one cron file with namecron.php.
Inside it I'm usingcurl_multiapproach to start sub parallel tasks.Example:
The crontab of cpanel will execute this every minute.curl http://mywebsite.com/cron.phpInsidecron.phpI havecurl_multicode that call another file calledsub-crons.php. The first one will behttp://mywebsite.c... | Change a cron job from calling via url (curl) to calling via local command line (PHP) |
3
I'm not 100% sure for NHibernate but Hibernate 2nd level cache does NOT offer Write-Behind caching, Hibernate just directly writes to the database. I think the same applies to NHibernate. In other words, what you'd like to do is IMO not possible, at least not without modi... |
How can i read/write to the cache for a periode of time i.e 10 seconds and then commit the changes to the database?
| help with second level cache using NHibernate and memcached |
ctrl.SetControllerReference()only changesmetadata.ownerReferenceson the local object.It doesn't automatically callreconciler.Update()for you.
So the changes were never persisted, and theOwnernever changed.The correct way to create an object is to callctrl.SetControllerReference()before you callreconciler.Create(), e.g.... | The Operator-SDK for Kubernetes Operators has actrl.SetControllerReference()function, which claims it enables automatically garbage collecting objects when the managing Custom Resource is deleted.Sometimes it doesn't seem to delete anything. What did I do wrong? | How to correctly garbage collect objects using Operator SDK? |
7
It's not possible to set the Vary-Accept-Encoding header for S3 objects.
Share
Follow
answered Apr 27, 2013 at 8:14
powpowpowpow
11111 bronze badge
Add a comment
|
|
How do I add a Vary: Accept-Encoding header to the files of a static website hosted by Amazon S3?
This is the only thing keeping me from getting a 100/100 score from Google PageSpeed, I'd love to get this solved!
R
| Vary: Accept-Encoding header for Amazon S3 hosted site |
You could usetemplatefilefunction [1]:locals {
mystring = "Test"
}
resource "grafana_dashboard" "metrics" {
config_json = templatefile("${path.root}/EC2.json.tpl", {
mystring = local.mystring
})
}For this to work, you would have to change the JSON to be:"datasource": {
"type": "CloudWatch"
"uid": "${myst... | Hey team I’m having trouble finding in the documentation on how to add terraform variables in a JSON file,I need inject this variable in this JSON,In this JSON of this shape but not it works,I did try with var and locals, I tried it with var and locals, but it does not work, it is by default | How add terraform variables in a JSON file |
If formatting errors are ignored , no pod wont be in running status :controlplane $ kubectl get pods freebox
NAME READY STATUS RESTARTS AGE
freebox 0/1 CrashLoopBackOff 3 81sBecuase if you look at Dockerfile of busy box , The CMD argument "sh" which will complete immediately so pod... | Apply the following YAML file into a Kubernetes cluster:apiVersion: v1
kind: Pod
metadata:
name: freebox
spec:
containers:
- name: busybox
image: busybox:latest
imagePullPolicy: IfNotPresentCould the status be "Running" if I runkubectl get pod freebox? Why? | Could the status be "Running" if I run "kubectl get pod freebox"? |
You could set the setgid flag on the directory where the files are being saved.
setgid will cause files saved in that directory to be owned by the same group as the directory itself
chmod g+s directoryname
|
I have 2 php applications running on my server and the files within these applications are owned by 2 users (user1 and user2)
The ownership of the files look like this user1:www-data and user2:www-data. I assign www-data as group so my php application can easily write to the files when the permission is set to 775.
So... | File ownership of created files |
The answer is no because :There is only one supported and accurate way to analyze a Visual Studio solution: by using the SonarQube Scanner for MSBuildAnd this SonarQube Scanner for MSBuild has not been built to support the merge/aggregation of several Visual Studio solutions. One Visual Studio solution -> one project i... | I am using latest version of SONAR Qube and i want to know if it's possible to configure TWO Solution Files as part of Single sonar-project.properties.sonar.dotnet.visualstudio.solution.file=project1.sln
sonar.dotnet.visualstudio.solution.file=project2.slnCan someone help me find out the configuration details how to d... | C# Multiple Solution file support for SONARQube |
You are passing the wrong bucket name. ChangeBucket=enctoBucket=bucket['Name']in your call toput_bucket_encryption.Note also that the call toget_bucket_encryptionwill throw an exception if the bucket does not actually have encryption configured. While that might seem odd, that's the way it works (seeboto3/issues/1899fo... | Hi Iam trying to turn on default s3 encryption on all my buckets in an account using python boto3 script see below.import boto3
from botocore.exceptions import ClientError
s3 = boto3.client('s3')
response = s3.list_buckets()
for bucket in response['Buckets']:
enc = s3.get_bucket_encryption(Bucket=bucket['Name']... | S3 Default server side encryption on large number of buckets using Python boto3 |
Apparently, mounted secrets are updated automatically. Fromhttps://kubernetes.io/docs/concepts/configuration/secret/#using-secrets:When a secret being already consumed in a volume is updated, projected
keys are eventually updated as well. Kubelet is checking whether the
mounted secret is fresh on every periodic syn... | I have anoptionalsecret volume defined in my StatefulSet like- name: my-secret-volume
secret:
secretName: my-secret
optional: trueAnd further, I mount it in my container. When I provision the pod, the secret does not exist yet.Later, another service is installed on the cluster, which createsmy-secret. I... | Mount Kubernetes secret at pod runtime |
If you are still wanting to go the route of using that parameter and not file exclusions (with which wildcards would do what you need), go ahead and just try "cs", I'm pretty sure that's the correct permutation. | I am trying to get a TFS build work flow to analyse for only C# code.According to the documentationhttps://docs.sonarqube.org/display/SONAR/Analysis+ParametersI need to pass/d:sonar.languagewith the name of the language to prevent multi-language analysis. The documentation then links to the plugins page for a selectio... | SonarQube How to set analysis for C# Only in TFS and MSBuild |
1
Try adding the Content-Type property to the params section.
$cordovaFileTransfer.upload(s3SignedUrl, imagePathOnPhone, {
fileKey: "file",
fileName: localFileName,
httpMethod: "PUT",
mimeType: 'image/jpeg',
params: {
"Content-Type": "image/jpe... |
I am trying to upload a file using a pre-signed url on AWS-S3 with ngCordova FileTransfer Plugin.
I am successfully able to upload files to AWS-S3 but the content of the file contain
------WebKitFormBoundarylCFgJXqqECF1rJ2m
Content-Disposition: form-data; name="file"; filename="75cae09191bd92a16c3ff05baeb88b9b.jpg"
... | ngCordova FileTransfer direct upload to AWS S3 WebKitFormBoundary Issue |
At my local Postgres installation, the following query works without a problem:
create database "1stName-2ndName" with owner vagrant;
|
I have installed PostgreSQL 9.4.6 in docker image with docker version 1.10.1. According to this official image:
https://github.com/docker-library/postgres/blob/443c7947d548b1c607e06f7a75ca475de7ff3284/9.4/Dockerfile
As it is said here , that to create initial databases I add my sql script in "/docker-entrypoint-initdb... | Docker & PostgreSQL : can not create database having '-' in database name during initialization |
The solution is to utilize artifacts in the gitlab-ci.yml file to store the dependencies needed for the docker build (ie. *.jar and *.zip files)image: docker:latest
stages:
- build
- deploy
build_artifacts:
image: maven:3.6.0-jdk-8-slim
stage: build
script:
- mvn clean install -Dmaven.test.skip=true
... | We are running a spring-boot application that requires you to run amvn clean install -Dmaven.test.skip=truebefore you can run adocker build. Is there any images with both maven and docker installed?I have tried running a before script with a maven:3.6.0-jdk-8-slim image then specifying a separate image in the job.image... | Gitlab CICD - Run a mvn clean install before building a docker container |
2
I have seen this in our commits.
This is how it happened to us (well I assume :)
You merge a branch, and you get a conflict and it goes into MERGING state (visible in the git bash behind your branch name)
You open git gui
you click on the icon in front of the file (whi... |
I recently committed software changes to my gitHub repo. I had a local repo on computer A and then went to do some work in the repo on computer B. I was unable to push my changes done in repo B to my gitHub repo (internet problems) so I simply copied the modified source files and overwrote the relevant source files on... | How did strange git artifacts get into my commited source code? |
Okay, apparently loading the WSDL remotely was causing the memory issues. Initial thoughts are changes on the OWA side returning some odd data that the site was choking on.Thankfully, the parser code allows you to load the WSDL locally, and the problem does not occur when loaded locally. | Today my PHP application started to fail using it's email parser technology fromhttps://github.com/rileydutton/Exchange-Web-Services-for-PHPwhich has worked for years.Prior to this, the EC2 drive filled up and the site went down. I resolved the free space issue and the site came back except for the parser. I then updat... | PHP exhausting memory size using SoapClient |
As Evans mentioned this headers should be set from the server side. How you actually set the headers differs between backend programming languages/servers.
Here are a few examples:
Node.js res.setHeader('Cache-Control', 'no-cache');
Nginx add_header Cache-Control no-cache;
|
I'm trying to follow the guidance on create-react-app.dev's Production Build documentation:
To deliver the best performance to your users, it's best practice to specify a Cache-Control header for index.html, as well as the files within build/static. This header allows you to control the length of time that the browse... | How to specify a Cache-Control header for index.html in create-react-app |
I just figure out an easiest way to launch phpunit tests on myphp-fpmcontainer, here the command :docker exec -it $(docker ps -n=-1 -q --filter name=my_php_container_name --format="{{.ID}}") phpunit --configuration /myproject/src/Tests/phpunit.xml --testsuite testAllSuitesso now whenever I change anything on my code he... | Is there any good way (faster) to launchphpunitondocker? Here what I used to do :docker-compose build
docker-compose up
docker ps
docker exec <container_id> phpunit --configuration /myproject/src/Tests/phpunit.xml --testsuite testAllSuitesNote: I don't want to use Volume to sync files, so right now everytime I have to ... | Docker - What is the easiest way to launch phpunit testsuite |
In my case I setup an elb in aws and setup the ssl cert on that, choosing https and http for the connection types in the elb and that worked great. I setup the elb wroth kubectl expose. | I would like to setup a public kubernetes service in AWS that listens on https.I know that kubernetes services currently only support TCP and UDP, but is there a way to make this work with the current version of kubernetes and AWS ELBs?I found this.http://blog.kubernetes.io/2015/07/strong-simple-ssl-for-kubernetes.html... | How to setup an external kubernetes service in AWS using https |
12
I know this is an old question, but what you want is:
For inline policies:
inline_user_policies = client.list_user_policies(UserName=user_name)
For managed policies:
managed_user_policies = client.list_attached_user_policies(UserName=user_name)
Share
... |
I am still in the learning phase of boto3 and I can't seem to figure out the basics as to get the list of policies assigned to a user using boto3 for an aws profile?
For example:
>> import boto3
>> client=boto3.client('iam')
>> client.get_user()
Here, client.get_user() doesn't give me the policy attribute.
Thanks
| How to get the list of policies assigned to a user using boto3 for an aws profile? |
The best one I can think of is to use rebase here to rewrite the history and the do a push force. Following are some of the steps which can help here:
$> git rebase -i HEAD~6 // takes in 6 commits you want to edit
// Update the ones which you want to drop
drop xxxxxx initial commit
pick xxxxxx commit 1
drop xxxxxx co... |
In my office, I found that I had committed a sensitive file to github. So I used BFG Repo-Cleaner to remove the file from past commits. So it was deleted and I was happy. I guess that the commit hashes were changed at that time.
I went to home and opened a github desktop. It said I need to pull from origin and I did. ... | How to remove some past duplicate git commits? |
+25Using git through a GUI usually adds confusion instead of being helpful. One should try to get the git basics right in the first place.A normal routine should be the following:1. Clone project
2. Checkout a working branch
3. Make changes
4. Commit changes
5. Push changesThis routine is usually expanded and is cyclic... | I already have a project on GitHub and I'm able to clone and got the files as I wanted.I'm using clone fromGot the files and the .git folderBut when I push back by clicking the check mark (commit) nothing happensI usually upload files manually to GitHub website but my project is getting bigger, so..Did I miss something... | not be able to commit and push a project to GitHub |
You can use this redirect rule asfirst rulein your site root .htaccess:RedirectMatch 301 ^/(.+\d+)-\d+\.html$ /$1.html | I have old urls which contain consecutive numbers I like to redirect via htaccess, for example:(im not allowed to post links yet)www.example.com/just/another/path2/name-789-e-11-2.html
www.example.com/its/another/path3/name-789-e-11-5.htmlOn the new system the appended numbers dont exist anymore:www.example.com/just/an... | htaccess rewrite removing consecutive numbers in filenames |
I think the problem here is that you try to serve your development server through nginx; That's not what it's for, it's for development purposes only.To set up a production server you could usegunicorn in combination with supervisord to keep everything running (my preferred way of working these days), tutorial here:htt... | I have done the nginx configuration for serving django app .i am able to serve the django site using proxy pass for that i have to run the server manualy and then nginx serves the site.I want to execute the site using nginx but the server should get start automaticaly it shoud not be go through proxy_pass is this possi... | Serve Django site using Nginx without proxy_pass |
I have checked the difference between the two local repos, and git remote -v on PC1 gives:
origin https://gitlab.com/ ...
while on PC2:
origin [email protected]: ...
After further investigation it appears that the old version of LibGit2 which VS2015 Update3 uses lacks SSH support. The first repo was the original... |
I have two separate PCs that connect to the same Gitlab repo. Both running Visual Studio Update 3 and using Team Explorer with Git. On one PC, I have no problem updating the project and then pushing the commits to the remote repo. On the other PC however any operation (push or fetch or sync) will fail with an Unsuppor... | Unsupported URL protocol in git provider error |
More about moving files in githeremkdir username/FullStackCoursera
git mv username/classApp username/FullStackCoursera`Then double check your changes withgit status | I currently have some repositories for a Coursera course setup like this...username\classApp
username\classApp-AngI'd like to change this to...username\FullStackCoursera\classApp
username\FullStackCoursera\classApp-AngWhile still maintaining the current folder structure locally. Is this possible? I just want to have... | Is it possible to switch a repository to a subdirectory on Github? |
If you want to set the Cache-Control header, there's nothing in the IIS7 UI to do this, sadly.
You can however drop this web.config in the root of the folder or site where you want to set it:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControl... |
I'm trying to do something which I thought would be fairly simple. Get IIS 7 to tell clients they can cache all images on my site for a certain amount of time, let's say 24 hours.
I have tried the step on http://www.galcho.com/Blog/post/2008/02/27/IIS7-How-to-set-cache-control-for-static-content.aspx but to no avai... | IIS7 Cache-Control |
You can start with a shallow clone:git clone --depth=1 <url>Then, as Imentioned here, you can fetch only:since a date:--shallow-since=<date>up to a commit:--shallow-exclude=<branch|tag>with a greater depth:--deepen=NIn each instance, that would avoid dealing with thefullhistory of the repository over a slow network. | I have very slow access to some gits. So it is quite likely the simple "git remote update“ will fail with something like:error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
error: Could ... | Can I issue "git remote update" to download partial of the remote git |
There's no time limit for cron jobs in Linux by default.To find a reason why your code execution stops at a certain point you need to get some logs.First check if there's anything in thesyslogfile:grep CRON /var/log/syslog.If you don't find anything that explains why your script stops then try to do some debugging work... | Does Linux have any time limit for running a python code? I have a code that I need to run everyday in and its execution takes ~3 hours.When I turn on the linux SSH, the cronjob will run until the end but if I turn off my pc, I don't have idea why it didn't run the code until the end. It stops somewhere. Can anyone hel... | Limitation execution time in linux VM |
I think k8scronJobresource - is what you need for backing up the data vianodetool. Generally, thecronJobhasjobTemplatesection withspecsection within. Thespecsection, in turn, has containers definition, almost the same as in theDeployment. You can build your own docker image withnodetoolin it (or try to find somewhere o... | I have a cluster of 3 Cassandra pods running on Kubernetes. I want to do automatic backup of my data and for that I need to run nodetool snaphot command inside of each container and I need to invoke it remotely. What is the correct way to do it from architectural point of view?
Do I need modify cassandra image to have... | Cassandra backup running on Kubernetes |
Thanks for Chris's update. As an example, here is my cloudFormation template for serverless aurora. We no longer need the DBInstance.
RDSCluster:
Type: AWS::RDS::DBCluster
Properties:
MasterUsername:
Ref: DBUsername
MasterUserPassword:
Ref: DBPassword
DatabaseName: RANDOMN... |
From Aurora Serverless's document, there are 3 ways to create an Aurora serverless DB cluster: AWS management console, CLI, and RDS API. (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/aurora-serverless.create.html)
Form my understanding, one would use EngineMode in the RDS API to create Aurora Serverless, bu... | Creating an Aurora Serverless Cluster from cloudformation? |
Totally alternate solution: Usesplitand cut up the borders onto multiple DVDs. You'll get 100% utilization of every disk but the last.http://unixhelp.ed.ac.uk/CGI/man-cgi?split | My drive has DMG-blocks. The sum of their sizes is strictly below 47GB. I have 11 DVDs, each of the size 4.7GB. I want to use as small amount of DVDs as possible, without using compressing (the problem may be superflous, since it considers the most optimal combinations in terms of DMG-files. You can think it in terms o... | Optimal combination of files to the blocks of 4.8GB |
For a start,cat $(ls)is not the right way to go about this -cat *would be more appropriate. If the number of files is too high, you can usefindlike this:find -exec cat {} +This combines results fromfindand passes them as arguments tocat, executing as many separate instances as needed. This behaves much in the same way ... | I have a large number of files in directory - ~100k. I want to combine them and pipe them to standard output (I need that to upload them as one file elsewhere), butcat $(ls)complains that-bash: /bin/cat: Argument list too long. I know how to merge all those files into a temporary one, but can I just avoid it? | concat a lot of files to stdout |
Check to see if the URL you're requesting isn't a redirect. If it is, the cache will be pointing to that redirect as well, and the WebView won't read the resulting redirect from the cache.It took me some time to figure out that this was what was happening in my case.ShareFollowansweredAug 8, 2013 at 14:04Paul Lammertsm... | I have a webview using application caching. I launched the app with a connection to the network in order to load/cache the page. Now, after turning the wifi (and 3g - no network connection) off, and launch the app, I get shown the "android could not load the page" page. Oddly, if I then reload the webview, it loads up ... | Why doesn't android Webview check for cache by default? |
You can think of user pools as sort of a directory which contains user attributes such as name, email, phone number etc. This also provides sign up, sign in capability. You can federate users into user pools. Currently you can use Facebook, Google, and SAML as identity providers for user pools.
Cognito Federated iden... |
AWS provides cognito which provides the developer with sign-up and sign-in functionality including federations with OpenId compatible identity providers such as facebook, google etc.
There are two types of categories in cognito developer console. These are managing user pool and managing federated identities.
I'm just... | aws service difference between cognito user pool and federated identity |
The most granular action you can do is to retrieve a particular key. If you store a list of items under that key, you get the list. To get exactly one item, you'll need to store an item per key.
There are various strategies for this, however note that atomicity is at the key level so doing actions across multiple keys... |
I need to store a list of data in the cache.
Sometimes I'll need full list sometimes I'll only need to query the results and return one item from the list.
Current logic for one item is this:
User result;
var cachedUsers = _cache.Get<List<User>>(Constants.Cache.UsersKey);
if( cachedUsers != null)
{
result = cached... | Caching and retrieving list of data using memcached |
In reality, an array of pointers pointed to by a pointer is still an array of integral data types or numbers to hold the memory addresses. You should usedelete[]for both.Also, yes, anew[]implies adelete[].When you create an array of arrays, you're actually creating anarray of numbersthat happen to hold the memory addre... | This question already has answers here:delete vs delete[] [duplicate](4 answers)Closed8 years ago.The community reviewed whether to reopen this question2 years agoand left it closed:Original close reason(s) were not resolvedSo I'm used to memory management in C wherefree(pointer)will free up all space pointed to bypoin... | Deleting a dynamically allocated 2D array [duplicate] |
Github Pages only supports static sites and does not support server-side languages.To make a form, you could you a third party service such askontactrorformspree | Closed.This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meetStack Overflow guidelines. It is not currently accepting answers.We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-si... | Make contact form for GitHub Page [closed] |
12 * * * root cd /Users/myuser/Desktop/Work/appbackup && ./backupapp.pyMake sure your python file has a valid shebang at the top with the appropriate path to your python binary like#!/usr/local/bin/python3ShareFollowansweredNov 20, 2019 at 13:31Keith MedlinKeith Medlin1122 bronze badges8This will work only on specific ... | I have a python script calledbackupapp.pyimport subprocess, time
from datetime import date
app_name = 'xxxxx'
capture_backup = subprocess.check_output(['heroku','pg:backups:capture','--app',app_name]) # Make a new backup
time.sleep(5)
info_backup = subprocess.check_output(['heroku','pg:backups:info','--app',app_na... | crontab not executing a python script |
The short answer is: In general, you cannot guarantee that the OS will reclaim the freed memory, but there may be an OS specific way to do it or a better way to ensure such behavior.
The long answer:
Your code has undefined behavior: there is an extra free(p[i]); after the printf("2\n"); which accesses beyond the end... |
I noticed that this program:
#include <stdio.h>
int main() {
const size_t alloc_size = 1*1024*1024;
for (size_t i = 0; i < 3; i++) {
printf("1\n");
usleep(1000*1000);
void *p[3];
for (size_t j = 3; j--; )
memset(p[j] = malloc(alloc_size),0,alloc_size); // memset for de-virtualize the memory
... | How can I get a guarantee that when a memory is freed, the OS will reclaim that memory for it's use? |
3
Add extra to .gitignore and add .gitignore to the repository.
So, when someone pull the repo, he will automatically get .gitignore and the extradirectory is automatically ignored.
Share
Improve this answer
Follow
... |
I know that .gitignore is used for ignoring files in push and pulls. But what I am trying to do is have like an add-on section, lets called it extra.
The flow works like this
The developer pulls the application
The extras section is automatically added to the gitignore
Another developer modifies the application by ad... | GIT pull files but have them be ignored |
You could use multi-stage docker build. Setup one "building" docker image with database in it, and pass-through built assemblies you want to use. Here is the short example from our code base.# BUILDER IMAGE (with DB in it)
FROM microsoft/dotnet:2-sdk-jessie as builder
RUN apt-key adv --keyserver hkp://keyserver.ubuntu... | I know how one can use certain F# type providers, e.g.SQLProviderfor non-Docker development:#if DEBUG, connect to a local database, otherwise connect to the production database. Or, if the type provider supports it (as with SQLProvider), specify a connection string in a configuration file. In both cases however, the da... | Can F# type provides be used with containerized (Docker) resources? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.