Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
It is possible, but a couple of best-practices would involve:doing your modification in your own branch (that you can push to your fork)updating the branches common with the original repo with agit fetch upstream(upstream being the name of a remote referencing the original repo you forked)rebasing your own branch on to... | I wonder if the following scenario is possible with Git.I forked someone's repository.I do want to work on my own copy of the repository with getting updates from the initial repository.Occasionally, I do want to release my code and send pull request to initial repository.I am not sure if this possible, if yes please d... | Git working fork with updates |
Multi-stage builds do not merge multiple images together. They allow you to build multiple docker images, and give you a useful syntax to copy artifacts between those images. Merging images would be a non-trivial task (some commands modify files rather than create them, e.g. the package management DB, so even two compa... | I have the following Dockerfile with content:FROM ubuntu:bionic AS os
RUN apt-get update
RUN apt-get install -y git
RUN git --version
FROM node:13.10.1-buster-slim
FROM python:3.7.7-slim-stretch as test
RUN pip install --user pipenv
RUN git --version
RUN git clone[email protected]:silentdata/cdtc-identity-service.git... | Why git --version statement does not get recognize? |
Original answer (July 2015):
That would be (not tested directly), as in this tutorial (provided the remote API is enabled):
First create the container:
curl -v -X POST -H "Content-Type: application/json" -d '{"Image": " registry:2.",}' http://localhost:2376/containers/create?name=registry
Then start it:
curl -v -X PO... |
I'm new to docker. I have read the tutorial in docker remote API . In aspect of creating container. It show me too many param to fill. I want to know what is equivalent to this command :
docker run -d -p 5000:5000 --restart=always --name registry
registry:2.
I have no idea about it. Can anyone tell me? Thanks!
| How to use docker remote api to create container? |
You cannot do that because commit id is in fact SHA-1 hash calculated from the whole repository snapshot (all files) including also the file into which you want to write that commit id (which would change file and thus also commit id).
Also storing any information about commit into a file is redundant with what git al... |
This question already has answers here:
In Git, how can I write the current commit hash to a file in the same commit
(8 answers)
Closed 3 years ago.
We were given a task to inject ... | GIT how to inject commit infomation inside a file so that during/after push to remote? [duplicate] |
3
Turns out it was working all along. I had a legit issue with authenticating against the db. I needed some logging in the service to verify that it was getting the right connection string.
It appears that the app settings are passed to the container implicitly without ... |
I've created an AzureWebApp running a docker image. The app starts, but it does not appear to be getting a connection string. I've defined the connection string as an AppSetting but I am not seeing that setting passed as an environment variable.
Should I expect to see my AppSetting on the container output? Somethin... | Azure WebApp Containers and AppSettings/Environment Variables |
There is noliquidtag that allows you to getsitemetadatas from an other repository.The only way to do this is to useGitHub APIon the client side with the help of javascript libraries likegithub.js. | It is possible to access repository metadata from a Jekyll site hosted in agh-pagesbranch on GitHub.I am now building a site where it'd help enormously if I had access to the metadata of another (of my) repositories (here called athird-partyrepository because technically it is that).Is there any way I can set up Jekyll... | Can I access metadata from a third-party GitHub repo from a Jekyll site on github-pages? |
Enable mod_rewrite and .htaccess throughhttpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory:Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} \?.+?\.\.
RewriteRule ^ /? [R=301,L,NE] | Google webmaster showing some duplicate url,
They arewww.abc.com/index.php?option=com_toys&view=detail&n_id=148&ite..
www.abc.com/index.php?option=com_toys&view=detail&n_id=156&item..
www.abc.com/index.php?option=com_games&view=detail&vid=170&itemid..
www.abc.com/index.php?option=com_play&view=detail&vid=175&it.... | Redirect url to home page with trailing dots |
Thanks to james-moger
Cheers!! :) It's working with pushhook
import com.gitblit.GitBlit
import com.gitblit.Keys
import com.gitblit.models.RepositoryModel
import com.gitblit.models.TeamModel
import com.gitblit.models.UserModel
import com.gitblit.utils.JGitUtils
import com.gitblit.utils.StringUtils
import java.text.Simp... |
Need a groovy push hook scripts which push changes from your Gitblit instance to another
Gitblit instance
I have two private linux servers, Say A and B with GitBlit install on both. All developers do commit and push their changes on server A, I want B keep in sync with A.
A : ssh://admin@serverA:29418/testrepo.git... | Not working: GitBlit groovy hook which push changed to other Gitblit server repo |
I am fairly certain that if you use prebuilt packages you are stuck with hardcoded installation paths.
The easiest way around your problem is to create symlinks after installation:
FROM timescale/timescaledb:0.9.0-pg10
RUN set -ex \
&& apk add --no-cache --virtual .plpython3-deps --repository http://nl.alpinelinu... |
I try to add the plpython3 extension to my timescaledb/postgres (based on linux alpine) image:
FROM timescale/timescaledb:0.9.0-pg10
RUN set -ex \
&& apk add --no-cache --virtual .plpython3-deps --repository http://nl.alpinelinux.org/alpine/edge/testing \
postgresql-plpython3
When I try to create the extensi... | Add plpython3 Extension to Postgres/timescaledb Alpine Docker Image |
@GáborVarga you need to check few things.Check the output of command "kubectl get ingress", if you can see the resources.What annotations you are using currently. Below is the list of few example annotations which can be used.nginx.ingress.kubernetes.io/secure-backends: "false"
nginx.ingress.kubernetes.io/backend-prot... | I have the following rules defined in the nginx ingress rules yml:- host: my-domain.com
http:
paths:
- path: /api
backend:
serviceName: api-service
servicePort: 8080
- path: /demo
backend:
serviceName: demo-service
servicePort... | How does the nginx ingress process the routing rules? |
No, error log writes aren't buffered. | We're looking to watch nginx error logs for modifications but having some difficultly accounting for edge cases such as file truncations, etc.It would be helpful to know if nginx writes its error log files on the fly or if it buffers writes to error logs. Buffering wouldnt make a lot of sense for error logs but could s... | Does nginx buffer its error logs? |
This happens because the kubernetes library isn't installed with vanilla airflow. You can fix this by runningpip install "apache-airflow[kubernetes]". | Answer My Own QuestionI recently upgraded to Airflow 1.10 which introduced theKubernetesPodOperatorhowever whenever I use it I see the following error in the webserver:No module named 'kubernetes'. Why does this happen and how can I fix it? | Airflow no module named 'kubernetes' |
I don't know exactly what did it, but creating another user (I only had the default admin) and moving from the "Explore" tab to the "New dashboard" tab did it! | Okay, so I'm new to Grafana, and have loaded several df through MySQL database.
For the sake of simplicity, let's use a small df (that also doesn't work). Table contains id + 6 columns and 5 rows. Here are the features:Table: year
Columns:
id int(11)
year datetime
Total_GAP int(11)
Kitchen int(11)
Laundry int(11) ... | Grafana not reading datetime column |
So basically, what I had to was use $__interval in my query instead of specifying a time vector for the delta function I was using. | I have a Grafana line graph that pulls counts from a Prometheus DB. When the chart is shown in last 1 hour, it shows a point for every 15s which is the frequency that Prometheus scrapes. However, when I change to last 24 hours, it shows a point for every 1 minute. Instead of grouping those 15s points in 1 minute, it ju... | Grafana removes some points in line graph depending on time range |
Place a Buffer (Redis, RabbitMQ ...) in front of your Logstash machine that will be the entry point for all log events that are shipped to your system. It will then buffer the data until the downstream components have enough resources to index. | I'm using ELK stack and wondered how to handle crises in my elastic search, what is the best practice to buffer logs coming from logstash to elastic search fails in case elastic search fails and logs keep coming.Or in case you have a better solution to provide, in order to solve the problems with failing elastic search... | How to buffer logstash logs to elastic search |
copilot task run creates a new container. What you are looking for is copilot task exec.
|
I have a Django instance running as a Load Balanced Web Service, deployed by AWS Copilot. I would like to run Django Migrations by running a task through Copilot.
I tried running a task like this:
copilot task run --command "python src/manage.py migrate"
However, it doesn't appear to run in my active container. I wou... | AWS Copilot Run Task in Running Container |
Review the following files to check if there any credential helpers configured for the registries in question:~/.docker/config.json~/.config/containers/auth.json~/.config/containers/registries.conf | gcloud-cli seem to be interfering with podman (and may be docker)Any workaround for this?#This command has nothing to do with gcloud-cli, likely gcloud is messing with environment
podman pull registry.redhat.io/rhel8/mariadb-105
Error: 1 error occurred:
* error getting credentials - err: exit status 1, out: `You ... | gcloud-cli interfering with podman - any workaround? |
0
Are you using WordPress with Multisite?
I am not clear about your setup, but a tutorial from this list will surely help you: http://rtcamp.com/wordpress-nginx/tutorial
If you can share more details, I can guide you better.
From where does 8080 coming into picture? R u u... |
I'm trying to migrate a WordPress blog to a subdirectory of my website (i.e. example.com/blog/). Using NginX and FastCGI, I've managed to get the entire WordPress site working on port 8080, but as soon as I attempt to apply rules to place it in /blog, I get "No input file specified"
I think because I can get PHP and W... | NginX with FastCGI and WordPress in a subdirectory - "No input file specified" |
to add a label to the node you've chosen, runkubectl label nodes <node-name> <label-key>=<label-value>from the doc quoted above.ShareFollowansweredDec 16, 2015 at 19:50MrEMrE20.2k1313 gold badges8888 silver badges107107 bronze badgesAdd a comment| | I have install k8s by bare meta Ubuntu getting started guide. How to set node label? I think to set several categories for nodes. And I create rc on same caterory nodes. How write rc file(yml or json)? | How to set node label by bare meta Ubuntu getting started guide? |
Ifssh -Tv[email protected]does work in a git (For Windows) bash shell session, that means you must have (do check) a public/private key pair in %USERPROFILE%Open a CMD (not a git bash),cd %USERPROFILE%\.sshand look for aid_rsa,id_rsa.pubfile.If the private key was created without passphrase, you don't needssh-add -l: t... | I've some issues trying to use git with another app than git bash.(I'm on Windows)With git desktop I have an Authentication failed error :Authentication failed. Some common reasons include:You are not logged in to your account: see File > Options.You may need to log out and log back in to refresh your token.You do not ... | Github Desktop / VsCcode Authentication failed |
You need to type annotate field definitions in your struct to enable the compiler to generate high-performance code. Without type annotations in your struct fields, the compiler cannot infer the types of the fields at compile-time which would leave the decisions to run-time and hence this would hurt performance and ca... |
I'm trying my function call to have as little memory allocation as possible to make it run faster. The problem is that it seems when I access a struct that is given as argument there are many allocations.
function mCondition(y,t,integrator)
xp, yp, zp, vx, vy, vz = y
mu = integrator.p[1]
cond = (xp - 1.0 +... | How to avoid allocation when accessing struct? Julia |
Open the Team Explorer tab, at the bottom of the Connect page (power plug icon) you'll see a list of Git Repositories, enter the https uri to your github project and hit clone.See also:https://stackoverflow.com/a/19893242/736079 | Suppose that i have a web application solution on GitHub.
How do i fetch or import the whole web application solution from github to visual studio 2013?I am expecting something like this:
File -> Open -> Open from source -> enter githublink and credentials -> auto create project and fetch from githubbut seems like i ca... | how to fetch/import from github to visual studio 2013 |
Make sure you include "codebuild.amazonaws.com" as a Principal in your ECR permissions.https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html | danke schoenin advanceI'm newvie in AWS, especially I touched first AWS CodeBuild, CodeCommit... today.and I got this Client Error in PROVISIONING phaseUnable to pull customer's container image. ErrorCode: 404 ~~~~well, I guess I've set IAM Role properly, and of course I uploaded registry with my source(it's angular2 p... | I got some AWS CodeBuild Error. I have no clue to solve it |
Amazon just released new features for enforcing this, making it very easy
Excerpt from the docs on setting this up.
Note that any exiting bucket policies will be evaluated prior to any bucket encryption settings
Amazon S3 evaluates and applies bucket policies before applying bucket
encryption settings. Even if you ... |
I want to set an S3 bucket policy so that all requests to upload to that bucket will use server side encryption, even if it is not specified in the request header.
I have seen this post (Amazon S3 Server Side Encryption Bucket Policy problems) where someone has managed to set a bucket policy that denies all put reques... | Force Server Side Encryption for S3 Bucket |
The NAT gateway that I created was in the private subnet. The private subnets themselves don't have any access to the internet. Hence, I was stuck in a loop.
By creating a nat gateway in a public subnet and then adding in the router table of private subnets being used by the EKS cluster I was able to schedule the pods | I have recently setup an EKS cluster with Fargate.
When I tried to deploy Redis Service on k8s usingguide, I am getting the following errors:Pod provisioning timed out (will retry) for pod: default/redis-operator-79d6d769dc-j246jDisabled logging because aws-logging configmap was not found. configmap "aws-logging" not f... | Unable to provision Pod in EKS cluster configured with Fargate |
<?php
add_filter( 'cron_schedules', 'cron_add_day' );
function cron_add_day( $schedules ) {
$schedules = array(
'day' => array( 'interval' => 86400*1,
'display' => __( 'Every Day' )
),
);
return $schedules;... | I want to run a cron job in wordpress using the default function. I want set the time to run every 15 days. How can I set the the for this?function prefix_deactivation()
{
wp_clear_scheduled_hook('prefix_hourly_event_hook');
}
register_deactivation_hook(__FILE__, 'prefix_deactivation');
function prefix_activation()... | cron job in wordpress |
When you delete the branch in the upstream repo, it does not delete the tracking branches in the local repo. When you delete your local branch with the same name, it still does not delete the tracking branch for the remote repo.
The easiest way to "clean up" is to use git fetch -p (or --prune), which will clean up (a... |
I forked an original_repo to my_repo, it had two branches origin/master and origin/dev. I cloned my_repo to my PC and added original_repo as a remote upstream. I worked on dev branch locally and commited it, pushed it to my_repo. Then submitted a PR and when it was accepted, Git suggested that I delete the branch dev.... | How to re-fork a branch in Git after deleting it |
No this is not possible (and rather won't be in the future). As it is written here you have to clearly show what secret you want to use inyour workflowlike here:steps:
- name: Hello world action
with: # Set the secret as an input
super_secret: ${{ secrets.SuperSecret }}
env: # Or as an environment varia... | In its current format, you can define git hub secrets in the repository UI, and add them to your github actions CI like the following:- name: test secrets
shell: bash
run:
env:
SECRET_1: ${{ secrets.secret_1 }}
SECRET_2: ${{ secrets.secret_2 }}However this approach is cumbersome if you want to dynamica... | Is there a way to dynamically make github actions secrets available at runtime without explicitly defining each variable in your yaml? |
The measure of the technical debt is stored in minutes in the DB. Which is consistent with what you see: 15750 (minutes) / 60 (minutes per hour) / 8 (working hours per day) = 32.8 days | I am developing a plugin in Java for SonarQube (version 4.3.2) and need to make use ofTECHNICAL_DEBTmetrics present inCoreMetrics. I wrote below code to get this metrics from myDecorator.Metric metric = metricFinder.findByKey(CoreMetrics.TECHNICAL_DEBT_KEY);
data = context.getMeasure(metric);.getIntValue();
LOG... | Sonarqube - Getting Incorrect Technical Debt Measure in Plugin |
I found a project for that:Useful Forks.I have tried it and it works perfect as long as the fork didn't change its original name.ShareFollowansweredMay 23, 2022 at 20:01joaquinjoaquin84.1k3131 gold badges140140 silver badges152152 bronze badgesAdd a comment| | For a given repository, we can view its forks by replacing 'username' and 'repo' in the following URL:https://github.com/username/repo/network/membersExample:https://github.com/veracrypt/VeraCrypt/network/membersQuestionUsing the GitHub API, how can we order a repository's forks bystarswatcherscommits (since forking)No... | How to order GitHub forks by stars, watchers, commits using the GitHub API? |
In the end, this was super easy to solve! It wasn't solved the way I first expected though, using .htaccess. I solved it with something called wildcard subdomain.When you register a new subdomain, enter * in the domain prefix, such as *.example.com. A folder for the wildcard subdomain will be created on your server, su... | I'd like to create fake subdomains for different users for more vanity, and to make the user (in this case a company) feel they are in a more isolated environment.For the sake of maintainability, it's important for me that all users still browse the same files, to avoid having to update files for every single user that... | Fake subdomain for different users while still browsing same folder structure |
Currently, the only option I see is quite similar tohow you would protect an ALB in a way that access is restricted to CloudFront:Configure CloudFront to add a custom HTTP header to requests that it sends to theApplication Load Balancerlambda function URL.Configure theApplication Load BalancerLambdato onlyforwardproces... | AWS have recently released the Lambda function URLs feature which allows a function to be invoked via a URL.I would like to allow my function to be invoked via a URL but only via CloudFront.I don't want people to be able to bypass CloudFront and invoke the function directly.Is there a way to configure this? I am aware ... | Restrict Lambda function URL access to CloudFront |
When you clone a repository withgit... that's what you're doing; cloning arepository. You're getting all the branches and their histories, not justmaster.If you really wanted to, you could just getmaster(or a specific branch) - see:Clone only one branch | I am a newbie togithuband I am required to have an understanding ofwiresharkby analyzing its source code. The source code is apparently around23 MBbut if I try to do a git clone from the link provided in the website, it turns out to be around636 MB.Can someone please shed some light as to why the clone is so big compar... | Why is the size of the forked repository so huge in GitHub? |
+50Grafana will add one line per distinct labels found in your Prometheus query. When you define a legend that does not contain all distinct labels, you will see multiple lines with the same legend.increase(http_server_requests_seconds_count{}[1m])with legend{{status}}:If you remove your definition of the legend, you s... | A question regarding Spring Boot, and how to get the HTTP response status code and display them into Grafana.Setup: a Java Spring Boot application at 2.5.1 (relevant to any Spring Boot 2.x.x). The app has actuator and micrometer dependencies. App generates Prometheus metrics fine.I am very interested in this one dashbo... | Metrics for HTTP response status code for Grafana dashboard |
In a nutshell the difference is actual state vs desired state.kube_deployment_status_replicasmeans the number of replicas per deployment. This is the value ofStatus.Replicas.From theAPI docs.Total number of non-terminated pods targeted by this deployment (their
labels match the selector).kube_deployment_spec_replicas... | Need to know the difference between kube_deployment_status_replicas and kube_deployment_spec_replicas metric in kubernetes deployments | Kubernetes Deployments - Difference between status replicas and spec replicas |
You shouldn't worry about it as there is probably some behind the scenes memory management that is keeping the memory pools around just in case they are needed soon. A lot of memory managers will keep reserve pools of memory to increase application responsiveness when requesting from these pools (avoiding system call ... |
I made an NSWindow containing a WebView. It loads from a nib file and displays webpages in the WebView. After closing the NSWindow/WebView, they're released. If it's re-opened, a new NSWindow/WebView is created and loaded from the nib. Release When Closed is TRUE for the NSWindow.
First column is memory usage.
30MB -... | Why does a release'ed WebView on OS X continue to use Real Memory? |
The containers in a pod continue to run, yes. If the master components are not available this means no new pods/services can be launched, but existing ones continue to operate. Note that this behaviour is also one of the good practices and lessons learned fromBorg. | If kube-master or etcd service down in my kubernetes cluster, can my Pod/Service still work? Also, if the network is still work? | Can Pod/Service still work if kube-master or etcd service down? |
When you push, it transfers all new objects to the remote. This includes all new commits and all the new trees and blobs they refer to. If you remove the huge file from the newest commit, it's still there in the previous one that you're trying to push.You have to rewrite history so that no commit refers to the huge fil... | When pushing to github I currently getting an error. I have since gone into the directories using the OSX command line and rm file libv8_base.a. Then I , used git add -u, then git commit, then pushed to github. I received the same error a second time. This is a rails app.remote: error: File vendor/bundle/gems/libv8-3.1... | pushing to gihub error using Rails |
I agree that the performance difference seen by the poster is most likely caused by disk latency bringing the JRE into memory. The Just In Time compiler (JIT) would not have an impact on performance of a little application.Java 1.6u10 (http://download.java.net/jdk6/) touches the runtime JARs in a background process (e... | My professor did an informal benchmark on a little program and the Java times were: 1.7 seconds for the first run, and 0.8 seconds for the runs thereafter.Is this due entirely to the loading of the runtime environment into the operating environment ?ORIs it influenced by Java's optimizing the code and storing the resul... | Does Java save its runtime optimizations? |
If your library follows PSR-4 it is ok to have SimpleCurl.php inside "src" using that autoload configuration. There is no need to replicate the namespace as a folder structure, that is something you can see in many PSR-0 libraries, but PSR-0 was deprecated.If you want to have the classSimpleCurlin the namespacetzfrs\Ut... | I wrote a cURL-class that I wanted to share on github and also make available through composer. I successfully put my lib on githubhttps://github.com/tzfrs/SimpleCurl, but I still have problems understanding the correct folder structure.I currently have it like that:The git repository is named"SimpleCurl"The repository... | Correct structure for github libraries |
you need to remove thenodePortdeclaration from your yaml and it will get allocated by kubernetes from the pool mentioned in the error text (the only one you can use).apiVersion: v1
kind: Service
metadata:
name: lbalance
spec:
selector:
app: lbalance
ports:
- protocol: TCP
port: 80
targetPort: 80
... | I'm porting my dockerized app to kubernetes and I'm facing an issue creating a load balancer with aks:The Service "lbalance" is invalid: spec.ports[0].nodePort: Invalid value: 80: provided port is not in the valid range.
The range of valid ports is 30000-32767the configuration is pretty straightforwardapiVersion: v1
k... | How to expose an http/https application on Azure Kubernetes Services |
My advise is to discard the IP inside the environment variables and properties at all.
--link myMongo:mongodb
Links myMongo container to host 'mongodb'. This manages docker inside your host config.
Now adjust your properties as follows:
spring.data.mongodb.host=mongodb
spring.data.mongodb.port=27017
Now there is ... |
I have an springboot application container and mongodb container in docker.
docker run -p 27017:27017 -d --name myMongo mongo
So I'm running mongodb container first and after springboot container.
docker run -p 8080:8080 --name mySpringApp --link myMongo:mongodb mySpringApp
After that I want to get that environment ... | Docker linking db container with spring boot and get environment variables |
1
.NET 7.0 Update:
Works just fine for .net 7 also
Commands ran:
docker run -it mcr.microsoft.com/dotnet/sdk:latest bash
Inside Docker
dotnet --version
date
ln -sf /usr/share/zoneinfo/posix/Australia/NSW /etc/localtime
date
Got the output from above screenshot.
The OS ve... |
I am new to docker and wish to set TZ=Australia/NSW to the official dotnet core docker image
I tried adding to ENV TZ=Australia/NSW on line 5, but it didn't work.
Please help.
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV TZ=Australia/NSW
FROM mcr.microsoft.com/dotnet/sdk:5.0 A... | Change TimeZone in Docker (ASP.NET Core) |
0
A partial answer is that an ENI is setup when the lambda was created rather than each time it is run. It seems, but I am not sure, that lambdas running the same VPC with the same security group share the same ENI. So, strictly speaking, I don't need to discover the IP a... |
I am trying to discover the VPC IP address or AWS ENI of the currently executing AWS Lambda so that I can use the IP address to filter the VPC logs to find matching records. The Lambda is running in a VPC and does not have a public IP address.
I have tried various techniques suggested here:
Finding local IP addresses ... | How to I discover the local IP address or ENI of a running AWS lambda? |
I think it is probably the best that each Worker has BATCH_SIZE in its configuration. Your tasks can then easily grab this value from the config. | I'm trying to design a system where the caller sends data to celery workers which run on GPU machines, they do some processing and return the results to the caller. Since GPUs can process a batch-full of data in parallel (say N items in parallel), it makes sense for the celery task to accept N items of data and process... | How to specify batch-size of tasks that celery workers can accept? |
If you want to avoid making changes to Grafana itself you could use a reverse proxy to validate the JWT (eghttps://github.com/auth0/nginx-jwt) and provide headers compatible with Grafana's AuthProxy system (http://docs.grafana.org/tutorials/authproxy/)The alternative would be to make a PR for Grafana (potentially inspi... | I have a Grafana dashboard running which uses Elasticsearch as a datasource. My goal is to embed panels from the dashboard in my web app using iframes.Authorization on the web app is accomplished through JWTs, so when a user logs in, they receive a token from a server. I want to supply the token to each Grafana request... | Authorizing Grafana / Elasticsearch requests with JSON web tokens? |
You could use the publisher rest APIs to upload certificates related to the backend endpoints. Checkhttps://apim.docs.wso2.com/en/latest/reference/product-apis/publisher-apis/publisher-v2/publisher-v2/#tag/Client-Certificates. | I am working on a api management project, i would like to know if there is a way to create and update security certifications automaticlly ?thank you all | Automatic upload and update of the security certificate used by the API specifications for connecting to the backend endpoint |
Your "path" variable contains spacepath: ' /users/'+ username +'/repos',Instead it should bepath: '/users/'+ username +'/repos',ShareFolloweditedJun 3, 2016 at 20:36Matt3,65722 gold badges2727 silver badges3939 bronze badgesansweredJul 23, 2015 at 13:34pkdpkd51455 silver badges1313 bronze badges2where can i get a list ... | /*Making http request to the api (Git hub)
create request
parse responce
wrap in a function
*/
var https = require("https");
var username = 'lynndor';
//CREATING AN OBJECT
var options = {
host: 'api.github.com',
path: ' /users/'+ username +'/repos',
method: 'GET'
};
var request = https.request(options, fu... | TypeError: Request path contains unescaped characters, how can I fix this |
The Nvidia drivers provided with CUDA toolkit are really old; newer Nvidia drivers are available from the website. The same goes with NSight Visual Studio plugin.I generally install CUDA toolkit first, then update the Drivers and Nsight through separate installation.You just need to reinstalled the Nvidia drivers. | I am new to CUDA Development. I installed CUDA Toolkit 8.0 on my laptop running Windows 10 home and has a GTX 960M. Before Installing CUDA Toolkit, the context menu on desktop (right-click on desktop) used to have an option to access Nvidia Control Panel. And there also used to be system tray icons for accessing GeForc... | Nvidia Control Panel not working after installing CUDA Toolkit 8.0 |
Not sure if this is needed for the OP, but depending on the context of the questing the answer by VonC might be incomplete:If the project has deliverables that can be shared that are separate from the sources of your project, then you can do indeed what is proposed.
For instance you make an image using a Dockerfile th... | I am interested in using Docker to host a project I am helping develop in work. However I have a few questions about it's suitability.Firstly, I wonder is it at all possible to keep the source code hidden from potential users/customers? Obviously part of Docker's policies is that the code is open, but would there be an... | New to docker, is it possible to protect my source code and add permissions? |
clonethenfetchthat PR to a local branch. For example:git clone https://github.com/mimblewimble/grin
git fetch origin pull/2932/head:pr2932
git checkout pr2392Note:replacehttps://github.com/mimblewimble/grinwith your source
reporeplace2932with your source Pull Request numberreplacepr2932with your desired branch nameI wa... | How can I git clone the PR which haven't been merged by the author ingithub? Tried to fork a repo but the pr is gone. | git clone pull request instead of master branch |
I usually find that the best way to handle this is to set up cron with an easy superset of the needed dates (every day, or every hour, whatever) and have the script itself determine if it's the right time to run. If not, justexitbefore you do anything. | I have a Perl script that needs to run following an annual schedule with specific dates and times of when to start and stop. I don't believe crontab can handle this. Is there a Perl module (even a non-perl implementation would be fine) that can help me with this? If it helps, I m running this on a linux box.Also, the s... | Advanced cron for a perl script |
Bitmap screenshot;
view.setDrawingCacheEnabled(true);
screenshot = Bitmap.createBitmap(view.getDrawingCache());
view.setDrawingCacheEnabled(false);You needBitmap.createBitmap(view.getDrawingCache());as the Bitmap from which the reference is received bygetDrawingCache()gets recycled. | I'm working with Android 2.1 and have the following problem:
Using the method View.getDrawingCache() always returns null. getDrawingCache() should return a Bitmap, which is the presentation of View's content.Example code:public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
se... | Android 2.1 View's getDrawingCache() method always returns null |
It's unclear from your question why you came to the conclusion that it can't be stored as a Secret. This is one of the mainuse casesfor Secrets.Step 1. Create a Secret from your file:kubectl create secret generic mysecret --from-file=myfile=/tmp/my.pfxStep 2. Mount the Secret volume into a Pod:kind: Pod
apiVersion: v1
... | What's the best way to store a persistent file in Kubernetes? I have a cert (.pfx) and I want to be passing to the application its path. From the looks of it it can't be stored in secrets. Was thinking about a volume but the question is how do I upload the file to it? And which type of volume to choose? Or is there any... | Kubernetes storing persistent files |
It looks like your script is pulling the last part of the remote URL and using that as the project name. This works when using a single remote site, such as http://bitbucket.org but your system will not work universally across all users of that repository.
Users generally all have different remote repositories, in fac... |
Does git have a built-in command for showing the name of the current remote project? Right now I'm using this:
git remote -v | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//'
...but it seems like there would be a built-in equivalent.
| Is there a git command that returns the current project name? |
Assuming 100 character lines of text 15 * 4000 * 100 is only 6MB which is a trivial amount of memory on a modern PC. If your GUI is coming to a halt then to me that is an indication of virtual memory being swapped in and out to disk. That doesn't make sense for only 6MB so I'd figure out how much it's really taking u... | Before refactoring my code to start experimenting, I'm hoping the wisdom of the community can advise me on the correct path.Problem: I have a WPF program that does a diff on hundreds of ini files. For performance of the diffing I'd like to keep several hundred of the base files that other files are diffed against in ... | What is the correct strategy for keeping lots of text data in memory? System.Runtime.Caching or custom classes? |
Relying on the current working directory being a specific location is bad practice. See:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Application_Working_Directory
You should instead use absolute paths instead of relative paths.
You can construct absolute paths relative to 'curdir' rather than actually chan... |
I am using webpy with nginx + mod_wsgi.
To import modules(controllers etc.), I wrote
curdir = os.path.dirname(__file__)
sys.path.append(curdir)
in app.py, and corresponding nginx configuration is
wsgi_pass /path/to/app.py
As usual, I put all templates in a folder named templates, and in webpy
render = weg.template.r... | webpy with nginx + mod_wsgi template file cannot be found |
Scheduling syntax is forrecurringjobs. Those that happen over and over again, until the end of times.For single-shot jobs, you enqueue them, with an optional delay (which is what you need here). So you can just enqueue the whole batch of your jobs all at once, with 1 hour increments:1.upto(50).each do |x|
Resque.enqu... | I am using resque for job scheduling. I want to run a job every 1 hour and for N times only.
I also want to pass count in the job as argumentfor example:i=0
50.times do
every 1.hour, roles: [:whenever_cron] do
runner "Resque.enqueue(SomeJob, i+1)"
end
endHow can I do this?Note : -I don't want to run 50 jo... | Run background-job every hour for n number of times(ruby on rails) |
19
I had the same issue and solved it by adding this line to the Dockerfile:
ENV PYTHONUNBUFFERED=1
like the Django example on docker doc
Share
Improve this answer
Follow
answered Jun 4, 2021 at ... |
This is my code
https://i.stack.imgur.com/ig87i.jpg
When I run "python manage.py runserver 0.0.0.0:8000" it works perfectly fine.
https://i.stack.imgur.com/zX13T.jpg
But when I use docker with "make compose-start" it doesnt work.
https://i.stack.imgur.com/p8vpZ.jpg
Im trying to follow a python tutorial and cannot prog... | Django with Docker stuck on "Watching for file changes with StatReloader" |
I guess, here is the answer:https://bugs.eclipse.org/bugs/show_bug.cgi?id=319514 | I'm using since today Eclipse on Windows 7 64bit. So eclipse is still pretty virgin, i just installed android plugin for it.And I have many memory problems with it, which I didn't have with a worse computer however on 32-bit-Windows XP.Did anybody make the same experience and what have you done to fix this out of memor... | Problems with Eclipse on Windows 7 64bit |
-1You need to assign you EC2 instance under a security group. And configure the security group with inbound rules. Which will allow you to white list IP range, port, protocol etc.ShareFollowansweredJan 7, 2016 at 6:39ProbalProbal901313 bronze badgesAdd a comment| | I am new on AWS. I've been hosting an ASP.NET Web API on an AWS EC2 instance. I would like to access this web api securely through AWS API Gateway. I configured the AWS API gateway service successfully, however EC2 instance accepts and responses external api requests which are coming directly from the internet.My web a... | What is the firewall rule to restrict access to external web api calls running on AWS EC2 instance |
1
Try make your own container including in your dockerfile:
RUN export COMPOSER_HOME=/usr/local/composer && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer global require drush/drush:6.5.0 && \
... |
I would like to have Drush in my Docker but without a Drupal container.
I have nginx, php and mysql as containers and I wonder if I can install Drush in my php container like a module for exemple.
Because I use this as web developpement environnement I don't want to be more specific with Docker, with this I can insta... | How to have Drush installed without Drupal container |
Thank you guys for helping, well actually I figured it out somehow. Here's my solutions for anybody who might run into the same problem like I did:Inside /public_html, I created a folder and named it my-project. Inside my-project folder, I placed all files & assets folders ( css, js ) and .htaccess file here.Then I wen... | I'm new to Laravel framework so this question might be a little stupid but here's the problem:I have a small project on my local machine and now I need to deploy my project to a live environment ( shared hosting ).The problem is, my project needs to be stored in a sub-directory ( sub-folder ) of the main domain ( eg. m... | How to deploy a Laravel app to a sub-directory |
I see you confusion, but reality is more simple.
First of all - resource requests and limits are applied on container level, not pod. Pod resources are defined as simple sum of its container resources.Namespace quotas. They influence the namespace as a whole and do not influence pods themselves. The only thing namespac... | I am trying to track down some bottlenecks in a GKE kubernetes cluster. I am trying to rule out resource (cpu and memory) limits. However, I am having trouble because there are resource limits set on the containers in the deployment yaml files, but there are also resource quotas set as defaults in the cluster that pres... | Where can you find the authoratative resource limits for a pod/container in a kubernetes cluster? |
The two sentences immediately following the sentence quoted in your questioncontain the answer:For requests using Basic Authentication or OAuth, you can make up to
5,000 requests per hour.Forunauthenticated requests,the rate limit
allows you to make up to 60 requests per hour.Unauthenticated
requests are associat... | Github document says:For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hourIs this limit per user, i.e. per access token, or per ip address?For example, if I have 10 OAuth authorised users use my server app to access data from github api, is the limit from my server ip 5k or 5k x 1... | Is the github API rate limit per user or per domain/ip address? |
RewriteRule ^/?images/thumbs/(.*)$ http://thumbs.domain.com/$1
RewriteRule ^/?images/(.*)$ http://images.domain.com/$1 [L]This rules rewrite URLs like:http://domain.com/images/lol.pngtohttp://images.domain.com/lol.png.
And:http://domain.com/images/thumbs/lol.pngtohttp://thumbs.domain.com/lol.png.With no external re... | So I have the main photos folder and I want to make it subdomain style
so there is /images/ and /images/thumbs. What I'm trying to accomplish
is 'converting'/images/ -> images.domain.comand/images/thumbs -> thumbs.domain.comThank you for your help. | .htaccess mod rewrite folder to subdomain |
You can revert to previous commit, ignoring any changes:git reset --hard HEAD.WhereHEADis the last commit in your current branch.If you want to get remotegh-pagesbranch:git reset --hard origin/gh-pages. | Hi guys I am new to git .I created a branch and commited my files on it .then created another branch (this one is the one i want to push) .pulled the first branch to the new branch .mistakenly didgit checkoutinstead ofgit checkout "file"Now when I typegit statusi get a messagenothing to commitWhat can I do? | how to fix git checkout command by mistake? |
Based on your description:
First you should check your web application's config. You don't mention which type of your web application running on your Apache server, some are launched with the specific ip argment 127.0.0.1( or localhost), so kind of these web application can only be visited on your localhost computer. Y... | Host Machine - Win 7Guest - FedoraI have installed nginx web server on guest fedora machine and I can access the webpage inside guest machine using the interface address. How can I access the web page from host machine's browser ?I am using bridged connection.Router is assigning 192.168.0.16 to the guest machine's inte... | How to access nginx server from host machine, installed on guest VM ? |
Adding stdin_open: true to the docker-compose file solved the issue for me. This was suggested in the corresponding github issue.
|
I'm trying to create a react application by using the create-react-app tool as described here.
I want to use docker-compose to run the react application inside a docker container. I have taken the following steps:
On my machine I have created a directory call app and run a nodejs docker container:
mkdir app
docker ru... | docker-compose stops immediately after starting react app created using create-react-app |
Make the cron script retrieve:http://yourdomain.com/path/to/script.php?token=743cc5a35d28aa7d22d4e93and then in the script:if( ! ( isset($_GET['token']) && $_GET['token'] === '743cc5a35d28aa7d22d4e93' ) ) {
exit;
}It doesn't guarantee that the request is genuine, but it will prevent accidental invocation of your sc... | I am using Zend framework. I want to create an easy script for sending me an email with statistics every day. That is the easy part.The cron script execution with my provider can be only set up by an URL link.How can I make sure this URL can be only accessed by the machine, and not by any user or robot that tries the U... | accessing cron script in Zend |
Most probably it’s because Sonarqube’s unit test metrics as they are using a different methods to calculate the coverage. So there is no guarantee that both coverage results will be identical. You can check Sonarqube’s metrics regarding the unit testshttps://docs.sonarcloud.io/digging-deeper/metric-definitions/#tests | I have a class with@UtilityClassannotation. However, if I won't set the fields as static, sonarqube complains about 0% coverage for these fields. What is interesting,@UtilityClassannotation automatically adds static fields when it is compiled. So basically .class files are the same for@UtilityClasswith static or withou... | Why sonarqube shows different coverage for classes with the same .class files? |
There's an article about securing Elasticsearch which covers quite a few points to be aware of here: http://www.found.no/foundation/elasticsearch-security/ (Full disclosure: I wrote it and work for Found)
There's also some things here you should know: http://www.found.no/foundation/elasticsearch-in-production/
To summ... |
I am completely new to elasticsearch but I like it very much. The only thing I can't find and can't get done is to secure elasticsearch for production systems. I read a lot about using nginx as a proxy in front of elasticsearch but I never used nginx and never worked with proxies.
Is this the typical way to secure ela... | Securing elasticsearch |
A static site cannot by definition support PHP.
Static websites serve content directly from the web-server’s file-system
exactly as stored.
Dynamic websites generate content live per each request. The request is
delegated to a running web-application that builds the content.
What is a Static Website
You might be int... |
Closed. This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions see... | Do GitHub pages support PHP? [closed] |
I don't think there is any way to do what you are asking. You can specify a single DBInstanceIndentifier as the dimension and get specific data for that DBInstance or you can specify multiple DBInstanceIdentifiers and get metric data aggregated across those dimensions but I don't think there is any way to request mul... |
I would like to pull RDS Cloudwatch Metrics using Boto for multiple databases at once.
So far I have only been able to get metrics for only one instance at a time using an approach like this:
botoRDS = boto.connect_cloudwatch(aws_access_key_id=Key, aws_secret_access_key=OtherKey)
instanceStats = botoRDS.get_metric_s... | Show RDS Metrics for multiple instances |
You can either use folders or branches.Which strategy is the best mainly depends on your needs. But, as you already have those as folders, I guess you would like to maintain that approach.Anyhow, let's see both.FOLDERSBeing insamplefolder, create as many directories as environment you have.
So you'll have those directo... | I have a organization with a repo named samples. These contain samples projects from different environments, thus have different folders.organization name: alpha
repo: samples
+ env1
+ env2
+ env3These projects are present in 3 different workspace locally. What is the best way to push these into gi... | add projects into single git repo from different folders |
Exactly that, aws expects a base64 encoded string to be passed for the UserData value. Why the tools doesn't do this for you, I don't know.So, instead of the string:/srv/user-data.shUse a base64 encoded version of the string (using an online encoder, I got the following):L3Nydi91c2VyLWRhdGEuc2g=I'm guessing the final ... | I am trying to create a new spot request using aws cli but it gives me an error if i pass a shell script as user-data to spot requesti tried thisaws ec2 request-spot-instances --spot-price "0.04" --instance-count 1 --launch-specification "{\"UserData\": \"/srv/user-data.sh\",\"InstanceType\": \"m1.small\"}"and this giv... | Passing script as user data into AWS EC2 spot instance |
3
You can deploy the two services in parallel by using Copilot's pipelines feature. Tons of info here: https://aws.github.io/copilot-cli/docs/concepts/pipelines/
Share
Improve this answer
Follow
edited May... |
I'm new to AWS Copilot and containers in general (frontend focused engineer helping out with DevOps at my job) and am trying to figure out how to deploy multiple containers at once. The project includes a web container, deployed through copilot as a Load Balanced Web Service, and a worker container, deployed as a Bac... | How do you deploy multiple services on AWS Copilot at once? |
No - it's not possible to have dynamic workflow configurations at the moment, I'm afraid.The solution I personally use is to trigger this type of workflow usingworkflow_dispatchevent with properinputoptions.Instead of triggering it manually on web, you can have a script that locally reads the file with all options and ... | Right now, we're running a manual workflow in order to deploy our product to production. We have one input and we can choose our brand which needs to be deployed.It's including options likeon:
workflow_dispatch:
inputs:
dst:
type: choice
description: Select destination brand
required... | Create GitHub Actions choice input options from a file |
With yourAuthorizationPolicyobject, you have two rules in the namespace bar:Allow any request coming fromfoonamespace; with service accountsleepto any service.Allow any request tohttpbinservice; from any namespace, with any service account.So it is an OR, you are applying.If you want and AND to be applied; meaning allo... | I’ve been testing istio (1.6) authorization policies and would like to confirm the following:Can I use k8s service names as shown below wherehttpbin.baris the service name for deployment/workload httpbin:- to:
- operation:
hosts: ["httpbin.bar"]I have the following rule; only ALLOW access to thehttpbin.ba... | Istio AuthorizationPolicy rules questions |
I found a way to solve it. This is indeed possible withcupybut requires first moving (on device) 2D allocation to 1D allocation withcopy.cuda.runtime.memcpy2DWe initialise an emptycp.emptyWe copy the data from 2D allocation to that array usingcupy.cuda.runtime.memcpy2D, there we can set the pitch and width. We useMemor... | I would like to construct a Cupy GPU array view of the array that already exists on the GPU and I'm handed the following:Pointer to the array.I know the data type and the size of the data.I'm also given a pitch.How one would construct an array view (avoiding copies preferably)? I tried the following:import cupy as cp
i... | Cupy array construction from existing GPU pointer |
You can use a generator expression (just omit the brackets):
sum(value.interest for value in ArrayofMyType if condition)
This does not create an intermediate array but an instance of type Generator. You can do
g = (value.interest for value in ArrayofMyType if condition)
to create such an object outside of a functi... |
I am using an array comprehension for defining a value of interest for elements of an array of a self defined type.
sum([value.interest for value in ArrayofMyType if condition])
This expression itself is in an iterative loop. This means that every cycle, this comprehension uses new memory. Also, the condition each ti... | Julia array comprehension memory usage |
As Tagc says, this is the documented behavior of docker-compose with a.envfile, it must be in the directory where you are runningdocker-compose. You cannot useenv_filefor this because that's setting a different environment. The.envfile sets the environment used bydocker-composeto parse the yml file (and therefore could... | I have a problem with my Docker.envfile. When I'm in my Docker folder (where I have thedocker-compose.ymland.envfile), the environment variables are read from.envfine. However, when I rundocker-compose -f ./docker/docker-compose.yml up --build -din a higher-level directory I get warnings like:The MYSQL_ROOT_PASSWORD v... | Env file is not read when I use docker-compose -f in a different directory |
The missing capability was:CAP_SETGIDShareFollowansweredDec 13, 2021 at 12:46Saar KurielSaar Kuriel58244 silver badges1616 bronze badgesAdd a comment| | I have a docker container, in which I'm running the following cron job:SHELL=/bin/bash
BASH_ENV=/container.env
*/1 * * * * find ${CLONE_DIR} -mmin +10 -exec rm -fr {} >> /var/log/cronjob.log 2>&1 \;The cronjob works perfectly in my local environment (i.e using docker-compose to launch the container).In my production en... | cron not running in a docker container with no capabilities |
Found the solution , I deleted everything which were present under web/deploy/plugins folder and restarted sonar server and it has generated index.txt file. | I can see plugins folders under "sonarqube-5.3\web\deploy\plugins" but index.txt file is missing and because of it I am getting error while sonar runner execution.its failing while at following step.GET 404 http://gbrdsm030000221:9000/deploy/plugins/index.txt | Sonar index.txt file is not getting generated SonarQube 5.3 |
this blogsolves the problem. Do as below.$ git remote show originthis command allows you to prune all your local branches that track an already-deleted remote branch.
I often remove remote feature branches after the changes have been merged into master and the branch is not needed anymore, in order to “tidy up”. But if... | I forked repo fromorigin/masterto mylg/masterbut I don`t have origin master account, now I need to revert a commit fromorigin/masterwhich was already merged to it.
Since My account was added to the dev group, so I guess I was authorized to revert.But I don`t know how to do that step by step. I am new to git, so any ad... | how to revert commits by other account |
PromQL expression should looks like this:(rate(ifHCOutOctets[1m]) * 8) / (ifHighSpeed * 1000000) * 100If you want to restrict to particular interface, add filter like(rate(ifHCOutOctets{ifIndex="0"}[1m]) * 8) / (ifHighSpeed{ifIndex="0"} * 1000000) * 100 | In a Debian Os target, I want to calculate BandWidth utilization "%" on a 1-minute interval and generate a graph of these BW values over 1Hr time window using Prometheus."60 minutes = 60 different values of BW"I configured snmp_exporter to scrape snmp_agent metrics such as ifHCInOctets from the target server and here's... | How to Make a graph of consecutive values in Prometheus |
When using ASGI, for asynchronous servers (websockets), you should use an asynchronous server, like Daphne or Uvicorn, theDjango documentationhas examples on how to deploy for both of them.If you want to use uvicorn directly you could do something like:uvicorn myproject.asgi:application --host 0.0.0.0 --port 8000You ca... | So I am using a docker for this python chat app project.I originally hadpython manage.py runserver 0.0.0.0:8000as my command in docker-compose.I found that I should switch to gunicorn if I want to deploy my app on web (like heroku). The tutorial I found say simply change the command in docker-compose togunicorn myproje... | How to run Gunicorn while still using WebSocket |
Insert this rule before existing rule to removeindex.phpfrom URI:RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*?)index\.php$ /$1 [L,R=301,NC,NE] | I have the following code in my .htaccess file.RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]This redirects all requests to index.php. However I am still able to access www.mydomain.com/index.php directly from the U... | Redirecting all requests to index.php without direct access |
Hopefully, we are not talking about a crossed dependency here (where dev1 depends on dev2 code who depends on Dev1 code)For a simple dependency, Dev2 would need to do (after Dev1 updates his/her feature branch)git fetch
git checkout dev2_feature_branch
git rebase origin/dev1_feature_branch
git push -f(orgit push -u ori... | In my current project all the team members are new to Git where recently we got some collaboration scenarios during development.My question is if multiple team members works on a project where each developers (in this scenario Developer 1 & 2) has created their local feature branches in local.However there is a depende... | Code checkin collaboration on Git during development |
Update March 2015: "PDF Viewing"!
Simply browse to a PDF document and we'll render it in your browser like any other file.
From presentations to papers, we've got you covered.
Many thanks to Mozilla and every contributor to PDF.js.
Original answer (October 2014)
This is simply not (yet?) supported in GitHub.
... |
I have a project description in PDF and I will be quite happy if I can somehow manage to preview it in github website rather than clicking "View Raw" and downloading it.
I thought there could be a converter from pdf to github flavored markdown yet found none.
To state again, my input is a pdf file and my desired out... | PDF to Github Flavored Markdown |
I took @AkinOzer's comment and turned it into this example where I port-forward a postgresql database's port so I can make apg_dumpof the database:#!/bin/bash
set -e
localport=54320
typename=service/pvm-devel-kcpostgresql
remoteport=5432
# This would show that the port is closed
# nmap -sT -p $localport localhost ||... | I am usingkubectl port-forwardin a shell script but I find it is not reliable, or doesn't come up in time:kubectl port-forward ${VOLT_NODE} ${VOLT_CLUSTER_ADMIN_PORT}:${VOLT_CLUSTER_ADMIN_PORT} -n ${NAMESPACE} &
if [ $? -ne 0 ]; then
echo "Unable to start port forwarding to node ${VOLT_NODE} on port ${VOLT_CLUSTER_... | Kubectl port forward reliably in a shell script |
Dashboard can be deployed on any node. In fact therecommended yamlhastolerationskey which lets you prevent it from being deployed on master.Lines 229 - 232...
# Comment the following tolerations if Dashboard must not be deployed on master
tolerations:
- key: node-role.kubernetes.io/master
... | After installing a dashboard, the dashboard pod continued tocrashloopbackoffand when I googled, I saw a mention that "should be deployed only on the master node". Looking at the deployment of the dashboard pod, it seems that it has not been designated as master separately, and there is no related content in the officia... | Should the k8s dashboard be deployed only on the master node? |
Using Cron + PHP CLI to execute the script:Do not put that file under webroot.Using Cron + Wget to request the script:Pass a secret key to your script via post; check that key in your script. Example:Content of key.txt which resides on the server outside wwwroot:key=helloWget command linewget --post-file=key.txt http:/... | This question already has answers here:Run a script.php on cron job on linux/apache server but restrict public access to the php file(4 answers)Closed11 years ago.I need advise regarding safeguarding a file i created that runs on via cronjobs.Currently, i'm using HTTP_referrer from preventing direct access from unautho... | Restricting file running via cron job from direct access [duplicate] |
Specifying the linker option "/DEFAULTLIB:MSVCRT.LIB" causes the program to execute successfully.
|
Please see this question for some context: Linking unreferenced libraries breaks my program
I have the following program:
#include <iostream>
int main( int argc, char* argv[] )
{
std::cout << "Hello world" << std::endl;
int *p;
p = new int(3);
std::cout << *p << std::endl;
delete p;
return 0... | Resolving the Standard new/delete operators |
You could use regexps in server_name. So it's better to use two server blocks.
server {
listen 8080 default_server;
root /path/to/current/web;
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /site.php/$1 last;
}
...
}
server {
listen... |
What I want to achieve is pretty simple :
If the subdomain starts with admin, try to serve directly from controller admin.php for all other cases, try to serve files with site.php.
Note that I don't know domain names as a lot of domains are pointing to us.
What I tried so far:
server {
listen 8080;
root /path... | nginx "try_files" directive is not allowed here |
You need to set the legend formater to "{{le}}" | I'm using Grafana 4.3.2 with Prometheus 2.0 as the datasource.
I'm trying to display a Prometheus histogram on Grafana. The values I retrieve from Prometheus is like the following:http_request_duration_seconds_bucket{<other_labels>, le="+Inf"} 146
http_request_duration_seconds_bucket{<other_labels>, le="0.005"} ... | Grafana histogram displays wrong values (Datasource: Prometheus) |
You could pull with the ours merge strategygit pull --strategy=ours origin masterFromkernel.orgThis resolves any number of heads, but
the resulting tree of the merge is
always that of the current branch
head, effectively ignoring all changes
from all other branches. | What I want to do:Pull from my remote repository on github.Preserve all the files in my local repository and discard the ones from github.Push my "up to date" local repository into github.So imagine you've made a lot of changes in your local repository and is now very different from your github repository.I could do:gi... | Merge local repository with Github repository discarding remote files |
Update 1 May 2020:
Since this post is quite active, I need to update the answer:
So you have a few options to solve the issue:
You can put index.html in the Error document box (like Alan Friedman suggested).
Go to your bucket (the one that actually has the code - not the one you use to redirect) -> Properties ->... |
I deployed my React website build/ folder into an AWS S3 bucket.
If I go to www.mywebsite.com, it works and if I click on a tag to go to Project and About pages, it leads me to the right page.
However, if I copy and send the page url or go straight to the link like: www.mywebsite.com/projects, it returns 404.
Here's m... | react router doesn't work in aws s3 bucket |
In order to create the 2-dimensional board your wanting, where the size is input at runtime, you're going to have to actually dynamically allocate a board in memory ... you can't declare your board the way you've done in your class as zero-length arrays.
Code like this:
this->m_rows[numberOfRows];
does not initialize... |
I'm trying to code a Bingo Board in C++, but I'm doing something very wrong. I'm not sure what, but for whatever reason when I initialize the number of rows and columns, and do a nested for loop on the arrays I created to implement this structure, I get what appears to be more than a hundred rows and 30+ columns, when... | Needing an elegant solution to a simple, C++ bingo board |
In short, it has been solved by changing different versions of CUDA and ARCH code. If you want to use 2080, you must choose cuda10.2 with -DGPU_ARCH=sm_70. II have 3090 and 2080 on the HPC. I thought it was downward compatible but it is not. I googled it that someone says that 2080 does not support cuda11.4. | I am doing a relaxation calculation using gpu in a system of 800,000 atoms. Sometimes, I get the following error. Can you please tell me the cause and how to fix it?Cuda driver error 700 in call at file 'geryon/nvd_timer.h' in line 76.
application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0 | Cuda driver error 700 in call at file 'geryon/nvd_timer.h' in LAMMPS |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.