Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Tools that start with X are usually related to Xorg graphical system. If you have only console access to virtual machine,xclipwill obviously not allow you to copy to your system clipboard. It would be possible with some *DE and some extensions.Tip: If xclip isn't working, you can locate the hidden .ssh folder, open the... | I'm trying to copy ansshkey from my Linux VM but whenever I typexclip -sel < ~/.ssh/id_rsa.pub`I am prompted with:Error: Can't display: (null)I've been trying to followhttps://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/#platform-linux | Failing to copy ssh key to clipboard |
I faced a problem similar to yours. Your job might be failing because it requires anX sessionsince you're trying to open a web browser. You should putexport DISPLAY=:0;after the schedule in your cronjob, as in* * * * * export DISPLAY=:0; /usr/bib/python /full/path/to/script.pyIf this doesn't work, you could try replaci... | I am not able to execute the below attached python script via crontab. When I run script directly from CLI it works just fine, I see just a quick action how browser is opened, everything is setup and then browser closes. But when run in crontab, nothing happens.
Crontab entry:* * * * * /full/path/to/script.pyI also tri... | Python script not executed from crontab |
Unless yourstopAnimationTimermethod isinvalidate'ing andrelease'ing (and then setting tonil) youranimationTimerproperty, you're leaking memory.ShareFolloweditedMar 19, 2010 at 22:46answeredMar 19, 2010 at 21:49Shaggy FrogShaggy Frog27.6k1616 gold badges9191 silver badges128128 bronze badges1You meanrelease'ing instead ... | I tracked down a memory leak with instruments. I always end up with the information that the responsible library is Foundation. When I track that down in my code, I end up here, but there's nothing wrong with my memory management:- (void)setupTimer {
// stop timer if still there
[self stopAnimationTimer];
... | Is there an NSCFTimer memory leak? |
Unfortunately it is not possible. After spending a lot of time to figure it out, it turned out that those two filenames are hardcoded into a DLL. Everything which is not 'DEBUG' will use the 'RELEASE' files.Using different docker-compose.yml files by referencing them from different folder could be a solution, but since... | I'm in the process of setting up a .NET Core project with Docker in Visual Studio 2017. I've created the project and added the docker-compose to the solution, and everything works.But somehow, the VS won't build and run Docker with any configurations, other thanDebugandRelease.I've created solution and project configur... | Use custom Visual Studio run configuration with Docker |
2
There is no way to show all the issues of the main repo on your repo.
Share
Follow
answered Sep 30, 2021 at 15:22
jessehouwingjessehouwing
110k2222 gold badges264264 silver badges358358 br... |
I intend to work on an open-source project, I followed the below steps to start contributing according to this instruction:
1- Fork the repository
2- Clone your fork of the repo from your GitHub account to my local disk
3- Install the development dependencies
4- Add the upstream remote.
5- Synchronize my main branch w... | Original repository issues on forked repository |
If you are windows user and if you haven't installed git yet you can install git from the following link [https://git-scm.com/downloads].After that you can use the git bash instead of the command lineThis tutorial may help youhttps://www.youtube.com/watch?v=J_Clau1bYco | I am trying to clone a project from Github using my command prompt with command git clone url(of project) but I am getting 'git' is not recognized as an internal or external command error | Getting 'git' is not recognized as an internal or external command when I type git clone url in command prompt |
The"http://" + username + ":" + password + "@" + serverformat does not work on IE since IE9 I believe, supposedly for security reasons. I don't think there is a way to accomplish this well, short of changing how the server does authentication (e.g. custom user/session management/redirects/etc.). There are many user/ses... | I've been trying to make a login page with HTML and JS which uses my.htaccessfiles to access a website instead of having that ugly pop up window with the user:pass.I've got this code so far, which doesn't work. When I put in the username and pass, all it does is redirect to the page and opens its .htaccess<form name="l... | Login page that uses .htaccess |
This will happen if the node.js binary (node) is not installed in the $PATH anywhere.if you runenv nodeby itself, you will get the same error. It looks like this may be an Ubuntu bug:https://github.com/joyent/node/issues/3911Trysudo ln -s /usr/bin/nodejs /usr/bin/node- that will symlink the node.js binary from the name... | I am attempting to install the node.js module 'javascripting' (source code can be found:https://github.com/sethvincent/javascripting) and have been unable to install it as a global variable to run through the terminal.After installing node.js I attempted to install javascripting with the line: npm install --global java... | Trouble installing a module as a global variable -- /usr/bin/env not a directory |
Here's one way to do it:(1) Set up thecore_branch.git checkout -b core_branchYou can develop and push tocore_branchas normal(2) Check out a branch forextended_branchbased off ofcore_branch.git checkout -b extended_branch # be sure to do this while on core_branch(3) When onextended_branch, if you want to pull in changes... | Hie I am working around in git to achieve something like mentioned below.Imagine there is a Big feature which is going to develop - since it's very big they have split into core feature and an extended feature.Now they have divided into teams for development.Now how to make branches in a below-mentioned waythe core wil... | git - develop base and extended feature - commits in base should reflect in extended in pull |
2
The error itself is a syntax error - there aren't much code in C which looks like 'delete p'. Since 'delete' is not a predefined function in C(unlike 'return'. return 1 works just fine, though it looks somewhat like 'delete p'), it was regarded that a semi-colon would be ... |
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this ... | Unknown "delete" error in my C code [closed] |
1
There have been a lot of improvements made recently to stack ghci, which is still mostly a work in progress. I'd recommend testing out stack master, and if the problem still exists opening a Github issue.
Share
Improve this answer
Foll... |
I have a package with bunch of *.c and *.cpp files, listed inside c-sources field of *.cabal file. I need to include it inside a project with IHaskell and some other packages. Everything works fine, and builds without a problem. stack exec ghci works fine and I can import modules and execute any code. stack ghci thoug... | Stack/Docker/IHaskell weird behaviour |
You tend to think, "Oh how many cores my device has?" "Therefore I will launch that many amount of threads."
That way of thinking is wrong for cases like OpenCL/CUDA.
A core contains a limited amount of resources, memory and threads. Depending on how much each "thread" is going to use (therefore, depending on the cod... |
I think this might be a very stupid questions, but I'm very new to OpenCL and just got it running on my desktop computer with a GTX 760 GPU.
Now when I query for OpenCL's CL_DEVICE_MAX_COMPUTE_UNITS it says there are 6 on the GPU. Yet on the on-board gpu (Intel HD Graphics 4600) it says that there are 20.
This seems a... | OpenCL only show 6 parallel comute units on GTX 760? |
1
The address the memory will appear under depends on which user space context is currently mapped.
The way this works is, some of the virtual addresses are reserved to the kernel, and these are the same in all contexts. This is why you can set a break point on a kernel add... |
Mapped this memory in my Thread in Userspace:
b7fd0000-b7fd1000 rwxp 00000000 00:00 0
Thread is running (endless loop)
Made a breakpoint in the Kernel and trying to access it:
Thread 466 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 3908]
0xc10d4060 in kgdb_breakpoint ()
(gdb) x/01i 0xb7fd0000... | Linux - Accessing mmap()ed memory from Thread from Userspace in Kernel Space |
Faced similar problem.
Find the solutionhereJust to sum up:There is missing dependencies inside container which your own system already has. You should install them inside docker.Idk how but pyopenssl library should be install toSo, you need to add:RUN apt-get update \
&& apt-get install openssl \
&& apt-get install... | I'm new to Docker and I'm not very experienced in SSL/certificates etc.I'm working on a web application that lets the user log in to JIRA via JIRA API to do things. This works on my computer and I don't get any SSL errors. However, when I run it in a Docker container I getssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong... | Trying to log in to JIRA in Docker container and getting SSL: WRONG_SIGNATURE_TYPE error |
Please also check the Content-Type Header, since Apache and Nginx are sending different values:
Content-Type: text/html; charset=UTF-8
vs.
Content-Type: text/html; charset=utf8
Update your Nginx config, add this line:
charset UTF-8;
|
I use a very simple jquery.ajax() call to fetch some HTML snippet from a server:
// Init add lines button
$('body').on('click', '.add-lines', function(e) {
$.ajax({
type : 'POST',
url : $(this).attr('href')+'?ajax=1&addlines=1',
data : $('#quickorder').serialize(),
... | jquery.ajax() POST receives empty response with IE10 on Nginx/PHP-FPM but works on Apache |
According to POSIX, neither malloc() nor free() nor any of the other high-level memory allocation functions are signal-safe (mmap() and friends are though). You cannot call them safely in a signal handler as they are not required to survive being called from a signal handler.
The typical workaround is to set a flag in... |
What is the correct way to clean with free() dynamic allocated data in C when using signal?
Here there's an example with shared memory, and the used solution is to declare global variable, but seems not very clean and secure.
This is an example code with an array of structure dynamically allocated not corretly cleaned... | Clear dynamic allocated data with signal |
I couldn't reproduce your issue on my side withgit push origin master. You may try to create a light local Git Repository and test whether you can reproduce this issue.You may try pushing with--no-thinargument to see whether it works. | I am trying to migrate from svn to TFS git. I setup a new git repository in my local disk and I have all the history from svn. Now I want to push the code to centralized Repo in TFS. I created a new Repo in TFS and I tried the followinggit remote add origin http://remoteserver:8080/tfs/DefaultCollection/MyProject/_git... | Unpack Failed Error while Setting up Git Repository in Team Foundation Server (TFS) |
Remove 3rd line, because it doesn't make sense (because X509Certificate2 class doesn't support CRLs) and use 'certbyte' variable on a 4th line:private static void generateCrl()
{
byte [] certbyte = File.ReadAllBytes("D:\\certsunzip\\DODIDCA_44.crl");
Console.WriteLine("First byte: {0}", certbyte[0]);
string... | I need to convert a bunch of certificate revocation list in .crl extension,they are in DER format (Binary), and I need to convert them into PEM format (Base64 string representation of the binary content of each .crl file).As per instructions inConvert .der to .pem using OpenSSL-Net, I have created the following code tr... | Convert different certificate revocation list formats in .net |
In step 8, you need to tell git which repo and branch to push the project to. Since you added an origin, you would...git push origin masterSince the project has now been pushed, add this to your package.json file."homepage" : "http://rahman23.github.io/cartdemo"then run:yarn buildin the console, and try pushing it aga... | I am trying to publish my react app on github.Here are the steps that I have followed.1-I have installed git on my windows.2- In Visual Studios terminal I have written git init3-Then I have created a repository on github called "cartdemo"4-In my package.json I have changed homepage, made the private false and added "de... | How do I publish my react app on github properly? |
I tried this out on my VPS, and using thealiascommand worked for me:server {
listen 80;
server_name something.nateeagle.com;
location /something {
alias /home/neagle/something;
index index.html index.htm;
}
} | I have files at/Users/me/myprojectand I want to serve them athttp://stuff.dev/somethingusing a simple nginx config. In the/Users/me/myprojectfolder is something like:index.html
scripts/
app.js
styles/
style.cssSo I really want to be able to accesshttp://stuff.dev/something,http://stuff.dev/something/scripts/app... | How to serve a directory of static files at a certain location path with nginx? |
You can try to use sed in order to extract only the table you want.Let say the name of your table ismytableand the filemysql.dumpis the file containing your huge dump:$ sed -n -e '/CREATE TABLE.*`mytable`/,/Table structure for table/p' mysql.dump > mytable.dumpThis will copy in the filemytable.dumpwhat is located betwe... | I have a mysqldump backup of my mysql database consisting of all of our tables which is about 440 megs. I want to restore the contents of just one of the tables from the mysqldump. Is this possible? Theoretically, I could just cut out the section that rebuilds the table I want but I don't even know how to effectively e... | Can I restore a single table from a full mysql mysqldump file? |
Use the index nginx directive to make app.php the default handler of http://domain/ requests:
server {
...
index app.php;
# your locations here
}
|
I have been stucked with this for a while. We have a Symfony 2.8 project and I want to deploy it to the cloud. I have properly created the ElasticBeanstalk environment and it works! But I still need to access http://domain/app.php in order to make it work. I managed to delete web/ changing documentDirectory part from ... | Change root file aws nginx server |
You can connect to database instance in RDS by using the endpoint and the credentials associated with the rds instanceRefer the below link for guidance:http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.Oracle.htmlAlso ensure that the security group associated with the RDS inst... | I'm trying to connect into my mac with the endpoint that AWS give me but i can't. | Is possible to connect to RDS Oracle DB instance with SQL developer? |
28
These days you can also use global option -chdir:
The chdir option instructs Terraform to change its working directory to the given directory before running the given subcommand. This means that any files that Terraform would normally read or write in the current work... |
Is there any way (or workaround) to specify the working directory when running terraform apply or terraform plan ?
For example :
terraform apply working_dir/vpc
terraform apply working_dir/dns
terraform apply working_dir/postgres
terraform apply working_dir/service-a
terraform apply working_dir/service-b
I know there... | Terraform : Specifying the working directory when running terraform apply/plan |
This takes a bit of effort if you want to use zenity or notify-send. I didn't get it working yet but I just used xmessage instead:Easy option 1: xmessage (in the script)MSSG="/tmp/mssg-file-${RANDOM}"
echo -e " MESSAGE \n ==========\n Done with task, YEY. " > ${MSSG}
xmessage -center -file ${MSSG} -display :0.0
[[ ... | Working on a script to auto-upload files that are placed in a directory, and then display a link to them to the currently logged in user. Users of the machine will be authenticated via LDAP.The directory that is being watched by incron is outside of any of the users' directories, and is symlinked to the /home/username... | Using Zenity in a root incron job to display message to currently logged in user |
This could be a source path issue, maybe you don’t analyze the same sources. Do you have any excluded source files in Jacoco and Jenkins that you didn’t exclude in SonarQube properties, or vice versa? | I'm using Jenkins+Jacoco+Sonarqube to test my code. In Jenkins, my mvn command is:mvn clean install sonar:sonar.After code build in Jenkins, I am able to see the code coverage in Jenkins.
But I cannot get proper coverage percentage in SonarQube. | How to integrate Jacoco report in Sonarqube |
The SQALE definition goes in a different file, but can still be defined via XML. Take a look at how it's done in the PMD plugin:https://github.com/SonarCommunity/sonar-pmd/blob/master/src/main/resources/com/sonar/sqale/pmd-model.xml | I have a plugin that creates a repository and defines rules within it using a xml file with rules defined for example:<rules>
<rule>
<key>KEY</key>
<name>RULE_NAME</name>
<severity>BLOCKER</severity>
<description>DESCRIPTION</description>
</rule>
</rules>I want to add technical d... | Sonar plugin, set Technical Debt for a rule in xml |
nginx chooses one location to process the request. See this document for details.
The regular expression location block takes precedence over regular prefix location blocks, so any URI ending with .php will be processed by your location ~\.php$ block, irrespective of whether or not it begins with /example. See this do... |
In my php.ini, I have disabled allow_url_fopen. I would like to enable it for my /example directory as shown below, but it does not work. However, if I move the directive to allow it from /example to the ~.php$ location above it, then it works fine. I'm thinking that the /example location block is never processed. Any... | Allow php value to only work in a subdirectory |
One reason I can think of is forusing a tool or commandthat is not available in your container. This example below comes directly from thedocker rundocs:NETWORK: CONTAINERExample running a Redis container with Redis binding tolocalhostthen running theredis-clicommand and connecting to the Redis server over thelocalhost... | Why would you connect two docker containers via network namespace, and not just through one network?As far as I know the only difference is that you can call the other container using localhost. I don't see any use case where this would be necessary.Does anyone have experience with this? | Why would anyone use the same network namespace for two docker containers? |
First, you'll probably want to useREQUEST_URIinstead ofREQUEST_FILENAME. They may be the same in a virtual host scenario, but not normally. You're probably meaning to rewrite the URI, not the local path.Secondly, your rule;RewriteCond %{REQUEST_FILENAME} !^/...excludes all requests to somethingstarting with/, that isal... | I have a bit of a problem with a mod_rewrite configuration.I want to redirect everything to the root directory (http://www.mydomain.com/), except for two files.So I tried this:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^/
RewriteCond %{REQUEST_FILENAME} !/file1.html
RewriteCond %{REQUEST_FILENAME} !/file2.html
R... | mod_rewrite: how to redirect everything except 2 files to "/"? |
You can, Prometheus allows to scrape metrics exposed by external services: obviously they need to respect Prometheus format but I saw thatit's possible.You have to create static endpoints and related service:apiVersion: v1
kind: Endpoints
metadata:
name: ambari-metrics
labels:
app: ambari
subsets:
- addresses:
... | I'm running a 3 node k8s cluster where I have a prometheus instance that scrape my services metrics using object like serviceMonitor. In addition to my cluster services metrics, I would like to get metrics from an ambari-server. I know that it is possible to import ambari metrics as a datasource in grafana but I haven'... | Is it possible to send metrics to prometheus? |
Normally this type of cleanup is the job of your release scripts, i.e. a process that cuts release archives (or whatever else you release) based on your working tree. I think most people don't see the need to clean it up right in the repository.Of course, that doesn't mean you can't do it if you want to. You can simply... | I have a git repo for my project which is loosely based on GitFlow. I have a master branch, development branch (where all the work gets done) and a release branch.My repo depends on a few submodules, which I want to continue to track as these submodules get updated, however, I don't want my release branch to contain th... | Git Branches - How to have a clean release branch without submodules |
The easiest way is to append the source string with some random parameter, which gets ignored on the server side
<script src="mySaveFiles.json?nocache=123" ></script>
One solution would be to generate the script element using JavaScript and append the current time like this:
var el = document.createElement( script );... |
So I'm making this little project and I'm having some troubles with catching. One thing that's not working is the browser keeps caching the json file that contains save data and when I update the json somewhere else, the browser goes back to the old version of the json file that it has cached and reads off that. Unfor... | How to prevent the browser from caching a json file |
I believe you can't pass an array to the ENV variable.
But you can pass it as a string, and then, later, parse string at your application.environment:
- DS_AEROSPIKE_HOSTS='192.168.33.10,192.168.33.11'the valid docker-compose.yml syntax is stated at docshttps://docs.docker.com/compose/environment-variables/I'm not fa... | I have an application that on play that use aerospikein application.conf i have a param that i can rewrite from environmentsaerospike.hosts = ["192.168.33.10"]
aerospike.hosts = ${?DS_AEROSPIKE_HOSTS}how i can set list of hosts in my docker compose file?version: '3.1'
services:
ds-aerospike-db:
image: aer... | In docker compose file set environment as list |
You can’t. There are no API calls available for this information at the moment. I’ve been wanting to get that information myself as well 😕. | Are there any commands that enable the fetching of the dependencies for a repository on github?On Github, under the 'Insights' tab, I can see the dependencies, by pressing the 'Dependencies Graph' button, and that displays all the dependencies for the project.My question is, can I write a script, to fetch these depende... | Fetch dependencies from a project in Github using CLI |
Dont use a Self Signed Certificate, and if you can to ignore authentication, then there is no good reason to use ssl.For avoiding Self Signed Certs:
Set up a personal CA (extremely easy to do with Microsoft's CA). Then issue the server certificates from your own CA and give the CA's certificate to each of the servers a... | I have made a Silverlight 3.0 application, which communicates with an xml rpc server over https. The whole application will run in a LAN enviornment where server can be installed on different machines and client will on on same machine. I am using Self signed certificate which is generated against ip of server and I ne... | SSL certificate for LAN enviornment |
4
shared_ptr<int> holds an int* pointer to a single int. That int is expected to be allocated with the new operator (preferably via a call to std::make_shared<int>(value)), and will be freed with the delete operator.
shared_ptr<int[]> holds an int* pointer to the 1st elemen... |
I have a class variable ptr, I want it to point to the first element of my 1D int array.
What is the difference between these two statements, and which one should I use?
shared_ptr<int> ptr1;
shared_ptr<int[]> ptr2;
| What is the difference between shared_ptr<int> and shared_ptr<int[]>? |
In Ubuntu, this is the command which works for me:Sort by MEMORY Usage:kubectl get po -A -owide | grep ${NODE_NAME} | awk '{print $1, $2}' | xargs -n2 kubectl top pod --no-headers -n $1 | sort --key 3 -nr | column -tSort by CPU Usage:kubectl get po -A -owide | grep ${NODE_NAME} | awk '{print $1, $2}' | xargs -n2 kubect... | kubectl top pod --all-namespaces | sort --reverse --key 4 --numeric | head -10gives top pods in a cluster. How to get top memory consuming pods per node? | kubectl command for finding top memory consuming pods per node |
Firstly you need to understand how ArrayList works. It stores "references" or "pointers" to actual storage in an internal object arrayelementData. This array of references may well be contiguous, but is JVM specific. The actual objects being added are stored on the heap, and almost certainly won't be contiguous, althou... | When we usenew ArrayList()is memory contiguously allocated?
If we calllist.add(e)10 times, will all elements be contiguously stored in memory by add order, or will they be randomly stored in memory? | is memory contiguously allocated for arraylists? |
you can try this to bindrequeststo selected adapter/IP but first installrequests_toolbeltpip install requests_toolbeltthenimport requests
from requests_toolbelt.adapters.source import SourceAddressAdapter
# default binding
response = requests.get('https://ip.tyk.nu/').text
print(response)
# bind to 192.168.1.55
sessi... | I cannot use request proxy to connect to https with my local ip
192.168.1.55 is my local ipif i hide the https line for proxy, it works, but i know that it is not actually using the proxiesimport requests
ipAddress = '192.168.1.55:80'
proxies = {
"http": "%s" % ipAddress,
#"https": "%s" % ipAddress,
}
url = 'http... | Python cannot bind requests to network interface |
Doc is your friend:https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/generic-oauth/#role-mappingYou need to configure role mappingrole_attribute_path+role_attribute_strict = truewhich denies user access if no role or an invalid role is returned. | I have tried to implement sso in grafana using Oauth and ping id which is working as expected .
Access token provides the list of attributes, it shows all groups that i'm member of .so My workaround is to only members of the group mydomain_Monitoring_Portal can able to join sso using grafanaUsed data-
{
"scope":[]
... | Grafana sso using auth.generic_oauth |
The best practice is to cache generated images and allow the webserver to serve them.Use a webserver such as Apache or Nginx in front of your Rails app, and make sure you write the image to a location where the webserver can serve it. So if your Rails route evaluates to/dynamic_images/3.png(which callsdynamic_images_co... | I am using the rmagick gem for generating dynamic images from a controller. The controller takes an id as a param, does a look up on a model, writes text over an existing image, and outputs it.I have run some benchmarks comparing generating it for every request versus writing to disk and usingsend_datato output it if i... | Caching dynamic images in Rails |
If you must make SonarQube happy & useInitialContextconsider usingPropertiesSee:https://docs.oracle.com/javase/8/docs/api/java/util/Properties.htmlSo instead of:final Hashtable<String, Object> jndiProperties = new Hashtable<>();Use:final Properties jndiProperties = new Properties();Note from the JavaDocs:Because Proper... | Im having trouble replacing hashtable for hashmap because the method im using receives a hashtable:private Context getInitialContext() throws NamingException {
final Hashtable<String, Object> jndiProperties = new Hashtable<>();
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"... | Sonar: Replace the synchronized class "Hashtable" by an unsynchronized one such as "HashMap" |
This is available through theOpenTelemetry packages. In my own applications I use the following to add OpenTelemetry metrics for the runtime and process metrics and publish them to Prometheus :public static IServiceCollection AddOtelMetrics(
this IServiceCollection services,
string[]? names=null)
{
services.Ad... | I am going to publish some of the statistics provided by event-counter as metrics.
There are many pre-defined ones in the framework as we can seehere.How I can access the information (that is available through dotnet-counters)? | How to access dotnet core event-counters on code - publish as metrics |
There are lots of differences between Android 2.x and Android 4.
An example is how bitmap memory is managed:
On Android Android 2.2 (API level 8) and lower, when garbage
collection occurs, your app's threads get stopped. This causes a lag
that can degrade performance. Android 2.3 adds concurrent garbage
collection, w... |
We have developed NDK prototypes for a simple project. The code is compiled and working on device and in simulator. However when looking in the settings menu on the phones: (Samsung Galaxy Nexus(Android 4.2.2), Samsung Gio(Android 2.3.6)), running the app on the Gio takes a lot more space than when the app is run on t... | Do Android devices use different amounts of heap and footprint for the same app |
17
$ is what you see in sh. In zsh you probably see [path@user] $ or something like that. You just mustn't copy this dollar sign. What you copy should by ONLY:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Share
Improve this answer
F... |
I'm trying to configure github with my macOS system. I use iTerm and zsh. When I try to generate a new ssh key according to the instructions from the https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key I get an error "zsh: command ... | generating SSH key for github: "zsh: command not found: $" |
Currently, because of the way nginx is built, this is not possible.https://github.com/symfony/symfony/issues/2432 | I have read that I should dump symfony2 routes into my web server to bypass the symfony2 router, for performance. I found an example forapache.How would you go about doing this for nginx? | How to dump Symfony2 routes to nginx? |
You can develop your own helm charts. This will pay back in long perspective.Other approach: there is an easy and versatile way is to put${MY_VARIABLE}placeholders into the deployment.yaml file. Next, during the pipeline run, at the deployment job use theenvsubstcommand to substitute vars with respective values and dep... | I have a node.js (express) project checked into gitlab and this is running in Kubernetes . I know we can set env variables in Kubernetes(on Azure, aks) in deployment.yaml file.How can i pass gitlab ci/cd env variables to kubernetes(aks) (deployment.yaml file) ? | How to pass gitlab ci/cd variables to kubernetes(AKS) deployment.yaml |
this to enable apache mod_rewriteRewriteEngine onthis two lines mean that if the file with the specified name in the browser doesn't exist, or the directory in the browser doesn't exist then procede to the rewrite rule belowRewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-fRewriteCond basically mea... | I'm looking for help with understanding how a particular .htaccess file works.RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]Here's what I think I understand so far:Line 1: allow Apache to change urls based on certain rules?Lines 2,3... | Understanding .htaccess file |
You could try using these rules, but unfortunately if a browser decides to cache a request, there isn't anything we can do toforceit not to.FileETag None
<IfModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Head... | For our development server I have an interface where people can add their IP temporarily to the list of allowed IPs. If someone tries to access an url from an IP that is not on the list, it is redirected to the IP add interface. But once the IP is added, the original url that was requested still redirects to the interf... | .htaccess; browser caches the error redirect |
Clear cache and wait for some time before you start again (could take long). This issue happens most of the time as the issue occurs when using multiple instances of docker playground that is opening multiple tabs.
|
docker command
$ docker run -d --rm -p 8888:8080 tomcat:9.0
When I use my default browser, I get the error no space left on device.
when I use other browser with different docker account, It works.
$ docker ps
Is the issue with the browser or my docker account?
| docker playground: no space left on device in default browser |
You asked a difficult question. I think I can make it bit easy for you.First let's look at the differences in the options.Serving the front end appOption1: Django to servereact appIn this option, the Django app will serve your app in a route for e.g/app/. Basically the route/appwill load react app's index.html. it's th... | I am very new to deploy Django and AWS. So now I would like to deploy my separate project (drf+react) to AWS.So How can I deploy the separate project to AWS?EC2 vs Elastic BeanStalk which one is better for that kind of environment?I already search for one day but I found nothing useful information and found the similar... | How to Deploy Django Rest Framework and React on AWS |
Thehttp_server_requests_seconds_bucketmetrics count the number of requests since last service restart with durations smaller or equal to thelelabel value. For example,http_server_requests_seconds_bucket{le="0.1"}counts the number of requests with durations smaller or equal to 0.1 seconds (e.g. 100ms).The number of buck... | I have a simple API application running and I'm using a custom Post manager to 'PUT' here periodically. My concern is that some of the 'PUTS' are taking over 50ms to complete .
In Grafana I setup the following prom QL query to try and find these requests(sum(rate(http_server_requests_seconds_bucket{exception="None", ap... | Grafana Latency Query |
47
Going to elaborate on user3470009's answer.
The main, advertised purpose of the DeletionPolicy is to keep a resource when a stack is deleted. It's mentioned almost as an afterthought in the AWS docs for DeletionPolicy that it also functions during resource removal fro... |
I have a cloudformation template that creates an S3 bucket as part of a cloudformation stack. On the new version of my template, I 'm planning to migrate my application from S3 to EFS.
Is there a way to remove the S3 bucket resource from the template, without having it deleted? Ideally, I would like my older users to... | How to remove a resource without deleting it during a cloudformation stack update |
Job Config History Plugin also tracks system configuration. Just click onJob Config History(on the left-side menu) on the main dashboard (outside of any job). When there, you can see all server configuration changes with all features like diffs and raw XML access.ShareFollowansweredMar 5, 2020 at 16:16TupteqTupteq3,016... | I'm looking for something like theJob Config history pluginbut to log the changes in the Jenkins server itself (any change under the /manage section or credentials).I tested theAudit Trail plugin, but it only logs who and when, but nothing about the content of the change.I'm using the roles based strategy, so there is ... | Is there a way to log changes in Jenkins server configuration? |
If they're both on your host network, they can talk to each other just like normal applications talk to each other: via localhost. So you don't need the bridge at all. | I have 2 images that I want to talk to each other via compose's default bridge network, but I also want them to be able to access my host network.To allow images to talk to each other within compose's default bridge network, I don't need to do anything:version: '3.4'
services:
hello:
image: hello-world
world:
... | Docker Compose use both host and bridge network |
Change your rule to:# external redirect from actual URL to pretty one
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?page=([^\s&]+) [NC]
RewriteRule ^ /%1? [R=301,L]
RewriteRule ^([a-z0-9-]+)/?$ /index.php?page=$1 [QSA,L,NC]Reference:Apache mod_rewrite Introduction | I always suck at .htaccess
I'm trying to have a website where all requests go though index.php but i'd like the URL to be like www.sample.com/home. effectively that url would load www.sample.com/index.php?page=homeRight now I haveRewriteRule ^/([a-z0-9-]+) /index.php?page=$1 [NC,PT,L]Which doesnt work even though regex... | redirect without changing url |
I probably can't suggest thebestsolution for you but I'll try to give some ideas:Hazelcast: offers very easy to use distributed map (and lot's of other things worth to have a look at - distributed SQL Query is very neat):Map<String, Object> map = Hazelcast.getMap("xxx");and you are done. Work on the map using standard ... | Currently we have 2 app severs, each has application level cache and has centralized database server. To keep both servers app cache in sync we have set up JMS broker in between. On cache clear on one server which sends message to JMS, since other is registered so it will get the message and clears the perticular entry... | Centralized cache server. (Ehcache or Hazelcast) |
0
Resetting the password seems to be a solution.
The email should arrive within a few minutes in case of setting a new password, even if you had problems in the authentication process.
Share
Improve this answer
Follow
... |
After reinstalling windows on my machine, i have tried to login to my Github account using the same user-name password stored in the browser with my Microsoft account...
with Sign in to GitHub
Username or email address page:
its seems to accept the credentials (tried with email as well with username) and then navigate... | GitHub device verification email not received |
Any particular reason for following slightly older examples even though you are using release 1.1 .You have setup of Kubernetes in release 1.1 @https://github.com/hyperledger/fabric/blob/release-1.1/examples/e2e_cli/end-to-end.rstHyperledger fabric seems to be evolving towards use of Cello for complex networks -http://... | We have been developing blockchain-app using Fabric-Nodejs SDK (1.1.0) and trying to make it work with Fabric (1.1.0) on kubernetes. Have referred and following links -https://hackernoon.com/how-to-deploy-hyperledger-fabric-on-kubernetes-1-a2ceb3ada078,https://github.com/IBM/blockchain-network-on-kubernetes.So far we c... | Undefined Error when deploying Fabric 1.1.0 on Kubernetes with Fabric Nodejs SDK 1.1.0 |
Officialmariadb docker imagehas built-in enviromental variablesMYSQL_USERandMYSQL_PASSWORD:These variables are optional, used in conjunction to create a new user
and to set that user's password. This user will be granted superuser
permissions (see above) for the database specified by the
MYSQL_DATABASE variable. ... | So this is my Dockerfile,FROM mariadb:10.3.5
RUN apt-get update & apt-get upgrade -y
ENV MYSQL_USER=user1 \
MYSQL_USER_PASSWORD=pass5 \
MYSQL_DATABASE=db \
MYSQL_ROOT_PASSWORD=XXX
ADD . /
WORKDIR /However, this does not add my user1 to the database build. The root password works but that is it. I have c... | Docker Not Adding User To MariaDB With Dockerfile |
GitHub lets everybody download the whole git repository, which contains the whole project history (meaning the state of the repo at every commit can be rebuilt). You can even read and search the history online without cloning.So yes, it's easy to find what you thought you deleted (you can have fun yourselfsearching for... | I pushed my api key to github and pushed another commit that hid it.
Can someone who clones my repo get the key from the earlier commit? | Can someone who clones my repo get my api_key from earlier commits? |
I didn't find any way how to achieve this, so i created a repo with a small mock service for the SignalR service. I hope I am allowed to post such stuff here.
My repo and my docker image
Feel free to use / fork it. I am not sure if I will ever find any time to maintain it.
|
I am currently writing tests for an existing project based on azure functions. The project uses signalr to send live update messages to the clients.
For my tests I am currently using a signalr instance, that is running in the cloud, but I need to replace it by a "local" instance on the system, that is running the test... | connect azure functions to local signalr instance |
You will need to ensure you select 'Enable IdP sign out flow' on your SAML Identity provider in Cognito. After navigating your browser to the logout endpoint, you should then be redirected to the SAML IDP logout aswell.https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managing-saml-idp-consol... | I'm trying to use Federated Authentication to enable login with Microsoft AD. It works fine and we can login. But when I call LOGOUT endpoint as the documentation says (https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html) and try to login again I'm not being redirected to Microsoft page to ty... | How to use Cognito LOGOUT endpoint to really log out? |
The simple answer: These declarations rewrite every request to arewrite.phpfile.The more comprehensive answer: TheRewriteCondandRewriteRuledirectives are from theApache module mod_rewriteand provide a rule based URL rewrite mechanism.It seems that these rules are intended to rewrite every request to arewrite.phpfile, e... | I am a newb to PHP. Can anyone tell me what each line does here. Do I need this? It is giving me errorsRewriteCond %{REQUEST_URI} /~([^/]+)/?
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /~%1/rewrite.php?p=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} /~([^/]+)/?
Rewr... | What do these declarations mean in my .htaccess file? |
Been told it’s a known issue.The solution is to create a proxy for your opensearch cluster and let it get internet access to connect to grafana.No idea on timelines for AWS to build / fix the problem :( | We have an AWS Org with AWS Grafana running in the root account setup with Org access.We have successfully connected to AWS Prometheus and other data sources across different organization accounts. But cant get AWS Grafana to connect to Amazon OpenSearch that is hosted in a VPC.If you look at Grafana -> AWS Data Source... | AWS Grafana connecting to AWS Opensearch `OpenSearch error: Bad Gateway` |
You can do a list comprehension:list = [[0,1],[0,2],[1,3],[1,4],[1,5]]
list.append(list[0])
list = [x + [0] for x in list]
print(list)
# [[0, 1, 0], [0, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [0, 1, 0]]EDIT: The trick here is, usingx + [0]within the list comprehension. This way new lists are created, thus you do not... | This is probably a very basic question but I dont know what I have to search for to find the answer for it:I have this code:list = [[0,1],[0,2],[1,3],[1,4],[1,5]]
list.append(list[0])
for i in list:
i.append(0)
print(list)This List will later be used as coordinates for a curve. I need to duplicate the first coor... | How to iterate over a list that has duplicate values? |
This is probably an issue with the browser cache as I am not being redirected to HTTPS. You can try clearing your browser cache or opening the page with an incognito window. In any case, I do not get redirected to https when I click the link or any other link on that page. | A year ago I have done something which i can't remember anymore which allowed me to redirect all HTTP traffic to HTTPS after installing an ssl certificate.Now I spent 2 days looking for the code which may be causing the redirection and I couldn't find it. it's not on .htaccess and its not a server configuration issue. ... | Laravel 5 is redirecting http to https ? How to disable this? |
It turns out this issue is caused by a possible bug in the memory-profiler library that is used in the kedro.extras.decorators.memory_profiler.mem_profile decorator.
The kedro decorator makes use of the memory_usage function in the memory-profiler module. It is used to sample the total memory being used by the running... |
I am working on a Kedro 0.17.2 project that is running on out-of-memory issues and I'm trying to reduce the memory footprint.
I'm doing the profiling by using mprof from the memory-profiler library and I noticed that there is always a child process and memory seems to duplicate in the main process after the first comp... | Kedro - Memory management |
<div class="s-prose js-post-body" itemprop="text">
<p>Push URL should be like below. It works for me.</p>
<pre><code>application live {
live on;
record off;
push rtmp://d-myamsacc-usct.channel.media.azure.net:1935 app=live/x4t/x4t;
}
</code></pre>
<p>My sample url is <code>push rtmp://p***2-p**i... | <div class="s-prose js-post-body" itemprop="text">
<p>I'm trying to redirect an RTMP streaming from my pc into Ngninx using the <a href="https://github.com/arut/nginx-rtmp-module" rel="nofollow noreferrer">nginx-rtmp-module</a> following the <a href="https://github.com/arut/nginx-rtmp-module/wiki/Examples#forward-live-... | Nginx RTMP streaming is not reaching the RTMP endpoint |
Remove your currentmasterbranch and then create it new from theengineersbranch, so that you then have two branches with an identical status.First step:git checkout engineersThen delete theoldmasterbranch with:git branch -D masterNow, you have justonebranch, which is namedengineers. Now you can create from there anewbra... | I have a GitHub repository with 2 Branches: master , engineers.
All my files and folders are in engineers branch. The master branch is empty.I downloaded the GitHub Desktop, login using my GitHub account, then clone the project.Now, I want to move everything in engineers branch to master branch. I follow different tuto... | How could I move all my files and folder to the master branch in GitHub? |
0
The more generic search documentation is "Understanding the search syntax", based on "About searching on GitHub"
GitHub search uses an ElasticSearch cluster to index projects every time a change is pushed to GitHub.
Issues and pull requests are indexed when they are crea... |
It seems like all the filters currently use logical AND by default. E.g. is:issue label:bug bug in:title basically does is:issue && label:bug && bug in:title.
My question is, whether it’s possible to make a query like: is:issue && label:bug || bug in:title.
Related: Can I search github labels with logical operator OR?... | Using logical operators when filtering Github issues |
I figured it out once, then recently I updated my grafana instance that wiped my work and I had to figure it out again. It was tough the first time.You can use the labels that are made available through prometheus in your summary and description sections in your alerts by using the syntax:{{$labels.instance}}{{$labels.... | I am currently setting up grafana alerts. How do I customize my message template so my alert email shows The ip address of the server, the state of the server and the node/instance?Thank you. | Grafana message templates |
1
The container-selinux package is available from the rhel-7-server-extras-rpms channel. You can enable it using:
subscription-manager repos --enable=rhel-7-server-extras-rpms
But if you do not have any subscription for Enterprise Linux, you can use CentOS Extra repo as a ... |
I have tried to install Docker CE in my system and it ends with some problem.
I did the below steps:
sudo yum install -y yum-utils – No error
sudo yum-config-manager --add-repo
https://download.docker.com/linux/centos/docker-ce.repo - No error
sudo yum makecache fast – No error
sudo yum -y install docker-ce – Failed ... | Installing Docker CE in redhat |
Recently ran into this exact issue. We moved some 301s off our server onto the registrar. However, Google still had our HTTPS site indexed, and when people clicked those links from the SERP page, they would get an error because the Registrar was not setup with SSL certs for those domains.One important point to remembe... | let's say I have a website onhttps://example.comand I want to migrate everything overhttps://newexample.com, I would like to do the 301 redirect via the domain registrar (ex. Namecheap). Is it possible to redirect from there also the https version?The only thing I have been able to do is the redirect via htaccess, but ... | Redirect domain with HTTPS directly from Domain registrar |
I realized that after uninstalling the consul, the mutatingwebhooks of the consul are not removed. Went ahead to remove the 2 consul webhooks fromkubectl get MutatingWebhookConfiguration <consul-webhook-name>. But I am not sure why the webhooks aren't removed when the uninstall command was ran. | I was testing out consul on my k3s cluster. After testing it out, I have removed the consul namespace and did a helm uninstall. Consul should be completely removed from the k3s cluster. However, I am getting the following error below for any application deployments. It seems like somewhere in the k3s cluster, there are... | Consul was uninstalled from k3s cluster yet it is still trying to inject to deployment |
As others have mentioned I needed to grab the home directory environment var.
However I implemented it like this:homePath, _ := os.LookupEnv("HOME")
//
getNsCmd := cmd.NewCmd("kubectl", "--kubeconfig", homePath+"/.kube/<kube-config-file>", "get", "ns") | I am making a call to kubectl from with a Go module like so:getNsCmd := cmd.NewCmd("kubectl", "--kubeconfig", "~/.kube/<kube-config-file>", "get", "ns")It works if I set the path like this:getNsCmd := cmd.NewCmd("kubectl", "--kubeconfig", "../../../../.kube/<kube-config-file>", "get", "ns")I am using theGo cmd packageC... | Setting absolute path does not work in Go for kubeconfig |
I finally found what was the problem.Theroleandrolebindingmustbe created inside the targeted namespace.I changed the following role and rolebinding types by specifying the namespace inside the yaml directly.kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: lockdown
namespace: lockdown
rules:
- api... | I'm trying to lock down a namespace in kubernetes usingRBACso I followed thistutorial.I'm working on abaremetal cluster(no minikube,no cloud provider) and installed kubernetes using Ansible.I created the folowingnamespace :apiVersion: v1
kind: Namespace
metadata:
name: lockdownService account :apiVersion: v1
kind: Se... | RBAC not working as expected when trying to lock namespace |
--with-compat --add-module=/path/to/ngx_http_geoip2_moduleor--with-compat --add-dynamic-module=/path/to/ngx_http_geoip2_moduleShareFollowansweredSep 24, 2021 at 11:39Игорь lockservice-proИгорь lockservice-pro3122 bronze badges11As it’s currently written, your answer is unclear. Pleaseeditto add additional details that ... | I'm trying toconfigurenginx to build the GeoIP2 module, by following this installation:https://github.com/leev/ngx_http_geoip2_modulefirst I still didn't understand what is defrences betweenstaticanddynamicmodules,
and why can't I justapt installthat module..The problemm is that I want to build/create it on a diffrent ... | add Nginx 1.20.1 GeoIP2 module |
-1Below solution will definatly work for you.WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--ignore-certificate-errors");
System.setProperty("webdriver.chrome.driver",
System.getProperty("user.dir")+"/Drivers/chromedriver.exe");
driver = new ChromeDriver(op... | I am not able to accept SSL Certificate in selenium chrome driver while accessing application urlfirst i need to access url, then i have to accept ssl certificate.. But while accessing url itself, ssl will get display and am not able to accept the certifictae since url is not opened yetCan somebody help on this | How to accept SSL Certificate in selenium chrome webdriver |
After installing the latest update of GCloud locally and re-running the deploy cron script. The cron jobs now run as before. 02/02/2021. | I recently updated my cron.yaml file and now my cron tasks fail with no entries in the logs.It is acting like the java servlet at the url is not being run.I can paste the url into a browser and the servlet runs fine.My cron.yaml file:cron:
- description: Daily revenues report
url: /revenues
schedule: every d... | App Engine Cron Tasks fail with no entries in log. How to debug? |
You seem to be confusing absolute URIs with a requirement for a DNS lookup.Given an HTML document onhttp://example.com/index.htmlthen the only difference between these two script elements:<script src="/foo.js"></script>
<script src="http://example.com/foo.js"></script>… is that the latter has an additional 18 bytes of ... | If I reference javascript files in my header using full domain names is it slower to load than if I do it some other way?$domain = 'https://www.example.com';
echo '<script src="'.$domain.'/js/index.js"></script>';The problem is if I wasn't going to reference them directly I would need some way of handling it so they l... | Loading Javascript and CSS files without DNS calls |
Youcannotconvert a x509v1 to a X509v3 certificate without reissuing. seethis poston openssl-users for more information | how to convert X.509 v1 certificate toX.509 version 3 | how to convert X.509 v1 certificate to X.509 version 3 |
the solution:
Login on your aws console;
Click on Route 53;
Create Hosted Zone;
Select your new created host title and click "Go to Record Sets", take note of the nameservers;
Login on your Godaddy account;
Select your domain;
Go to Nameservers and click SetNameservers;
paste all the four you took from "Go to Record S... |
Since Godaddy went down for some hours my client and I are very upset and want to change everything to AWS.
Everything is done so far, only the domains (blablabla.com) are missing, I'm having a hard time trying to migrate from godaddy to Route 53, Do I have to remove from one and create from scratch from AWS?
Does any... | How to move a domain from Godaddy to AWS Route 53 |
I think it is to avoid having a dirty tree, as if you don't rebase before merging with main branch. And you have multiples branches, it will quickly look something like this :You will agree with me that it is very hard to see what's going on.With rebase before merging, it will look way cleanier and will be way more eas... | What is the difference between 'Squash and Merge' which is one of the option for Pull request merging and 'Squash and Rebase' which can be done bygit rebase -ioption?Why people recommend 'Squash and Rebase' while 'Squash and Merge' exists?I'm trying to use the git workflow. Previously I used rebase to merge commits fro... | Squash and merge VS squash and rebase |
1
You could get the changed file lists from the diff or cherry commands. You would then know if there are any files that are common to both. But just because the files are common does not mean git will flag a conflict unless the changes are close together (or overlapping of... |
This question already has answers here:
Is there a git-merge --dry-run option?
(21 answers)
Closed 3 years ago.
I have a repository in github, which main branch is named master and... | How to calculate conflict into two git branches without needing to do the actual merge? [duplicate] |
You have two way:ErrorDocument 403 http://www.yourdomain.com/403.phpErrorDocument 403 "Go and Do NOT return!"of course, First one will redirect user!If you have particular file formats on your site(like .php,.txt,.xml,.htm,...) you can use this one but I DO NOT recommend it!<Files ~ "\.(inc|sql|.php|.html)$">
order a... | I have a script that is automatically adding IP addresses to my.htaccess file based on lookups in spam databases. However, I would like for subsequent visits from those addresses to be able to view a 403 ErrorDocument I create. Obviously, though, they cannot, as they have been denied. My .htaccess looks like this:Er... | Allowing blocked IP to view 403 ErrorDocument |
Use something like below and put it in a script block.def filename = 'datas.yaml'
def data = readYaml file: filename
// Change something in the file
data.image.tag = applicationVersion
sh "rm $filename"
writeYaml file: filename, data: dataShareFollowansweredAug 11, 2021 at 11:43Lineesh AntonyLineesh Antony8011 silver... | I'm learning Jenkinsfile and I'm trying to generate a YML file from the variables but it dosn't work properly.pipeline {
agent any
parameters{
choice(
choices: ['Test1', 'Test2', 'Test3'],
name: 'select_parameter'
)
string(
defaultValue: 'string',
name: 'STRING_PARAMETER', ... | Generate YML file from Jenkinsfile |
9
It is ok - you are not really reusing the pointer but just the variable holding the pointer.
Share
Follow
answered Feb 15, 2010 at 14:49
jldupontjldupont
95.2k5656 gold badges207207 silver... |
I have a question regarding free() in C.
Suppose I have a pointer to some struct (say node *ptr).. after freeing it can i Initialize it to NULL and make it point to some new location using malloc() or realloc()?
For Example:
node *ptr=NULL;
ptr=realloc(ptr,sizeof(node)); //works exactly like malloc
/* Do some operati... | can we use a pointer freed earlier? |
Get yourself a personal access token as described inhttps://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-tokenOnce you have a personal access token you can use it as a password for your account. So you get one for each account.To use your personal access token add your github account na... | I have two accounts on Github, each with a specific use.I would like to make sure that every time I push my name and password, I can do uploud with the right account.But it doesn't happen, I use the https connection for this instead of the ssh.Now going on the keychain, I saw that there are two keys found.
One key for ... | Github mac git use more than one account |
I would use ENTRYPOINT to kick off a script on docker run.
Something like
ENTRYPOINT myamazingbashscript.sh
Syntax might be off but u get the idea
The script should start both services and finally should tail -f the tomcat logs (or any logs).
tail -f will prevent container exit since the tail -f command never exits a... |
This is a two-part question.
First part:
What is the best approach to run Consul and a Tomcat in the same docker container?
I've built my own image, installing both Tomcat and Consul correctly, but I am not sure on how to start them. I tried putting both calls as CMD in the Dockerfile, but no success. I tried to put C... | Consul and Tomcat in the same docker container |
You add a new folder mapping into the "sites" block of Homestead.yml, like so:- map: myapp.com
to: /home/vagrant/Code/myapp/publicThat's all there is to adding a new vhost. To modify it, edit the appropriate file in/etc/nginx/sites-available. In the above case, this would be/etc/nginx/sites-available/myapp.comSeehere... | I am using Laravel homestead. For a project I need a special vhost configuration, where should I define this? | Laravel Homestead vhost configuration |
Assuming/home/ubuntu...* * * * * cd /home/ubuntu/ && ./anaconda3/bin/python ./project/script.py > /var/log/myjob.log 2>&1Adding2>&1to the end is unrelated to your question, but captures theSTDERRoutput into your log, which you probably also want. | I have a script, calledscript.pythat is on an EC2 instance. The script reads a file in the same folder (code:open(data.csv, 'r')) calleddata.csv. Here is the cron job:* * * * * /home/ubuntu/anaconda3/bin/python /home/ubuntu/project/script.py > /var/log/myjob.log 2&>1When I run the script myselfpython script.pyis works ... | cronjob can't find file on EC2 |
0
Than I use: git remote set-url to replace the new repo.
But I can't remember the remote name of the previous repo
You don't have to: use origin: that will override the previous origin URL
git remote set-url origin https://github.com/<me>/MyNewRepository
Then you can st... |
I'm having a problem with git:
I created a repo on GitHub to push that repo so GitHub but because I did not research carefully, I deleted that repo on GitHub.
Then I created another repo and used git add but the error came up:
error: remote origin already exists.
I use git remote -v to review the list of urls and sti... | Delete Repository |
Therun-namecan include someexpressionsand can reference only thegithubandinputscontexts:run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}Unfortunately, GitHub Actions don't support math operations inside expressions. So, it's impossible to perform such a calculation for the value of therun-nameopt... | I am trying to set dynamic name to workflow run that has a number. The number should be calculated using an expression.run-name: Perform Operation with ID [SOME_GITHUB_VAR + 1]Is there a way to perform the above sum operation?Thanks, | Sum expression in github action run-name |
It’s not easy. You have to go through each commit and remove that file. And keep in mind that will modify the history, be careful if you are collaborating with others.Here is a guide from GitHub on how to remove sensitive data:https://help.github.com/articles/remove-sensitive-data/The resulting command should be:git fi... | I recently added a file to my .gitignore, but my repository contains previous commits that include that file. Commits from here on out no longer track the ignored file thanks to usinggit rm --cached config/secrets.ymlIs there a quick git command that will go through all of my previous commits and remove that file from ... | Removing .gitignore files from previous commits in GitHub |
Things like this are most likely caused by it opening an editor that forks off instead of staying.That means you'll want to set $EDITOR to an editor that does wait. E.g.nano,vimoremacsshould work, and e.g. if you use sublime text you'll have to usesubl -wto explicitly tell it to wait.It's not quite clear which shell yo... | I runkubectl edit deploymentto change the version of one of my pods (this commands opens a temp file in my text editor and then I usually edit and close this temp file) and even before Iclosethis temp file in my text editor I can see the following note in my bash.Edit cancelled, no changes made.It was OK before I insta... | How can I fix Edit cancelled, no changes made in shell |
+200For your use case you only need a single ingress controller. I.e.https://kubernetes.github.io/ingress-nginx/To achieve this you need to add DNS entries for the namespaces leading to the single cluster IP.
If you only want to access the two DNS names:stage.cloudapp.azure.comdev.cloudapp.azure.comadding both entries ... | Azure kubernetes service allows me to assign only one IP address to one cluster. I have created two namespaces within this cluster and I would like to distinguish those two namespaces by url as environments.NamespacesstagedevDesired access to those namespaces would be something like{namespace}.cloudapp.azure.com.When d... | Configure two environment for kubernetes within Azure |
The issue was that some Alpine Docker containers come without thebusybox-initscripts packageinstalled. After installing this, crond is running as a service. One other hiccup I ran into is thatrun-parts, the command the executes the files in the/etc/periodicfolders expects there to be no extension, so I stripped that, a... | I'm trying to run an Node 12.13.0 Alpine Docker container that runs a script every 15 minutes. According toAlpine's wiki cron section, I should be able to just add a RUN task in the Dockerfile to run crond as a service via:rc-service crond start && rc-update add crondThis however returns an error:rc-service: service `c... | Alpine: "service `crond' does not exist" |
You are on time to save it, but you need to rollback to previous version, then:
docker exec -it <postgres-container-id> pg_dump db_name > local.dump.sql
Then, after checking that the dump is OK, empty the volume of the database, upgrade postgres and restore de dump:
https://www.postgresql.org/docs/9.1/static/backup-d... |
Postgres container crash on launch with the following error message
(project) ➜ project git:(feature/62-api-custom-image-categories) ✗ docker-compose up postgres
Starting project_postgres_1 ...
Starting project_postgres_1 ... done
Attaching to project_postgres_1
postgres_1 | FATAL: database files are incompa... | Postgres container crashes with `database files are incompatible with server` after container's image has been updated to the latest one |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.