Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
I don't believe TeamCity has any awareness of the comments on Github since the comments themselves aren't stored directly in the branch(es). My assumption is that you have a VCS Root similar to this:
+:refs/heads/master
+:refs/heads/develop
+:...
+:refs/pull/*/head
It is possible to access the comments of a pull requ... |
I have my CI on TeamCity. It currently triggers builds on different events (Pull Request creations, merges into Develop branch, etc.). However, I was wondering if it is possible to trigger a specific build as a result of writing a specific comment/labelling a Pull Request.
The goal is to run a set of Automated UI test... | TeamCity trigger for Github comment on pull request |
Google-owned projects have firewall rules automatically manipulated by GCE Enforcer, though there are some rules that are added to allow connectivity fromRFC 1918IP spaces.the options might be:tunnelingRDPthrough another port (in case any should be permitted).tunneling through a bastion host, which not belongs to a Goo... | I am working on a project that is jointly owned by Google, and I like to use RDP to work in a familiar desktop testing environment.So I create VPC rules to allow RDP ports, and it works, but "[email protected]" deletes the rule every few hours, which is quite annoying.Is there a way to whitelist specific rules with GCE... | Can I stop GCE Enforcer from deleting VPC Rules? |
0
Check if you are actually on a branch: are your commits made on a branch, or on a "detached HEAD"? (more on this at "cannot push to GitHub: everything up-to-date").
A simple git branch can show you the active branch. If there are none, that would explain why the "sync" bu... |
I recently re-installed my computer,
and now I'm encountering problems with github for windows (I'll be using GFW in the rest of this text). it say's that my local repo is in sync, but even if I change things, delete files, or add files it keeps saying that it is in sync.
It does check if I make changes on a different... | Github not checking if local repo has changed |
Technically, CUDA 5.5 added the ability to set individual stream priorities to the CUDA work scheduling system for compute capability 3.5 devices. This means that the CUDA driver will allow any operation kernel in a higher priority stream to preempt the driver level scheduling of operations in competing lower priority... |
I know from CUDA 5.5 that it is possible to have high-priority kernels, but I understand that this is only for calls issues by the same context on the GPU, i.e. it does not effect the priority for another process' kernel launches, as long as they have enough CPU time to be issued.
Is it possible to have high priority ... | Is it possible to handle GPU priority between processes |
kubectl configuration file is located at ~/. kube/config as default. You can check using this codekubeconfig_path = os.environ.get('KUBECONFIG', '~/.kube/config')You can check if the variable is setkubeconfig_path = os.environ['KUBECONFIG']and if it's not you can try setting thisos.environ["KUBECONFIG"]=your_config_fil... | Is there any command which points me to the path where kubeconfig file is present?
I mean I am working on python k8s/openshift client. I am looking for linux or python command or libraries which can print me the path where kubeconfig file is present.By default kubeconfig is present it home most of the time, but it may ... | Is there any command that points me to the kubeconfig file in k8s/openshift |
If your username isuserand you have a repository calledmy-repo, then this code will create a new issue with the specified title and body text in the repo.gh::gh(
endpoint = "POST /repos/user/my-repo/issues",
title = "Issue title",
body = "Some text"
)In order for this to work you need aGitHub access token. Once y... | Is there a way to create a GitHub issue from within R? I had a look at theGitHub API documentation. There is an endpoint for creating issues but I'm not sure how to translate that into R code. | How to create a GitHub issue from within R? |
This feature has been added asissue 177 of Grafana:Setup two series, click the eye icon to hide them and put a third with the division of the preceding ones.This is only working in Graphite (I'd like it to work on influx badly also) | How do I subtract two timeseries inGrafana? Or add two together, divide one by another, etc...? I have found vague hints online about taking differences between timeseries, but nothing that actually tells me how to do so. I'm using Grafanav2.0.2with Influxdbv0.8and have played around with the graph controls enough t... | Multi-timeseries operations in Grafana |
25
I'm not sure that the flag volume (-v) is the best practice to do so.
According to the github of jfrazelle, docker engineer who wrote many Dockerfile and docker run for many graphical app such as chromium, skype, spotify, and so on, the flag and argument you should use i... |
I'm not sure that this is even possible, but is there a way to access my camera inside docker container? I'm not using external camera but built-in in my mac.
| Access camera inside docker container |
No. Deny always overrides Allow.
However, your use-case can be met by if you simply remove your first Deny section. This is because, by default, users have no permission. So, they do not have permission to PutObject in the top level unless a policy specifically allows it.
The second part of your policy grants permissi... |
I have an S3 bucket that has a structure like this:
top_level_name
sub_level_1
sub_level_2
sub_level_3
I would like to do a blanket Deny of all actions on top_level_name (in order to exclude IAM policies that would otherwise have access to this bucket), and selectively Allow specific users to access their respe... | Is it possible to have an "Allow" effect override a "Deny"? |
Good questions and the answer like in many other cases are - "it depends".Shipping Logs- we use rsyslog as docker containers internally and logstash-forwarder in some cases - the advantage of logstash-forwarder is that it encrypts the logs and compresses them so in some cases that's important. I find rsyslog to be very... | Recently I am trying to find out best Docker logging mechanism using ELK stack. I am having some questions regarding the best work flow that companies use in production. Our system has typical software stack including Tomcat, PostgreSQL, MongoDB, Nginx, RabbitMQ, Couchbase etc. As of now, our stack runs in CoreOS clust... | Best Docker logging architecture using ELK stack |
The updated chart for helm3 isready to use.helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install my-release ingress-nginx/ingress-nginxOriginalThenginx-ingress chartis not published there yet. The progress is being tracked inkubernetes/ingress-nginx#5161.If you want to use the old chart yo... | How can I add stable/nginx-ingress as a dependency to my custom helm chart?After trying a few different urls for the repository, I still have no luck.StepsCreated a new helm chart with helm create and editing theChart.yamlto beapiVersion: v2
name: acme
description: A Helm chart for Kubernetes
type: application
version:... | Custom helm chart - helm dep update fails with Error: stable/nginx-ingress chart not found in repo https://kubernetes-charts.storage.googleapis.com |
This will output the average CPU:for k, v in response.items():
if k == 'Datapoints':
for y in v:
print(y['Average']) | I am trying to print out just the averaged CPU utilization of an AWS instance. This code will print out the 'response' but the for loop at the end isn't printing the averaged utilization. Could someone assist? Thank you in advance!import boto3
import sys
from datetime import datetime, timedelta
client =... | Boto3 - Print AWS Instance Average CPU Utilization |
So, finally, I used follow way to solve it:
Create snapshot
Use loop to check exit status of command aws ec2 wait snapshot-completed
If exit status is not 0 then print current state, progress and run waiter again.
# Create snapshot
SNAPSHOT_DESCRIPTION="Snapshot of Primary frontend instance $(date +%Y-%m-%d)"
SNAPS... |
I am working on shell script, witch does follow:
creates snapshot of EBS Volume;
creates AMI image based on this snapshot.
1) I use follow command to create snapshot:
SNAPSHOT_ID=$(aws ec2 create-snapshot "${DRYRUN}" --volume-id "${ROOT_VOLUME_ID}" --description "${SNAPSHOT_DESCRIPTION}" --query 'SnapshotId')
2) I u... | aws command line interface - aws ec2 wait - Max attempts exceeded |
Instead of thiscastat.executeQuery();
result = castat.getString(4);You probably wanted to write this originally (because you are reading the callablestatement instead of the result of your stored procedure call):ResultSet rs= castat.executeQuery();
if (rs.next()) {
result = rs.getString(4);
}Of course, the results... | I am facing the following SONAR issue with the code below:"getxyz(String, String) may fail to clean up java.sql.ResultSet"even after closingCallableStatementpublic String getxyz(String x, String y)
throws DBException {
CallableStatement castat = null;
String result = null;
try {
castat = getC... | SONAR issue "getxyz(String, String) may fail to clean up java.sql.ResultSet" |
5
This is a late response.
Multiple parts can be queued and sent in parallel, the size of this parts is the parameter partSize
The queueSize parameter is how many parts you can process.
The max memory usage is partSize * queueSize so i think the values you are looking dep... |
I'm working with the Node.js AWS SDK for S3. I have a zip file output stream that I'd like to upload to S3 bucket. Seems simple enough reading the docs. But I noticed there are optional part size and queue size parameters, I was wondering what exactly are these? Should I use them? If so how do I determine appropriate ... | Determining part size and queue size parameters for AWS S3 upload |
Enable zombie. It should tell you when your code try to send message to deallocated object instance. Problem is you are using a object after it has been released. It could be autoreleased object or object you explicitly released and using after etc. Below image is the screenshot from XCode when you do "Edit Scheme"
|
I know there are MANY threads that discuss this issue and trust me, I have looked at each and every one of them but none of them solved my issue.
Anyway, in my app I am receiving a message sent to deallocated instance crash. The object address follows that message and I have tried to use instruments without any succes... | message sent to deallocated instance |
+50Not yet: the GitHub Actions APIannounced last January 2020is:still in betausing theV3 API onlyNote that there is a difference between:GitHub REST API v3GitHub GraphQL API v4For now, Actions are exposed through REST, notGraphQLTherequest has been made of course:As of now, the GitHub Actions API enables you to manage ... | I need to interact with Github Actions through some code. I found thev3 APIfor that, but I've been migrating code to use the v4 API instead. I have not been able to find anything related to github actions on v4, unfortunately. Using introspection won't show "artifacts" or "workflows", except for copying the latter onCl... | Github Actions v4 API? |
Try:kubectl diff --recursive -f k8s-test | I noticed a really strange bug withkubectl diffcommand.I have a directoryk8s-test/and when I runkubectl diff -f k8s-test/output is empty, but when I dokubectl diff -f k8s-test/deployment.yamlI can see the differences for that specific file in the output.How can I debug this to find out the root cause? | kubectl diff doesn't show difference for directory |
It turns out that a variety of issues were causing my application to crash. I've detailed them in another post here.
|
I have a C#/WPF application that is meant to run on a small panel PC with 512 MB of memory. If it is left to run, an OutOfMemoryException is eventually thrown. This can take 12+ hours up to 2 days to happen.
Using both ProcessExplorer and .NET Memory Profiler, I see no evidence that the memory used by my application i... | C# OutOfMemoryException - How to track down the culprit |
You can assign log file to track errors, then post it here.Also I advise to set:environmentglobally.Try this code:set :environment, :development
set :output, 'tmp/whenever.log'
every 10.minutes do
rake "thinking_sphinx:index"
end
every :reboot do
rake "thinking_sphinx:start"
end | I am using thinking sphinx for search.It searches properlt but the problem was whenever i add new records i have to do rake thinking_sphinx:index manually.So to run it automatically i am using whenever gem with cron but still its not happening automatically,Either i have to dorake thinking_sphinx:indexorwhenever -w to ... | cron with whenever gem not running |
This an issue on JaCoCo side due to the try-with-resource construction :
The bytecode generated have several branches in order to safely close the open resource and JaCoCo instrument bytecode and report some of those branches as uncovered.See this issue :https://github.com/jacoco/jacoco/issues/82and this onehttps://gi... | I have the java code liketry (FileInputStream fileInputStream = new FileInputStream(filePath);
PrintWriter out = response.getWriter()) {
while ((i = fileInputStream.read()) != -1) {
out.write(i);
}
} catch (IOException e) {
throw new IOException(e);
}For this I ha... | SonarQube - Why condition Coverage metrics on catch statement |
It's not possible yet because docker build doesn't support build-time parameters, although I think this feature may be coming soon. You'll have to do a build using the docker context for now.
For example, if you look at the way hub.docker.com auto-build works, you have to add a deploy key into the github repo that all... |
There are plenty of questions about cloning a git repo into a container by installing git and then cloning stuff. What I'm interested in doing is something more like this, where they use a GitHub URL in the ADD command.
Obviously that's just a public URL, though.
Is it possible to use something like git over ssh or sc... | Is it possible to use a private git(hub) repo in Dockerfile ADD? |
I assume you have installed gh-pages:npm install gh-pagesYou need to have something similar in your package.json, right?"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"deploy": "gh-pages -d build",
"predeploy": "npm run build"
},This script will build your React app and then deploy... | Recently I tried deploying my portfolio web made from React togithubpages with the urluser.github.io/portfolio-webbut when it got deploy, my pages (/contactor/about) got defaulted intousesr.github.io/about.What I have right now is:user.github.io/aboutWhat I want is:user.github.io/portfolio-web/aboutSample of my React c... | Github Page url not being github.io/repo/about but github.io/about instead |
I came up with the following solution:1) Create a bash script:#!/bin/bash
bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'
beep='paplay /usr/share/sounds/ubuntu/stereo/message-new-instant.ogg'
# This gets the integer percentage of current battery capacity
p=$(eval $bat... | I recently changed desktop environments and the new one doesn't have a battery monitor.
I had managed to create a simple manual one by doing the following:alias bat='upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage"'I would like to take this to the next level and create a scrip... | CRON job and bash script to check battery state and beep |
1
Oauth playground is only intended to be used for testing. Tokens created on the playground will only work for about two weeks.
You should implement your own authorization.
Share
Follow
answered... |
I am using google drive api with laravel for a continuous backup, so I am using following packages
"nao-pon/flysystem-google-drive": "~1.1", and
"spatie/laravel-backup": "^6.14"
I have set up google drive api v3 with refresh token and put it into .env
FILESYSTEM_CLOUD=google
GOOGLE_DRIVE_CLIENT_ID=****.apps.google... | Failed to authenticate on SMTP server with username "***" using 2 possible authenticators |
add*TemporaryGeneratedFile*to your .gitignore | Unfortunately, when I was installing SourceTree I didn't click "Install a default global ignore file" and now I am going through hell. I have all those files showing:filesI found the .gitignore file but I don't know what else should I add. I am a total beginner and I guess I just need the basic .cs file and the solutio... | How to ignore temporarily generated files in SourceTree |
The reason you've got genuine difference fromgit diffis not fromignore-space-change, it's from-wand it's equivalent to-Xignore-all-space.So trygit merge -Xignore-all-space, but it might be a better idea to review the difference before finishing the merge because ignoring all space option sometimes create wrong indentat... | I am attempting to Git merge between two different repositories. Theoretically they very similar but different practices on both have resulted in numerous whitespace differences in almost every file.I can get the results I expect with "git diff -w -ignore-blank-lines" which does show only the files where there are gen... | Git merge ignore blank lines |
Why do you need to? In development, whereBundleTable.EnableOptimizations = falsenothing is cached anyways, and in production youshouldhaveBundleTable.EnableOptimizations = truealso negating the need for something like this.The short answer, is no, there's nothing built in to allow you to do what you ask, primarily beca... | I'm using Bundling in MVC and have the following:@Scripts.Render("~/bundles/scripts.js");WhenBundleTable.EnableOptimizations = truethis renders as:<script src="/bundles/scripts.js?v=RF3ov56782q9Tc_sMO4vwTzfffl16c6bRblXuygjwWE1"></script>WhenBundleTable.EnableOptimizations = falsethis renders as:<script src="/js/header.... | Add cache-buster to non-optimized bundle? |
Turns out you can just skip the environment variable in yml and useCONN_STRING=${{ secrets.CONN_STRING }} | I'm getting started with CI/CD and Docker and i wanted to pass a connection string to docker in my workflow file.deploy:
runs-on: ubuntu-latest
needs: publish
steps:
- name: deploy to server
uses: appleboy/ssh-action@master
env:
CONN_STRING: ${{ secrets.CONN_STRING }}
with:
... | How to pass a Github Secret as Environment Variable to Docker? |
2
Yes, you can.
There are answers to this question here and here.
For quick reference, the solution is below.
volumes:
- ./parent:/usr/share/elasticsearch/parent
- /usr/share/elasticsearch/parent/node_modules/
Here are the docker volume docs
Share
... |
I would like to mount everything inside my current directory, except /node_modules and /client/bower_components. I currently have to manually mount all the paths as following:
app:
build: .
ports:
- "3000:3000"
- "35729:35729"
links:
- mongo
volumes:
- client/app:/www/app/client/app
- clien... | How to exclude some paths when mounting the volume? |
Fix to this issue would be to provide the right set of file permissions to aws-cli.which aws # Find the path of aws-cli, say /usr/local/aws-cli/
sudo chmod -R 755 /usr/local/aws-cli/ShareFolloweditedMay 11, 2023 at 20:01answeredOct 9, 2020 at 18:14Harsha G VHarsha G V80211 gold badge88 silver badges2424 bro... | Gettingpermission denied errorafter installing aws-cli version using theofficial AWS guidewhile runningaws --versioncurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install | aws-cli 2 permission denied error in linux after installation |
5
Ran into the same problem today.
Turns out I simply had to reboot the database (via CLI or web interface).
As mentioned on the AWS docs:
When you change a static parameter and save the DB parameter group, the parameter change takes effect after you manually reboot the ... |
I configured my RDS Postgres 9.6.1 instance so, that the pg_stat_activity is loaded via 'shared_preload_libraries' parameter
shared_preload_libraries=pg_stat_statements,pg_hint_plan
The I rebooted my instance and then check if the pg_stat_statements can be loaded. But I get the error:
[55000] ERROR: pg_stat_statement... | Amazon Postgres RDS pg_stat_statements not loaded |
Judging fromthe examples showing how to use other parameterswith similar descriptions (likeRemoteUser), it'll take a discretionary ACL in SDDL with a single entry per user.You could write a small helper function to generate these based on username:function Get-FirewallLocalUserSddl {
param(
[string[]]$UserName
... | How to create Firewall rule which will be impacting only one of the local accountsIn theory below example would be sufficient however Im missing value for parameter "-LocalUser"Below PowerShell commandNew-NetFirewallRule -DisplayName "BLOCKWWW" -Direction Outbound -LocalPort 80,443 -Protocol TCP -Action Block -LocalUse... | Powershell New-NetFirewallRule with -LocalUser example |
Yes, there is a way.Github has API for OAUTH 2.0 and can be done simply. The documentation/manpages can be foundhere. | I am building a website that has a list of quizzes to help new developers learn to program.I would like the login page to use the users github account to authenticate their identity and be connected to the website.Example: top scores page shows link to github.Can this be done using a github api? and can someone point i... | Using a users github account to authenticate their identity to login in and access our website |
4
Here is a good comparison between the features of NCache and Appfabric
Share
Improve this answer
Follow
answered May 9, 2012 at 9:27
WilliamWilliam
4911 bronze badge
Add a... |
Has anyone done a thorough comparison of AppFabric and NCache or AppFabric and ScaleOut? We are currently looking to implement either AppFabric, NCache or ScaleOut for distributed caching in geographically distant locations and I would like to know anyone's thoughts who has compared them side by side. I appreciate tha... | Caching Solutions |
4
In newer versions this is now handled in /etc/clamav/clamav-milter.conf. Change the line:
MilterSocketGroup clamav
to
MilterSocketGroup postfix
Share
Improve this answer
Follow
answered Jan 25,... |
I have read the guides about install postfix on the server and there is written to set the parameter: SOCKET_RWGROUP = postfix in the file / etc / default / clamav-milter but I installed ClamAV and unfortunately I do not have such a file. How do I set it up?
I have followed the instructions on the page: https://greenq... | SOCKET_RWGROUP=postfix in ClamAv? |
Googles reCAPTCHA looks fairly simple to integrate -
https://developers.google.com/recaptcha/intro
which breaks into -
Validate user with captcha (https://developers.google.com/recaptcha/docs/display)
Validate the response (https://developers.google.com/recaptcha/docs/verify)
This can easily be achieved with API gat... |
I want to host my static website in AWS S3. But it contains "contact us" page which is for sending emails. When the user clicks the submit button it sends the request to AWS API gateway, API gateway triggers the lambda function; the lambda function sends the mail to Admin.
But it has some problem . when we host the ... | How to protect AWS API gateway URL from unauthorized access? |
1
From my understanding, the x variable is your list of commits right? If so then it is a dictionary. Try treating this as a dictionary, locate the message attribute (in your documentation, that is...)-->
"message": "Fix all the bugs"
..and do a for loop, assuming that you... |
I want my Python Flask server to send a GET Request to the GitHub REST API V3, asking for all commits messages in a Pull Request, and perhaps receive it as a single payload.
Any suggestions on how I can approach this issue?
Edit (additional explanation):
The only thing I have tried that was successful was displaying ... | Sending a GET Request to GitHub API asking for a list of commit messages in a Pull Request |
I finally found something that forces AWS Cloud9 to use the Python3 version installed in my Anaconda environment on my AWS EC2 instance.The instructions to create a custom AWS Cloud9 runner for Python arehere:{
"cmd" : ["/home/ubuntu/anaconda3/envs/ijackweb/bin/python3.6", "$file", "$args"],
"info" : "Running $... | I want AWS Cloud9 to use the Python version and specific packages from my Anaconda Python environment. How can I achieve this? Where should I look in the settings or configuration?My current setup: I have an AWS EC2 instance with Ubuntu Linux, and I have configured AWS Cloud9 to work with the EC2 instance.I have Anacon... | Configure AWS Cloud9 to use Anaconda Python Environment |
Below is the current working way to do volume bindings:volumes= ['/host_location']
volume_bindings = {
'/host_location': {
'bind': '/container_location',
'mode': 'rw',
},
}
host_config = client.create_host_config(
... | I think this used to work up to a few months ago. The regular commandline docker:>> docker run --name 'mycontainer' -d -v '/new' ubuntu /bin/bash -c 'touch /new/hello.txt'
>> docker run --volumes-from mycontainer ubuntu /bin/bash -c 'ls new'
>> hello.txtworks as expected but I cannot get this to work in docker-py:from ... | How to bind volumes in docker-py? |
If your software doesn't take care of resource management properly, the following will happen:
at runtime: the JVM will attempt during the duration of your program to close open streams if they're are seemingly unused (during garbage collection cycles),
at your program's termination point: the JVM should close open s... |
Java applications may use IO streams, sockets or database connections that should be closed when they are no longer needed.
However, applications may be terminated (e.g. by killing the process). Will all used resources be freed in this case? Who will free them: OS or JRE?
| Are resources used by a Java application freed when it terminates? |
As per the design in Danilo's book, if you are using the aws-sdk javascript , you should define your objects like :var creds = new AWS.CognitoIdentityCredentials({
IdentityPoolId: //hard coded value for your system//
})
AWS.config.update({
region: 'us-east-1',
credentials: creds
});
var lambda = new AWS.L... | I am attempting to create an iOS app in Swift that uses the following authentication service using AWS Lambda -https://github.com/danilop/LambdAuthIt uses the AWS Mobile SDK for iOS to communicate with DynamoDB and Lambda -http://docs.aws.amazon.com/mobile/sdkforios/developerguide/Here is the sample code for the websit... | AWS Lambda/Cognito Authentication - Assuming Auth Role |
From the famous bookCode Complete:The comments have to be aligned so that they do not interfere with the visual structure of the code. If you don't align them neatly, they'll make your listing look like it's been through a washing machine.Endline comments tend to be hard to format. It takes time to align them. Such tim... | After running Sonar on one of my project I get a violation for 'trailing comments'. So I wonder, is this purely related to accepted/recommended code layout conventions for Java or is there 'more to it'? What's the reasoning behind it? When I'm looking over some C++ code ( recentDoom code review, there are tons (or bind... | sonar, java and 'trailing comment' violation |
Instead I used the JSON version and used this code instead:var request = require("request")
var url = "https://data.dublinked.ie/cgi-bin/rtpi/realtimebusinformation?stopid=4566&format=json"
request({
url: url,
json: true,
rejectUnauthorized: false
}, function (error, response, body) {
if (!error) {
... | I am trying to access a XML data set from a HTTPS URL using Node.js. I have used the same code with a different data set that used a HTTP URL and that worked fine.I have looked into thishttps://www.npmjs.com/package/ssl-root-casbut I don't know how I should go about it.Here is the code I am using.var parseString = requ... | Trying to access https URL using Node.js |
Two completely different things need to happen. First you need to externally redirect the browser to show something different in the URL address bar. Second when the browserresendsthe 2nd request, the server internally rewrites the query string back. You can't arbitrarily add or remove things in URLs in the wild, as th... | Let's say I have the following url:http://example.com/?paramhow should I remove the question mark from the URL, ie. rewritehttp://example.com/paramto something like this:http://example.com/index.php?paramHere is my code, that doesn't work:RewriteEngine On
RewriteRule ^(.*)$ /index.php?$1 [P] | htaccess rewrite rule, remove question mark |
You can directly copy the .crt file withsudo vifrom the centOS to your windows destination folder, i.e. inside beats file | I have copied ssl certificate from te ELK server, set up on cent OS 7, with this commandscp /etc/pki/tls/certs/logstash-forwarder.crt user@client_server_private_address:/tmpbut then how should I place it into the Windows 2012 r2?Thanks. | How to copy ssl certificate from centOS 7 to windows? |
/usr/bin/docker: relocation error: /usr/bin/docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time referenceI ran into this at work this week (also on RHEL6.5). I believe the lib-device-mapper that you have isn't exporting a symbol ("Base") that Docker... | I had earlier followedhttps://docs.docker.com/installation/rhel/to install docker on rhel6.5. This used to work till today, till I decided to run "yum update" and upgraded to docker1.3.Now, /etc/init.d/docker start fails.-bash-4.1$ sudo /etc/init.d/docker status
docker dead but pid file existsContents of /va... | Docker 1.3 fails to start on RHEL6.5 |
Have you taken a look at theFat Controller? It can daemonise anything. There's documentation and examples on the website:http://fat-controller.sourceforge.net | I have been knocking about thinking about this issue for a while now and just need some closure as to what solution to take!I'm considering deploying my CakePHP application to AWS Elastic Beanstalk and I'm trying to find solutions on the following:Firstly, I have listeners than can be run by a console command (path/to/... | Daemonize PHP script (an SQS listener) on Amazon Elastic Beanstalk |
It looks like that it runs a little faster, but monitoring task manager it uses more memory while generating and in later iteration steps it get stopped one step earlier caused be MemoryError.
This is because generator does not have a well known length. Python cannot iterate over the generator to know its length bec... |
Outgoing from a formerly given or computed very long array (MB, GB, TB) of small bytesize numbers (so I use a bytearray), I need to compute in an next iteration step a follow-up bytearray. It is possible to compute the size which is needed for next iteration step bytearray, so I can allocate the memory beforehand by u... | Fill a bytearray of known size from generator |
I found the answer, I need the time range like following.http://localhost:9090/api/v1/query?query=go_memstats_buck_hash_sys_bytes[5m]Then the result is,{
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"__name__": "... | When I query metrics from prometheus, I just get the timestamp when I queried.For example, If I query data like this,http://localhost:9090/api/v1/query?query=go_memstats_buck_hash_sys_bytesThen I got the response like following.{
"status": "success",
"data": {
"resultType": "vector",
"result": [... | Prometheus metrics with timestamp |
You can use the DynamoDB Document Client SDK:
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property
The document client simplifies working with items in Amazon DynamoDB
by abstracting away the notion of attribute values. This abstraction
annotates native JavaScript types... |
Here's my code.
I want to insert asset_data json into asset_data column.
i am using aws sdk.
It says aws sdk now has support for json.
http://aws.amazon.com/releasenotes/SDK/JavaScript/1691866671551861
var asset_data = {
"name": "name" + i,
"contentUrl": "http://www.hdwallpapersimages.com/nature-beauty-deskt... | How to insert json in dynamodb |
Premise in your question is incorrect. Loki supports constructions likeor vector(0), and it's even used in examples intheir documentation.So your query will look like this:count(count by(system) (count_over_time({job="mrs_error_list"} |~ "" [7d])))
-
(
count(count by(system) (count_over_time({job="mrs_error_list"} |... | I'm using Promtail to forward logs to Loki and visualize the data with Grafana. I have a query that calculates the number of devices online without errors. The query works as follows:(
(count(count by(system) (count_over_time({job="mrs_error_list"} |~ "" [7d]))))
)
-
(
(count(count by(system) (count_over_time({job... | Handling 'no data' in Grafana subtraction query using LogQL with Loki |
I find the same error on linkhereandhere, it could be caused by the coverage data is not correctly generated.Check the command used according to the Xcode version. In addition, if you are using Microsoft-hosted agent, please check the xcode version on the agent. | I am trying to integrate Sonarqube onto an iOS project through Azure Pipeline .I have followed the exact steps mentioned herehttps://github.com/SonarSource/sonar-scanning-examples/tree/master/swift-coverageBut I am getting an error sayingError: Error Domain=XCCovErrorDomain Code=0 "Failed to create unarchiver" UserInfo... | Sonarqube Integration on Azure Devops - iOS Project |
Using default settings, builds are required to be tagged as latest. Using default auto-build settings for container builder, it lets the tag as the commit's hash rather than thelatesttag. | Using GKETrying to deploy a yml that has a docker image that containsgcr.io/myproject-101/pyftp. I have not had a problem with pulling this image at all until just recently. And from the looks of it it just started happening after my trial ran out. I've tried recreating my cluster and directly getting the path from the... | Why am I suddenly getting ImagePullPolicy errors? |
It basically signals the OpenGL implementation that you want to dispose the resources allocated to a texture. The resources (VRAM, System RAM, etc) aren't deallocated right away, since the GPU might still be using them. But you can be sure that they will be deallocated. | (Mac OS X, iOS apps)Q.What does glDeleteTextures actually do, on the above platforms?(The official documentation is... sparse, at best.)In terms of mem management, do the textures actually get removed from the video card? (Or at least their space set to reusable?)Cheers. | OpenGL - what does glDeleteTextures actually do? |
If the only reason that develop is ever behind is because of merge commits, then you should be able to routinely schedule a sync.git fetch
git checkout develop
git merge --ff-only master
git pushIf you have some hotfix branch that went in, then the worst case is that the above will fail. However then you're just going ... | My organization is making the transition from SVN to Git (hosted on GitHub) and we have basically adopted the git-flow branching model.We have been using pull requests to merge between branches. We use the GitHub web interface to process the merge and close the request.Pull requests are merged with --no-ff. So a mer... | GitHub Pull Requests Between Branches |
1
As for the .env file
You can simply open those file on github and click the delete icon on the top right
after this scroll to the bottom and commit the changes
and for the node_module folder:
open the folder and click on the 3 dots on the right to delete the directory
f... |
I don't want to send the .env and node_module file to GitHub but unfortunately, I was sent this file to Github. Now I want to delete those files from GitHub but How?
| Node Express and GitHub Issue |
You could try a negative lookahead assertion in the regular expression to discard matches that include the /sites/ literal.
For example:
rewrite ^/wp-content/uploads/(?!sites/)(.*\.(png|jpg|gif))$ /wp-content/uploads/sites/4/$1;
|
I have a very interesting issue. I migrated a website from a normal WordPress installation to a WordPress Network. The main issue I'm having is folder structure.
The specific issue is with images. So here is an example:
Old Image Path:
/wp-content/uploads/image.jpg or /wp-content/uploads/year/month/image.jpg
With the... | WordPress Move to WordPress Network |
Obvious questions to start with in troubleshooting something like this are:Can you connect with SSL enabled using psql?Is there anything of interest in the postgresql logs?If that doesn't work, is there a way you can test the certificate against the root ca's signature?If that fails, the only thing I can think of is tr... | I'm attempting an SSL connection from a ColdFusion 8 Enterprise client to a Redhat 5 Postgres server. Another party set up Postgres and sent me the certificates.I importedroot.crtintoE:\JRun4\jre\lib\security\cacertssuccessfully and restarted the service.The Postgres pg_hba.conf file has the client IP, and connects fi... | CF8 SSL Connection to Postgres fails |
1
Think of it in terms of the call stack.
In the example you give above, -someMethod doesn't exit before the value returned from -someObject is retained and assigned to object.
Share
Improve this answer
Follow
... |
autorelease pool will be released at the end of the run loop.
Does that mean the end of any iteration of loop?
When does this happen?
After every touch, motion, or remote control event is processed, the
pool will be drained.
What if our application does not provide any touches?
If we use code like this, how can... | NSRunLoop and NSAutoreleasePool, how do they interact? |
Try to switch to passive FTP and see if that helps. How you do that depends on the library and/or server that you are using.Passive protocol is more forgiving when it comes to firewalls if the server is properly configured.Read more about passive and active FTP protocols onhttp://slacksite.com/other/ftp.htmlandhttp://w... | Closed.This question isoff-topic. It is not currently accepting answers.Want to improve this question?Update the questionso it'son-topicfor Stack Overflow.Closed12 years ago.Improve this questionI am trying to download a file from a FTP server with Java. It only works when I disable the windows Firewall, I'm using wind... | Download picture via FTP with Java Firewall Issue [closed] |
This button is not available for FIFO queues.There is a note about this in the aws documentation:https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-dead-letter-queue-redrive.html | I have a Queue set up with a redrive policy that automatically sends failed messages to a Dead Letter Queue. When looking at the Dead Letter Queue, there is a button to "start DLQ redrive" which should allow me to reprocess the failed messages in the original queue. Unfortuately this button is not enabled on my queue... | In AWS SQS, the "Start DLQ Redrive" button is disabled |
It's best to keep your v1 CRDs completely decoupled from the v1beta1 package, and define your data structures in the v1 package instead.V1beta1 is considered an unstable API version, and changes in this package are expected to be made frequently during the beta phase. If you rely on the v1beta1 package in your v1 CRD, ... | Is it ok for a v1 CRD to have data structure dependency to a struct defined in v1beta1 package?v1 looks like this:
type MyCRDSpec struct {
Field1 *v1beta1.MyCustomStruct1 `json:"field1,omitempty" validate:"dive"` //dependency to v1beta1 package
Field2 []*v1beta1.MyCustomStruct2 `json:"field2,om... | kubebuilder api v1 dependency to v1beta1 |
-1
In firefox and IE your need to look like
<img src="https://platform3-preit-image.s3.amazonaws.com/components/fireside2.png" crossOrigin="anonymous" class="draggable-image" />
In chrome it need to be without crossOrigin. If you include crossOrigin attribute in chrome ... |
Well having problems using canvas to save image in both(Chrome,Firefox and Safari),
When I load a hosted image in html5 canvas, an error is shown in canvas (though only in Chome not Firefox), the image is from Amazon S3 server:
Image from origin 'https://xxx.s3.amazonaws.com' has been blocked from loading by Cross-Ori... | Amazon S3 image, cannot be saved using html5 canvas, gives Tainted Canvases Error |
Pooling is a very common technique to avoid frequent allocations and deallocations. Some treat it as a design pattern.
There are typically existing implementations, so there is no benefit to reinventing the wheel.
You may want to take a look at the question Object pool vs. dynamic allocation
|
suppose I need to allocate and delete object on heap frequently (of arbitrary size), is there any performance benefit if instead of deleting those objects, I will return it back to some "pool" to be reused later?
would it give benefit by reduce heap allocation/deallocation?, or it will be slower compared to memory all... | Recycle Freed Objects |
Objects inHttpRuntime.Cachehave unknown expiry periods unless explicitly set (meaning that objects can expire any time), whereas objects within yourHashTablelive for as your application pool is alive (unless you manually remove an entry). TheHttpRuntime.Cachealso allows you to set various other characteristics, such as... | What are the mainprosandconsfor using HttpRuntime Cache against using simple static field?I need to store data in scope of entire ASP.NET application.HttpRuntime.Cache["MyData"] = someHashtable;vs.private static System.Collections.Hashtable _myData;
public static System.Collections.Hashtable MyData
{
get
{
... | HttpRuntime Cache vs. static dictionary/fields |
Making it into an R package, asrolandsuggested, solves the problem. | I've got a GitHub project with interdependent R scripts, some of which I want to source. When I runsource_https <- function(url) {
require(RCurl)
sapply(c(url), function(u) {
eval(parse(text = getURL(u, followlocation = TRUE, cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))), envir = .G... | R: How can I source an entire project from GitHub? |
The two variants above are not entirely equal. Observe:
1.9.3p194 :001 > A = 'a'
=> "a"
1.9.3p194 :002 > s1 = A # constant assignment
=> "a"
1.9.3p194 :003 > s2 = A
=> "a"
1.9.3p194 :004 > s1 << 'b'
=> "ab"
1.9.3p194 :005 > s2 # you changed s2 as well!
=> "ab"
1.9.3p194 :006 > s1 = 'a' # literal assignment
... |
Take the following method (written in Ruby but this question could be applied to most OO languages)
# Getter method which returns an alert
def alertView
_alertView = AlertView.new
_alertView.title = "This is the title"
_alertView.body = "This is the body of my alert"
_alertView
end
Suppose this method is call... | Constants vs. objects instantiated on demand - which is optimal? |
From the info in the comments it looks like your.gitignorefile is causing git to ignore the dist directories.I suggest readingChecking in front-end dependenciesbefore deciding whether to commit your bower_components to git. | When I synchronize bower components via github my bower_components apps is missing dist folders and the only solution is to uninstall package and install it again.Is it any way to build all dependencies project and got those folders?I know that maybe removing bower_components from .gitignore is not the best approach bu... | Bower does not sync dist folder in project dependencies? |
1
I'm not sure you can colorize the output of --name-status without entirely reproducing its output with --pretty=format:...
But if you want file names with colors summarizing changes, the --stats flag can be passed to many commands, including git diff <branch --stat and gi... |
I would like to style the bash output for git diff --name-status so that the files with status D, M, and A are different colors.
To style general git bash I use the color options in .gitconfig.
# .gitconfig
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yell... | How to add color to bash output of `git diff --name-status` by file status? |
there is the git log command:git log --graph --abbrev-commit --decorate --format=format:'%h %ai %s - %an' --allthat you can pipe togrep -v <JiraPattern>to suppress the commits having the JiraPattern.Checkgit format docto perfectly fit your needs.Cheers | I have a development branch in GIt where developers have committed their changes and add Jira ticket in the messages. Also many of the commit doesn't have Jira ticket defined in the messageNow, I want to create a shell to get a list of all commit Ids including author, commit, commit, date where there is no Jira numbers... | How to list all of the commit ids with no Jira Issue defined in commit message |
I think the bug may be trivial: you didn't copy the end-string character 0.
When copying C strings, you should always take strlen+1.
As a result, in your second run, you allocate memory and copy{'v','a','r'}, instead of{'v','a','r','\0'}.When you then try to print it, you getvar#####where####is whatever garbage was the... | Device GeForce GTX 680
In my program,value is copied from host to device variable using CUDA Memcpy. I could see that previous values are retained in global memory on different executions of program.(Running the executable multiple times)
Code test.cu:First run:const test[]="overflowhappen";
cudaMalloc((void **) &test_... | For different runs, Previous Values are retained in global memory for kernel arguments for CUDA GPU |
I would suggest you to follow the below steps:
Open the notebook file in Jupyter notebook and copy all the cell contents as given below:
How to copy multiple input cells in Jupyter Notebook
Copy the content to a single .SQL file.
In the Management Studio, open a new query window and open the file, created in step no.... |
I have a doubt regarding an ipynb file, it turns out that they send me a database to replicate the structure, they use SQL server Management studio, but I don't know how to import it. I thought it was a simple python script, which could create a SQL database , then Install anaconda, use %%sql statements to recreate it... | Import SQL server Management studio backup from an .ipynb file |
It's not clear what you're asking here. The CL/GL interop defined by Khronos is thus far limited to shared buffers/textures and some event handling stuff, none of which seems related to tessellation. Since tessellation is a task specific to rasterization of polygon-based models, it is unlikely to ever be relevant enou... |
I don't quite have a 100% clear picture how the Draw Instanced/Draw Indirect family of functions all the way down to glDrawElementsInstancedBaseVertexBaseInstance work together.
Using OpenGL 4.0+ & OpenCL interop capable hardware and drivers, how (if possible) can we leverage tools like draw indirect (now also multi d... | Using OpenGL draw_indirect with OpenCL |
My query was wrong. I found the issue. Need to enclose it in [] brackets.
aws ec2 describe-network-interfaces --query 'NetworkInterfaces[*].[NetworkInterfaceId]' --filters "Name=status, Values=available" --
output text
|
I am running the following command to output to text, but the output is Horizontal. Is there a way to make this output Vertical, where one id per line? I have done this for describing instances which worked fine, I am not sure what's different in this case. My reason is that it is easier to work with in my case. If po... | AWS CLI --output text is Horizontal instead of Vertical |
3
We had the same challenge, and there were two approaches:
Tag EC2 instance based on running tasks, then find EC2 instances in Prometheus based on tags. This worked well when we have one task per instance because the metrics port is known. There are possibly ways to ext... |
I have multiple clusters in ECS, each cluster has multiple services, each service runs more than 1 task. Each task exposes /metrics with different values, on random port. I'd like to do some kind of dynamic discovery and scrape those metrics (each task has different port and different IP, because they run on multiple ... | Prometheus metrics scraping of docker tasks in ECS |
You can use the--rdb <filename>argument to theredis-clicommand-line tool:redis-cli -u 'redis://<username>:<password>@<hostname>:<port>' --rdb your_backup.rdbReference:https://redis.io/topics/rediscli#remote-backups-of-rdb-files | I'd like to make a backup of the data in a remote Redis instance.
But I do not have SSH access to the server that the Redis instance lives on. (Otherwise, I could copy out the.aofor.rdb-file)How do I create a backup in this case? | How do I create a backup of a remote Redis instance? |
Network latency is compounded by the number of SQL*Net round trips required to process the query and fetch the data. One way to minimize network latency is to ensure your arrayfetch sizein the C# program is set to a high number. Let's say for example it is 10, then you'll need 5,200 network round-trips to return 52 tho... | I have a C# program that uses theOracle Driverto an Oracle Database 12c Enterprise Edition 12.1.0.2.0 64bit.
On the LAN a select within the Program takes about 2 seconds. If I establish a connection over a VPN tunnel the same select takes about 48 seconds.If I ping the database:LAN: 0.206 msVPN: 53 msJust to be sure I... | Oracle and MS SQL Query very slow over VPN |
Any system can have multiple network interfaces and internet addresses, yet only have one name. The forward mapping from name to address will return all of the addresses mapped to a particular name. We used to do this with our file servers so that hosts wouldn't have to traverse a network boundary when accessing file... | This question probably highlights a lack of understanding of networking principals on my part, rather than a programming issue.I'm doing a lookup on a hostname usingDns.GetHostEntryThis returns an IPHostEntry to me, which has an AddressList property which is an array of IPAddress.I always thought there is a 1 to 1 mapp... | Dns.GetHostEntry returns multiple IP addresses |
Try pulling the remote main branch to your local master branch first, this will ensure it's completely up to date, and then you should be able to push it back.git pull origin master
git push origin master:main | This question already has answers here:Cannot push to GitHub - keeps saying need merge(31 answers)Closed2 years ago.My situation is the following. I've had a git repository set up for me by someone else, and I'm tasked with pushing to the main branch. I started a local React project on a master branch, and I want to pu... | How to push local repository on master branch to remote repository's main branch? [duplicate] |
1
I got in touch with GitHub support, and there are two solutions to this:
Use binary search on the since parameter of the /repositories endpoint to find the last page.
Cons: may quickly exhaust the API rate limit.
Use the /search/repositories endpoint with an always-true ... |
I would like to list public GitHub repositories with the latest create/update/push timestamps (for me any of these is acceptable). Can I achieve this with the GitHub API?
I have tried the following:
Tried using /repositories endpoint, and use the link header to navigate to the last page. However, the link header I re... | GitHub API - latest public repositories |
Minikube is no longer available as acask.Change commandbrew cask install minikubetobrew install minikubeor usecurl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 \
&& sudo install minikube-darwin-amd64 /usr/local/bin/minikube | The provided methods on the Kubernetes documentation don't work andbrew caskno longer seems to have the minikube formulae as of Mac OS Catalina.Error: Cask 'minikube' is unavailable: No Cask with this name exists.When I download it withcurlit refuses to run with the following error./bin/minikube: cannot execute binary ... | How can I install minikube on Mac OS Catalina |
You can achieve this by using Javascript to check the HTTP status code for the current page, and refresh the page when the server is back up (i.e. returns the200 OKstatus code). To avoid hammering the server when many users encounter the502error page at once, I’d recommend using thetruncated binary exponential backoffa... | When I’m doing maintenance on my site and restart the server, sometimes NGINX returns a 502 Bad Gateway error. The same thing sometimes happens under heavy load. This is confusing to my visitors who don’t realize the issue is probably temporary. Is there any way I can have visitors automatically refresh the page when t... | Automatically refresh page on 502 Bad Gateway error |
Elastic Load Balancing has a health check daemon that checks the path you've provided for a 200-range HTTP status.If there is a problem with the application, or its not returning a 2xx status code, or if you've misconfigured the health check URL, the status will go RED.Two things you can do to see what's going on:Hit t... | I've deployed an application to AWS elastic beanstalk.after start the application, it runs well. But after 5 minutes(I set health check every 5 min), it runs failed. I access the url but HTTP 503 error back.From the event info, I only get the info that the health status from YELLOW TO GREEN.But how can I get detailed i... | What the reason for AWS Health status becoming RED? |
The above works great, except the hash # tag is escaped by Apache, which writes the URL as with a %23 instead of the #.You can have the hash tag unescaped if you use theNEflag inside the square brackets:[R=301,L,NE] | A small but confusing htaccess problem here, on mod_rewrite.
We need to forward:http://www.mydomain.com/ladies-boots/?shoesize=43&calfwidth=Ktohttp://www.mydomain.com/ladies-boots/#nogo&somevar=1&shoesize=43&calfwidth=KOur code (thanks to another Stackoverflow post) is:RewriteCond %{QUERY_STRING} ^shoesize=([0-9]+)\&c... | htaccess mod rewrite - can I forward my URL to another URL with a hash tag? |
You need to fix indentation and alsocontainersis a list:---
apiVersion: v1
kind: Pod
metadata:
name: frontend
spec:
containers:
- name: wp
image: wordpress
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"ShareFollowansweredMay ... | When I want to run the following YAML file, I get the following error:error: error parsing pod2.yaml: error converting YAML to JSON: yaml: line 8: mapping values are not allowed in this context---
apiVersion: v1
kind: Pod
metadata:
name: frontend
spec:
containers:
name: wp
image: wordpress
resources:
... | What is the main problem in the YAML file? |
1
Seems like it is just not possible.
You need to use build arguments before launching the build.
Share
Improve this answer
Follow
answered Dec 12, 2020 at 18:11
William DesportesWilliam De... |
I wonder if is possible to set a LABEL during building of a container with a based that is based on a command run on the container.
Example, wanting to expose python=2.7.14 when the number would be obtained from running python --version during build.
The idea is to expose some information about what was build as label... | Can I set docker container labels based on output of previous run command during build? |
In the format string, use%dfor the (integer) port number.{{ with .Values.database }}
DatabaseConnectionString: "{{ printf "Server=%s;Port=%d;..." .host .port | b64enc }}"
{{ end }}This comes from theGofmtpackage. The!%s(int64=...)is its way of reporting an error:%sspecifically expects a string but it got an integer va... | I'm trying to put a formatted Postgres connection string inside a Kubernetes secret.
I'm using Helm to deploy the apps to the AKS cluster and after the deployment, looking at the values of the secrets in the Azure portal, I see something strange.The connection string inside thesecrets.yamlis declared in the following w... | Issue with database connection string using Helm and kubernetes secrets |
Try this:*/15 17-18 * * 6 [ $(date '+\%d') -gt 7 ] && <Then run your script>Fromhelp test:-gt: greater-thanShareFollowansweredFeb 24, 2016 at 20:25CyrusCyrus85.7k1414 gold badges9797 silver badges159159 bronze badges5Thanks for the suggestion. I had considered the-gtcomparison as stated above but every example I had se... | I want to run a script every Saturday except for the first Saturday of each month. (The script monitors a maintenance window, and the window is longer on the first Saturday of the month.)Here is what I have:*/15 17-18 8-31 * * [ "$(date '+\%a')" = "Sat" ] && <Then run my script>Here is what I'm looking at:*/15 17-18 * ... | How do I efficiently setup a Linux crontab to run a script every Saturday of the month except the first Saturday |
You could specify steps parameters in a separate json file :aws emr add-steps --cluster-id "j-xxx" --steps file://./steps.jsonwith steps.json containing something like :[
{
"Type":"Spark",
"Args": [
"--jars",
"s3://emrb/hadoop_jars/emrfs-hadoop-assembly-2.32.0.jar,s3://emrb/gson-2.8.4.jar",
... | So I am trying to run anApache Sparkapplication on AWS EMR inclustermode usingspark-submit. If I have only one jar to provide in the classpath, it works fine with given option using the--jarand--driver-class-pathoptions. All of my required dependency jars are located inS3bucket as required by EMR. I am using below comm... | AWS EMR add step: How to add multiple jars from s3 in --jars and --driver-class-path options? |
I have found a solution that appears to work well, which is simply a Python feature that is similar to a static variable in Java.def get_ad_service():
if "ad_service" not in get_ad_service.__dict__:
logger.debug("Creating AD service")
get_ad_service.ad_service = CompanyADService(settings.LDAP_SERVER... | I have an object that wraps some Active Directory functions which are used quite frequently in my codebase. I have a convenience function to create it, but each time it is creating an SSL connection which is slow and inefficient. The way I can improve this in some places is to pass it to functions in a loop but this is... | How to keep a shared functional object in memory in Django? |
I dont think you should create an elastic instance for each kubernetes cluster, you can run a main elastic instance and index it all logs.But even if you don`t have an elastic instance for each kubernetes client, i think you sohuld have a drp, so lets says instead moving your logs of all pods to elastic directly, maybe... | Do you know of any gotcha's or requirements that would not allow using a single ES/kibana as a target for fluentd in multiple k8 clusters?We are engineering rolling out a new kubernetes model. I have requirements to run multiple kubernetes clusters, lets say 4-6. Even though the workload is split in multiple k8 clust... | Can I use a single elasticsearch/kibana for multiple k8 clusters? |
Amazon does not specifically document what application/x-amz-json Content-Type is for, however there are protocol documentations on Smithy (an open source language for defining services and SDKs published by AWS):
AWS JSON 1.1 protocol
AWS JSON 1.0 protocol
Considering the question relates to the difference when use... |
I've run into "application/x-amz-json-1.1" in making requests to AWS resources. Most recently, it became a problem that an API Gateway I was communicating with didn't like handling it (for whatever reason). This got me wondering what the benefit to using application/x-amz-json-1.1 instead of application/json for my re... | What is "application/x-amz-json" and how is it different from "application/json"? |
You can exclude dependencies with thesonar.exclusionsproperty in thesonar-project.propertiesfile.For example:sonar.exclusions=third-parties/lib/**/* , other/lib/**/*SeeNarrowing the Focus | Some engineers in our organization are starting to use python but we find we must have the dependencies, produced by third parties, present for the analysis to be done successfully.Is there a way to exclude python dependencies needing to be accessible for the code we produce to be analyzed?We are using SonarQube 5.6.6 ... | How do I exclude python dependencies needing to be present to check using the python plugin |
You can use pre-built action for this operation, actions\checkout@v1.https://github.com/actions/checkoutYour file should look something similar to thison:
pull_request:
push:
branches:
- development
jobs:
primary:
runs-on: ubuntu-latest
env:
working-directory: ./
steps:
- uses: ... | I have a private repo and I'm trying to set my github actions so that when I push my code onto github, my workflow pulls the code from github to the server (ubuntu). For my secrets I have the host set to the IP address, username set as root, and a ssh key in private key.When I run this the 'git pull' request fails and ... | Where do I put my username for 'https://github.com' to pull from my private repo through github actions? |
Exists some ways to allow non-root user use the port 80 and 433, usingiptablesto redirect the port petitions,CAP_NET_BIND_SERVICEandauthbind. The way more easy isauthbind.Useauthbindto grant one-time access, with finer user/group/port control:Theauthbind(man page) tool exists precisely for this.Installauthbindusing you... | The first time when I tried to run SonarQube with root user this fails. Searching in internet I find that the new Sonar should be execute by a non-root user. I created the user sonar with the folow commanduseradd -m -s /bin/bash sonarand I executedchmod -R 777 sonaqube-7.0. Then I loggin with sonar user:sudo su sonar. ... | Can't use port 80 on SonarQube |
TL;DR: "because the client and daemon may not even run on the same machine"Thedockercommand is thedocker clientof thedockerdthat is the service that can run directly in your PC (linux) or under a Linux VM under OSX or Windows.Q: What is the purpose of the Docker build context?Fromhere:Would probably be good to also men... | What is the purpose of the Docker build context? I understand, from the documentation, that it's the "entry" point from which the entire contents will be sent to the docker daemon. But what's the point of sending the entire contents of the current directory, assuming the default use case provided in examples, when we m... | What is the purpose of the Docker build context? |
0
Easy way to find where you PG data located:
run:
ps aux | grep postgres | grep -- -D
or
ps ax | grep postgres | grep -v postgres
than zip this folder(for example /var/postgres/9.5/data i have no idea where is on your server)
run:
sudo zip -r ~/9_5_postgres.zip /var/postg... |
I need to backup postegresql database of rails project deployed on EC2 using Capistrano. So how can i do that and also i want to save backup data on my local computer
| How to backup postgresql database of rails project deploy on EC2 |
You must be able to prove ownership of the domain with a TXT record to connect it to Firebase Hosting. However, if you can change the name servers you should be able to point to a different name server (for example,Google Cloud DNS) andthenconfigure TXT records, etc. | I'm new to Firebase, what I was trying to do is connect my domain with Firebase Hosting, I own a .pk domain and have limited services on domain, as I can just change the nameservers (I do not have access to DNS TXT), It is possible to connect my domain to Firebase using the nameservers?(Means what are the nameservers o... | Firebase Domain Nameservers |
kubectl get --exporthad bugs likethisandthisand--exportwill be deprecated in k8sv1.18perthis link.$ kubectl get --export
Flag --export has been deprecated, This flag is deprecated and will be removed in future.
...kubectl get -o yamlcan be used to get values of a k8s resource's manifest along with metadata and status o... | someone before me deployed daemonset, and configmap is it possible for me to somehow get the values he used ? smth likekubectl edit <name>but the edit option has some temporary data in it too - the name of pod with random chars etc. - and to get pure values used in that deployments/daemonset what command would I need t... | kubernetes get values from already deployed pod/daemonset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.