Response stringlengths 15 2k | Instruction stringlengths 37 2k | Prompt stringlengths 14 160 |
|---|---|---|
Would using simple bash loop sufficient?for temperature in $(ipmitool sdr elist full | grep CPU | grep Temp | cut -d "|" -f 5 | cut -d " " -f 2)
do
curl -i -XPOST "http://localhost:8086/write?db=mydb' --data-binary 'server_temps,sensor=inlet, value=$temperature"
done | My Linux bash skills are rudimentary so I am seeking some help. I am attempting to insert some CPU temperature data into an influx database so that it can be displayed on a Grafana dashboard.So far I have been able to retrieve the CPU temperatures via ipmitool in Linux, see below example... which shows the command I ru... | Posting ipmitool data to influxdb for use in grafana |
If you're building with Gradle, you shouldAnalyze with Gradle. Specifically, there's no need for asonar-project.propertiesfile. Instead, you configure the SonarQube plugin in yourbuild.gradle, and most of this shouldjust work. | Sonar scanner - 3.1Java 1.7I'm trying to configure sonar properties to get coverage from a multi-module project. Coverage is generated under the path: Module/build/jacoco/test.exec, so I wanted to add it to sonar.properties file according to documentation:https://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Te... | Sonarqube + Jacoco - sonar does not read report path from properties |
TinyPNG uses pngquant.
Pngquant has option to set desired quality, similar to JPEG. You can run something like:
<?php system('pngquant --quality=85 image.png'); ?>
Pngquant website has example code showing how to use pngquant from PHP.
For JPEG you can apply lossless jpegcrush.
JpegMini (commercial) and jpeg-archi... |
I'm wondering how to figure out the best compress rate (small filesize + no quality loss) automatically.
At the moment I'm using imagejpeg() with $quality = 85 for each .jpg.
PageSpeed (Chrome Plugin) suggests, to lower the quality of a few images to save some kb. The percentage of reduction is different.
I'd like to ... | PHP: How to compress images without losing visible quality (automatically)? |
I'm pretty sure that AKS dns service is only available from within the cluster.Here is what I would do:I would associate a Private DNS zone with the Virtual Network of the AKS cluster.I would also deploy the Azure Container Instance into this same network. (You'll need to assign a dedicated subnet to the Azure Containe... | I am not able to reach the DNS server in k8s from Azure Container instancescontext:I have 2 pods in an Azure AKS Kubernetes cluster.Pod1: name = pod1, internal IP = 10.34.33.112Pod2: name = pod2, internal IP = 10.34.33.155, Cluster IP = 10.34.104.109AKS DNS Service ip =10.34.96.58So, from pod1, I expect thatnslookup po... | Connecting Azure Container instances with AKS pods via the AKS dns |
As far as I know, there's no way to do that.
In this file you'll find available HTML tags in github-flavored markdown:
https://github.com/gjtorikian/html-pipeline/blob/main/lib/html_pipeline/sanitization_filter.rb
(this is linked to by Github's README themselves)
It is also said here that:
The HTML is sanitized, aggr... |
I want to change background of github markdown file. How can I do it? Is there specific markdown command to do that or maybe some HTML or CSS code? Or some other way?
| How can I change Github markdown background? |
I found the problem, thanks to @lorenzvth7!I've had two images with same tag (which i was pushing to cloud).Solution is:Inspect your images and find two or more with the same tag:docker imagesDelete them:docker rmi --force 'image id'Thats it! Follow steps from my question above. | What I'm currently doing:Dockerfile:FROM python:3.5.1
ENV PYTHONUNBUFFERED 1
RUN mkdir /www
WORKDIR /www
ADD deps.txt /www/
RUN pip3 install -r deps.txt
ADD . /www/
RUN chmod 0755 /www/docker-init.shBuild command:docker build -t my-djnago-app:latest .Tagging:docker tag my-djnago-app:latest lolorama/my-djnago-app-img:... | Docker - What is proper way to rebuild and push updated image to docker cloud? |
Try this in your root .htaccess:ErrorDocument 410 /error-410.php
RewriteEngine on
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?sub\.domain\.com$ [NC]
RewriteRule ^ - [L,R=410] | I am trying to force all requested urls from a domain to a custom 410 error page. I am using the following rule, but it does not catch everything. I need it to catch all folders, .html, .php and jpgs etc...RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^index\.html$ index.html [L,R=410]
ErrorDocumen... | htaccess redirect everything to 410 |
Create.gitignore_globalfile somewhere, for example user directory is a good place.
Add all files and directories you want to ignore locally.
Then you need to tell git where is this file by using this command:$ git config --global core.excludesfile <your-git-ignore-file>if you are put the file in user directory, then co... | I usually add the files and extensions that I want to ignore to .git/info/exclude to have a rather neat repository. I'm on a mac and for example I always need to exclude the .DS_Store file that is created. I was wondering if there is a way to change the defaultexcludefile. | How to automatically exclude some file types in git? |
0
You can utilize the SE_OPTS environment variable to pass in whatever flags you need. For example, you can do the following:
docker run --rm -it --env SE_OPTS="--log-level FINE" -p 4444:4444 selenium/standalone-chrome
See the SE_OPTS Selenium Configuration Options and Tro... |
Locally, for detailed log, I would run
chromedriver --verbose --log-path=/
Cam I get same detailed log inside docker-container?
I'm using https://github.com/SeleniumHQ/docker-selenium standalone-chrome:3.141.59-zirconium . Starting with
version: "3"
services:
selenium:
image: docker.artifactory1.lancope.cisco... | chromedriver verbose log inside selenium docker |
It seems a plain global is just what you want. For review, in C++ a global (or singleton) should be a local static variable in an inline function.
class myAllocator {
public:
static myAllocator &getDefaultInstance() {
static myAllocator theInstance( parameters );
return theInstance;
}
};
This ... |
I have been reading different articles on memory management in preparing for how I want my architecture to work, with my biggest worries on how the allocators will be used, created and handled throughout the code base. One of the issues is that my design always has the allocator(s) at a global scope, since I don't hav... | Design for memory allocators scope |
Yes, they are referring to java.util collections. (They go into specifics on each collection type -- HashSet, ArrayList, and so on -- so yeah.)
Collections do live on the heap, but once they can be garbage collected -- once they're not referenced by the running application -- they are not considered "live."
A high nu... |
I am reading through the presentation "Building memory efficient Java applications", and saw that on slide 11 they ask the question: "How many live collections in a typical heap?"
The answer is 10k to millions.
I will be very humble and say that I do not know where I would begin with this question.
What is a live col... | Explain the trivia: How many live collections are in a typical heap? |
In general, Deployments manage replicas of Pods, and each Pod runs a specific container image. If your API backend consists of multiple microservices, then each microservice is a Deployment. The microservice that handles API requests is exposed with a (client-facing) Service.For the multiple API versions, you could jus... | I have a REST API with multiple API-versions. Each API backend is composed of several micro-services. It is fair to assume that only the latest REST API resources/code has most churn. The older versions will see churn due to feature backport (rarely) or bug fixes (mostly). I'd like to get recommendations on what DevOps... | Kubernetes deployment patterns & REST API versions |
That resource is managed by the image-registry operator. You can check for yourself withoc get clusteroperator image-registryand edit the configuration for the operator withoc edit configs.imageregistry.operator.openshift.io.It is possible to set the image-registry operator inUnmanagedstate, by editingconfigs.imageregi... | When I edit theimage-registryDeployment (in the openshift-image-registry Namespace/Project), the modified fields are automatically reverted/rolled-back on Save.My understanding is that Deployments control/manage some resources (i.e., ReplicaSets), but what Resource/CustomResource/CustomResourceDefinition controls/manag... | How do I modify the OpenShift image-registry Deployment? |
You need to connect the already running postgresql and run this commandCREATE DATABASE newDbName;You can find more details athttps://www.postgresql.org/docs/current/sql-createdatabase.html | I was trying to create a new database in my already existing postgres container.But it is skipping the database initialization part.I am getting this message after running thedocker-compose upcommand:"PostgreSQL Database directory appears to contain a database; Skipping initialization"docker-compose.ymlversion: '3'
... | How to create a new database in already existing postgres container? |
My gut instinct tells me this is not a good idea. It might be a better plan to save a link to where the VS 2008 back up is on Sharepoint, but adding a huge load of data to any sort of storage device is always going to be a bit fraught.
For example, whilst you can save images and files into SQL Server directly, most pe... |
I am trying to save a Visual Studio 2008 project to a SharePoint library as a backup.
I dont know how. Please explain me if it does make any sense and how it is possible to import huge project with a lot of files into EMEA online Sharepoint 2007 Portal. I dont have MOSS, just WSS 2007.
| does it make any sense save a Visual Studio Projects in SharePoint Online Portal? |
There is a difference between a rewrite and a redirect.Rewrite is an apache (and other servers) module that will follow a set of cond/rules to map a requested url to files on the server (ex: a bootstrap rewrites all urls to a single file, usually index.php. A mvc might map /model/controller/view uri to an index.php tha... | .htacesssRewriteCond %{REQUEST_URI} ^/api/(.+)$
RewriteRule ^api/(.+)$ /index.php?api=%1 [QSA,L]example ajax url request:
'http://hostname.com/api/ext/list.php?query=de'I want to be able to redirect urls in this format to the following
index.php?api={requested_filename}¶m1=value1¶m2=value2 ...because the whole ... | How to preserve POST data via ajax request after a .htaccess redirect? |
First check cron on wsl is runningCrontab never executes in Windows Subsystem LinuxIf it is, check the path is correct to the file you want to run. In wsl cd into the folder containing the file and run pwd to print the working directory, use that as the path.A sh file is like a batch file for Linux systems, Google is y... | Hi I am new to programming and I have to write cronjob for my python file.
My laptop is window so I just downloaded wsl and I wrote some lines for cronjob but it seems that non of them works.*/2 * * * * /Document/카카오톡 받은 파일\crawling_html_css/try.py
*/2 * * * * python /Document/카카오톡 받은 파일\crawling_html_css/try.py
*/2 * ... | How to write python crontab using wsl |
The plugin you are using is for incoming http traffic, logstash acts as a http server. You need something what will issue http requests to the outer worlds and here is a http-poller-plugin you should have a look on:https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.htmlanda blogpost for the ver... | I am looking to implement an HTTP listener to ingest JSON over a specific port on an AWS EC2 instance. Currently I have Elasticsearch, Logstash, and Kibana running on the same cluster and I have validated that they're all working in conjunction with one-another. When I attempt to open a port (5602) for the logstash-htt... | Logstash Http input plugin |
Why should I pay for it?S3 encryption is free, unless you are using KMS. Other than that, you may be required by law to store data encrypted at rest. For example if you want your project to beHIPAA-compliant (medical data), you must store your data in the encrypted form. There may be many other local or federal require... | Can someone explain what is the idea behind server side encryption on AWS S3? What are we protecting with Server Side encryption? From whom?If someone gets access to my account, this encryption is of no use - because the user will always get the decrypted data. And without access to my account, un-encrypted data is as ... | What is the point in AWS S3 Server Side Encryption? |
The param body needs to be an instance of client.V1DeleteOptions not the config of the ingress object.body = client.V1DeleteOptions() | I am getting this error while deleting the ingress objects.Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '161', 'Date': 'Wed, 14 Feb 2018 10:14:03 GMT'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","... | Not able to delete kubernetes ingress-object through kubernetes python client |
3
For forks and tests please don't use packagist. Instead use a VCS repository.
Here is how to use them:
https://getcomposer.org/doc/05-repositories.md#vcs.
Also private repositories are possible.
For your case use this in your composer.json:
"repositories": [
{
... |
I have the following repo:
https://github.com/latheesan-k/laravel-xero and my project's composer.json
On my PC, I have a folder called test and inside it a file called composer.json with the following contents:
{
"require": {
"latheesan-k/laravel-xero": "dev-master"
},
"minimum-stability": "dev"
}
... | composer install not working on my git repo |
I found a working solution/workaround in this answer:Force Gradle to use HTTP instead of HTTPSI replaced jcenter() with maven { url "http://jcenter.bintray.com" } in two places.This workaround requires that jcenter is accessible over HTTP which might get disabled in the future for security reasons. | Our new firewall provides a transparent proxy which issues self-signed SSL certificates for secure (HTTPS) connections.Android Studio asked me to accept two certificates, which I confirmed.Existing projects build fine. Only if I change or add dependencies in the build.gradle file, this error message appears:Gradle 'MyA... | How can I allow firewall-generated SSL certificates in Android Studio? |
Basically, git commit --signoff or git commit -s is a way in which you add a trail message to the commit message saying that the commit is signed off by you.
On step #4 mentioned above, you need to use git commit -s -m "yourCommitmessageHere" so that the DCO step is successful.
This feature is used to keep a track of ... |
i have recently started open source contributing during my first pull request I don't faced an issue like this but after then I am facing this issue again and again
this is the image of detail section
steps I followed were
1- made separate branch and checkout it
2- done some changes in the code
3- stage changes usin... | You only have one commit incorrectly signed off |
kubectl create job --from=cronjob/${NAME_OF_EXISTING_CRONJOB} ${JOB_NAME} | With GCP, you can click the RUN NOW button on a CronJob's page and the generated pod will be visible under the Managed Pods section on that same page. How can I do the same using thekubectlCLI?I tried the commandkubectl create job ...but it creates a completely separate Job and it's not connected to the CronJob. | Trigger RUN NOW using kubectl |
This seems to be a common misconception about Docker beinglightweight virtual machine"that is why some might expect similar behavior as VirtualBox or VMWare but just faster.Docker does not use virtualization, so all processes run by the native host kernel just isolated from each other. Non-root user cannot kill process... | I was setting up a Selenium server using docker, basically followingthisgithub tutorial.I have no problem setting up the server, but I noticed that the processes that I started inside the docker image actually got shown up on my host process list.As you can see in the screen shot, the docker ran a bash script and also ... | Docker Processes Shown on Host Process List |
Not entirely sure what the problem was before, but I was able to resolve it by:gradle clean
gradle cleanIdea
gradle idea
...
<import required classes>
...
gradle buildSeems like this resolved it. Something was wrong with the project setup. | this may be a very simple question, but I've been stuck on it for hours...I'm trying to add amazon cloud integrations into my project, and I can't seem to get the project to recognize the jar files. I'm currently simply trying to instantiate an AmazonS3 client:AmazonS3 s3 = new AmazonS3Client();I've added this to my b... | IntelliJ can't resolve com.amazonaws symbols |
You have to set web server's document root pointing to your "Web" directory. If you can't customize document root just move content of your "web" directory directly into document root and move all other staff one level above. For example:/home/username/www/html <---- this is the place where you put all things from "web... | I've been searching for a way to remove the "/web/" folder from an application URL in a shared environment, in which I cannot change the DocumentRoot or create a VirtualHost.I found some solutions based on mod_rewrite, but all of them apply to Symfony 1.x, or they just don't work (I'm very new to mod_rewrite anyway, so... | Symfony 2: How to remove the "/web/" folder from the url in a shared hosting? |
Crontab executed an outdated distribution node package, which was placed in /usr/bin/The solution is to use a node version installed by a normal user instead, located in /usr/local/binThis is how the crontab line should look like:* * * * * /usr/local/bin/node /var/www/UserToJSON/index.js | I have a NodeJS script that uses discord.js module.
It works flawlessly when I execute it via terminal.const fs = require('fs');
const Discord = require('discord.js');
client = new Discord.Client(); client.on('ready', async() => {
console.log('I am ready!');
const dev = await client.users.fetch(2396720)... | Executing NodeJS via crontab throws an error |
Tips and clues:Ensure you have runSonarScanner.MsBuild beginbefore executingMsBuildRunMsBuildwith/v:diagnosticswitch to get detailed troubleshooting log. In the log lookupSonarQubeTargetsPathandSonarQubeTargetFilePathvalues.In case of this or another configuration difficulty see my tutorial on how to setup SonarQube in... | I am new to .Net and new to SonarScanner with MS Build. I am looking forward for your help on resolving the error I get when I build the project after sonarscanner-msbuild begin process .C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integra... | The build is configured to run SonarQube analysis but the SonarQube analysis targets could not be located |
To include multiple specific values in a cron job you separate them with commas.For 16-17 you want16,17so you get:# m | h | d | m | Day of week
* 16,17 * * *
# All the below can include multiple values using commas
# m = minute (minute from 0 to 59)
# h = hour (hour of the day, from 0 to 23)
# d = day (day o... | Here I am trying to run a php file through cron job process. I want to run that php file For every minute from 4PM to 5PM. I have tried both* 16-17 * * *And* 16,17 * * *But It's not working. How should I write the exact command to run this? | How to run a cron jobs in every minute for a specific hour on server |
7
Installing the last available version solved the problem for me (https://github.com/docker/toolbox/releases) :
BEFORE
minux@DESKTOP-OCQQ65T MINGW64 /c
$ docker --version
time="2017-04-05T17:56:55+02:00" level=info msg="Unable to use system
certificate pool: crypto/x509: ... |
I am having the following warning message when issueing docker commands: (ex: docker ps)
C:\Users\whha>docker ps
time="2017-01-24T23:17:36+01:00" level=warning msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
Any idea how can it be avoided?
I´m running docker... | Warning about system root certificate pool crypto/x509 |
One technique is to rewrite only URIs that do not match a physical file.
For example:
server {
server_name example.com;
root /var/www/html;
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
return 302 /setup.html?s=$uri;
}
}
See this document for more.... |
I'm trying to redirect requests from
example.com/abc234 to
example.com/setup.html?s=abc234
So far, I've tried the following, but it seems to always end up either 1) not transmitting the parameter or 2) ending up in an infinite loop (or 404) because it also tries to redirect the redirected request? The request has to b... | Rewrite directory as parameter |
The best solution is to avoid usage of drawables for Buttons if it is possible.
|
I have a list with buttons on each row. Buttons in my application use custom theme with custom drawables (about 0.5Kb png each).
Users complain of OutOfMemory errors which appears several times per week.
The first idea was that Buttons load BitmapDrawables and do not recycle them. So It leads to exceeding Native memo... | OutOfMemory caused by Buttons background |
It means every day at 8:00 amYou have to set*/8 * * * * path to scriptevery 8 minutShareFollowansweredJan 20, 2017 at 9:59Meiram ChuzhenbayevMeiram Chuzhenbayev90811 gold badge1010 silver badges2727 bronze badgesAdd a comment| | I am new to crontab, can someone just tell me how often this task goes.
Thanks.0 8 * * *Is it every 8 minutes? | Crontab pattern 0 8 what means |
1
Well, for one thing, it requires API Level 8 (Android 2.2) or greater, so currently about 6% of devices with Google Play can't use it. Otherwise, I think it's a safe assumption that the vast majority of devices with 2.2+ and Google Play have access to it.
Share... |
The document here states that:
'Data backup is not guaranteed to be available on all Android-powered
devices'
Are there any examples of when the backup service is not available on a device? Is the backup service guaranteed to be there if the user has installed the app via Google Play (i.e. they have a google accou... | When is Android's backup service not available? |
I found a solution. It seems to have been related to permissions. I created the cron job as root originally and tried to create it for a user. Usingcrontab -u user -e, instead ofsudo crontab -esolved the issue. Does somebody know why this was an issue, despite the libraries being installed in accessible directories? | Let's say I want to have my computer calculate my age every minute, therefore I run the following cron job everyday:*/1 * * * * bash /path/to/birthCalcbirthCalc itself calls an R script, like so:#!/bin/bash
Rscript birthCalc.RNow, this all works, if I use base R with such a birthCalc.R:birthDay <- as.POSIXct ('1919-04... | R packages (e.g. lubridate) not working when called with Rscript as cron job |
This is not possible. The whole point of using aStatefulSetis to have a bunch ofPodsthat are basically identical. It is the precise goal of theController Managerto reconcile theStatefulSetresource and ensure there arereplicasnumber ofPodsthat match theStatefulSetspec.If you want to have different pods you need to have ... | I am trying to update entrypoint in specific containerthe struture is :
statefulset -> list of pods -> specificPod -> specific contianerI tried to do that using the javascript client and got the following:body: {
kind: 'Status',
apiVersion: 'v1',
metadata: {},
status: 'Failure',
message: '... | Could not update containr args in Pods - kuberneties -got 'pod updates may not change fields' |
As stated in the comments, Fiddlers use a different key on each install so you can only mitm yourself (or the peoples who trust you).But if your fiddlers private key is compromised, then people who trust it can only be saved by removing the certificate.Pinning can't be useful because HPKP is disabled for user trusted r... | I know how Fiddler can decrypt HTTPS traffic by using Man-In-The-Middle approach. I understand the trusting Fiddler's root certificate comes with the risk and one should trust it responsibly by understanding its implications. However, it leaves you with a risk of an employee installing Fiddler and trusting its root cer... | How to keep HTTPS traffic really secured where Fiddler is allowed? |
\config.ymlbaseurl: "/hcz-jekyll-blog"
url: "https://shivank01.github.io"Calling your pictures(as noted by Subash Chandra Manohari)and not | I have made a blog using github page but the image is not loading.I have tried all things but I am still stuck with it.
The link to my github code ishereThe problem is in the file _posts/2017-04-02-Kronothon.md and the image is in /assets/Kronothon1.png .Please help me out with this.
You can see the blog posthere | Image not showing in Blog made using Jekyll in github |
You need to be issued a new certificate, but it needn't be issued by Verisign.Anytrusted authority can sign the certificate.The key store containing trusted issuers is here:/system/etc/security/cacerts.bks | Our Android application is interfacing with a server than employs a certificate chain, with certificates issued by Verisign. We were able to establish SSL sessions with this endpoint so far. This Verisign certificate is due to expire next month.Questions:
1. Should Server site get a new certificate reissued from Verisi... | Server Certificate Extension and interface with Android |
Add in .htaccessphp_value default_charset None
AddDefaultCharset UTF-8 | I am having a hard time making an "Í" work! It just keeps appearing me a "É" and I can't figure out why. Curiusly enough, it only happens with capital I, when it is a "í", everything works just fine.What I have tried so far:Specify the codification on the head<meta http-equiv="Content-Type" content="text/html; charset=... | How to force browser to use UTF-8? |
0
I'm pretty sure that tornado caches the templates as well. Taken from their docs
Loader is a class that loads templates from a root directory and caches the compiled templates:
So if your calling loader it might be your issue.
Share
Improve this answer
... |
I'm starting to learn Tornado and going through the Intro to Tornado book.
While working through one of the examples, I had a missing quote in an HTML file and got the following error:
File "modules/book_html.generated.py", line 11
if book["subtitle] != "": # modules/book.html:3
SyntaxError: EOL while scanni... | Change in html file does not take effect when I restart tornado server |
Thetagselement is not valid forreleaseevents. In consequence, the workflow is triggered for everyreleaseevent of typepublishedno matter the tag. There is no direct filter for tags with thereleaseevent as there is forpushandpull_requestevents.So you can leverage theifconditional on jobs in combination with thegithub.ref... | I need help figuring something, I am trying to trigger 2 different workflows based on 2 different release tags. I want prod-* to trigger the production workflow and dev-* for the development workflow.The problem is both tags trigger both workflows and I have no idea how to fix this(I've canceled both actions but they t... | Github Actions Conditional Trigger |
The reason is even though you are mounting/datafrom host to/datain Pod, the/data/dbin container is mounted from somewhere else.As suggested onhttps://hub.docker.com/_/mongo/you should mount/dataon host to/data/dbon container.If you go tominikube sshand see all the volumes mounted for mongo dbdocker inspect <mongo-db-co... | I've been trying to get a sample mongo project working on Kubernetes minikube but for the life of me i can't get the volume to persistanyone have any suggestionskubectl create -f https://raw.githubusercontent.com/brianbruff/kubernetesPlayground/master/mongo.yamlwhat i notice is that the /data folder appears to be mount... | Kubernetes and Mongo Volume |
You want to merge in the full histories of the other repos, but after rewriting them to move their entire histories into subfolders.That's whatgit filter-branchis for.For each subrepo:Clone the subrepo`git filter-branch --tree-filter "mv * dir/"Add the clone as a remote of the master repoFetch that remotegit mergeor (i... | How do I add existing github repos to a new repo? This is not "merge" as my intention is to add files from an existing repo into a new repo preserving the folder structure and history of all files.I have 3 different reposgithub.com/foo/1.git
github.com/foo/2.git
github.com/foo/3.gitEach of them have a set of folders an... | Add one github repo to the other |
) you can solve the redirect issue in your Java application so instead of redirecting users to homepage and having an HTML page displayed, you could return some JSON with 401 (unauthorized) response code.2) Of course you can also useproxy_redirectto get them anywhere else than the homepage.
E.g.proxy_redirect ~https:... | I have java application running on jetty server where back-end is java rest web service and front end is done with angular js. when my JSESSIONID cookie expires nginx responds with 302 redirect for rest api call. for examplehttp://www.example.com/rest/myapiwill return with 302 and location header set tohttp://www.examp... | How to change location header when redirect issued by proxied server in nginx |
Can you please clarify how long have you waited after updating the DNS record pointing to the load balancer ip?I'm requesting this information, since as pergcp documentation,it might take upto 24 hours for DNS record can be propagated and could take time for managed certificate to be provisioned.Additionally, I would a... | We are trying to setup ssl certificate for our domain,api.rideonstyle.in. We encountered a situation where the certificate status is inFAILED_NOT_VISIBLE. Tried all the steps that are suggested in thedocumentation.Here are the screenshots,
We checked the conditions given in the documentation, when certificate status sh... | Unable to setup SSL Certificate on Google Cloud, status being "FAILED_NOT_VISIBLE" |
Read a little further in the same link:
You must provide both a creation and a destruction function; you must not destroy the instances using delete from inside the executable, but always pass it back to the module. This is due to the fact that in C++ the operators new and delete may be overloaded; this would cause a... |
This page examines and gives a very clear example of how to dynamically load and use a class, there is something that I have a hard time understanding though:
I understand why is the "create" function needed, but why is a "destroy" function needed? why is not declaring the interface destructor as pure virtual enough?
... | C++ dynamic loading of classes: Why is a "destroy" function needed? |
This would kill php process which were started more then an hour ago:$(ps -eo comm,pid,etimes | awk '/^php/ {if ($3 > 3600) { print "kill "$2}}')3600 - timestamp in secondP.S. You can run command> ps -eo comm,pid,etimesbefore and after to ensure that everything worked out.P.P.S. I know it is old question but someone mi... | I am running a crawler programed in PHP every hour with a cron job. When everythings goes as expected, the script quits automatically. However, for some reasons, sometimes it gets stuck in an infinite loop. It gets worse because I use a lock file to avoid a duplicate run, when the crawler gets stuck it never runs again... | Automatically kill Linux process / php script after given time |
Caching is handled inside SecureChannel - internal class that wraps SSPI and used by SslStream. I don't see any points inside that you can use to disable session caching for client connections.You can clear cache between connections using reflection:var sslAssembly = Assembly.GetAssembly(typeof(SslStream));
var sslSes... | TheMSDN documentationsaysThe Framework caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, the Framework uses the first element ofClientCertificates(if there is one), or tries to reuse an anonymous sessions ifClientCerti... | SslStream, disable session caching |
Figured it out. Click on the commit, then click on the triple dots, and then click view file. | I did notice this10-year old question, but I still wanted to ask if there is any new method in the past 10 years for seeing older versions of files on github. I see if I go through the commit history that I can browse theentirerepository at a particular point in time, but my file of interest is in a folder with enough ... | Accessing older versions of files on github? |
You need to email[email protected]as soon as possible when this happens.ShareFollowansweredFeb 13, 2012 at 7:23Ana BettsAna Betts74.2k1616 gold badges142142 silver badges209209 bronze badges34Thanks Paul! You just made our day today![email protected]was able to undo our delete.–George SOct 5, 2015 at 22:563This answer... | My repository in the github had been deleted.
The code was recovered, but we had a lot of Github issues i'd like to recover, is there a way to recover them once deleted?Thanks. | Recover a deleted repository github issues |
I think it might be a typo in the description, since S864 exists, and is about operator precedence. The link that you clicked on for finding S00864, update the URL to remove the 00 to just S864 to see the rule. | the rule Correctness - Integer multiply of result of integer remainder notes that "This rule is deprecated, use S00864 instead. ", but S00864 does not exist. | squid rule S00864 does not exist |
I think your network is using Statefull/ZBF (Zone Based Firewall). for getting the response of a request you need to open both inbound and outbound requests. the firewall for this port should configured on "Inspection" that lets both inbound and outbound traffic.ShareFollowansweredJul 1, 2016 at 7:40alonealone16977 bro... | I want to send push notifications to devices through the Apple push service server (APNS). Now the APNS requires an unproxied connection to them with some ports open.To quote Apple from this link - Push providers, iOS devices, and Mac computers are often behind firewalls. To send notifications, you will need to allow i... | Open port for outbound and inbound traffic |
You can't set Cache-Control directly into the headers (anymore?), as you need to modify the response.cache_control object (since it will be used to set the Cache-Control header later).Luckily, the expires_in method takes care of this for you:expires_in 1.day, :public => trueSee more here:http://apidock.com/rails/Action... | Whether I do:head 302orhead 307orredirect_tocalls in the same controller action toresponse.headers['Cache-Control'] = "public, max-age=86400"have no effect. Rails sends:Cache-Control: no-cacheno matter what. I need to send the Cache-Control header to instruct an edge cache to serve the redirect for a day. Is this po... | Overriding rails Cache-Control header on redirect |
You can shorten your regex like this as well. Now this will allow_also.\wis shorthand for[a-zA-Z0-9_]RewriteRule ^share/([\w-]+)/([\w-]+)/?$ /v.php?v=$1&hash=$2 [L] | Here is our current regex:RewriteRule ^share/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ /v.php?v=$1&hash=$2 [L]This isn't allowing underscores "_" - how do we get this to allow underscores?Thank you | htaccess regex, allow underscores |
Portainer do not allow you to edit an image from a Dockerfile as it does not store the Dockerfile.I'd recommend to version your Dockerfile in a CVS, this would allow to version any changes to your Dockerfile, and then update your image via the upload method inside Portainer when needed.ShareFollowansweredMay 17, 2018 a... | In portainer I created an image, using the web editor to enter the Dockerfile commands.But I see no option to modify that image, there is no edit options.Am I supposed to have the Dockerfile stored somewhere else, then paste it into portainer every time I've edited it? | Modify docker image in portainer |
The features you described are not covered by the Kubernetes API.I would suggest that you look intoHelmwhich is the Kubernetes Application manager. Helm would allow you to upgrade or rollback all resources associated with your application.You can find an example Helm packagehere.To install this package and all it's Kub... | Kubernetes provides easy tools for rolling out and rolling back changes to Deployments and Daemonsets. However, deployments are often tightly associated with other kubernetes primitives like Secrets or Services, and I'd like to know how to do the same for those as they directly affect the running state of the app/clust... | Kubernetes rollback entire cluster state |
You can specify additional Docker arguments by editing the csproj file and adding the following:<DockerfileRunArguments>arguments go here</DockerfileRunArguments>An example of a csproj file edited to connect the Docker container to a network calledmongo_clusterwould look as follows<Project Sdk="Microsoft.NET.Sdk">
<... | I have created an ASP.NET CORE api and added Docker support to the project (sftt.app). I also have a MongoDB instance in another container (sftt.db). In order to ease connecting the application to the Database, I use the name of the Database container in the connection string. This requires that both containers be conn... | How to connect Docker container to Docker Network when started in Visual Studio |
To do this you needtransparentparameter of Nginx proxy_bind directive which is available on Nginx Plus R10 or Nginx 1.11.2+. Also you need to configure routing table and firewall for IP transparency andtcfor direct server response. A working example is fully described here:https://www.nginx.com/blog/ip-transparency-dir... | Is there a way to configure Nginx to work as a Direct Server Return (DSR) load balancer similar to this:http://blog.haproxy.com/2011/07/29/layer-4-load-balancing-direct-server-return-mode/ | Can Nginx work as Direct Server Return load balancer? |
You should research how SQL Server executes queries. In this post I find a few wrong assumptions:
SQL server will load all these records in the memory
There are many physical join algorithms in use, including ones that spill to disk. SQL Server never uses OS paging under normal operations. It controls memory usage a... |
I wrote a database migration script that joins 3 tables from SQL server 2005 and uploads the result into AWS database. The query is something like this:
SELECT a.x, b.y, c.z
FROM Books a join Editions b on a.id = b.book_id
join BookExtras c on c.edition_id = b.id
Books, Editions and BookExtras tables have millions... | SQL server select all rows memory performance |
To access a single file or directory:While browsing directories: Click on the "latest commit <refid>" link at the top of the file list, and then "Browse code" in the blue area near the top.While viewing a file: Click on "History" and then on the "<>" button next to the refid to get a link.ShareFolloweditedMar 23, 2019 ... | Here is a sample project on github:http://github.com/ripper234/Test-grails-projectI would like to capture the latest revision, and send a link to it to someone, so that even if the project changes later he will see the specific revision I was talking about. I guess forking could do that, but it's overkill.How do I do t... | Link to a specific (current) revision on GitHub |
I can give you two solutions.The first is to make a standard render-to-texture, but with a cubemap attached as the destination buffer. If your hardware is recent enough, it can be done in a single pass. This will deal with all the needed math in HW for you, but data repartition of cubemaps aren't ideal (quite a lot of ... | I am trying to write an optimized code that renders a 3D scene using OpenGL onto a sphere and then displays the unwrapped sphere on the screen ie producing a planar map of a purely reflective sphere. In math terms, I would like to produce a projection map where the x axis is the polar angle and y axis is the azimuth.I ... | GPU Render onto sphere |
S3 is not a file server, nor does it offer operating system file services, such as data manipulation.
If there is many "HUGE" files, your best bet is
start a simple EC2 instance
Download all those files to EC2 instance, compress them, reupload it back to S3 bucket with a new object name
Yes, you can use AWS lambda t... |
I have a bunch of files inside Amazon s3 bucket, I want to zip those file and download get the contents via S3 URL using Java Spring.
| How to zip files in Amazon s3 Bucket and get its URL |
You could mount your customnginx.confinto the container indevelopmentvia e.g.--volume ./nginx/nginx.conf:/etc/nginx/nginx.confand simply omit this parameter todocker runinproduction.If usingdocker-compose, the two options I would recommend are:Employ the limited support forenvironment variable interpolationand add some... | I'm just getting started with Docker. With the official NGINX image on my OSX development machine (with Docker Machine as the Docker host) I ran up against the bug withsendfileand VirtualBox which means the server fails to show changes I make to files.The workaround for this is to use a modified nginx.conf file that tu... | Docker: how to manage development and production settings? |
You want to reallocicharacters, plus one for the null terminator, so change this (which allocates just one character):shortened = realloc(shortened, 1 * (sizeof(char)));to this:shortened = realloc(shortened, (i + 1) * (sizeof(char))); | The goal of the program is to get the user input from the terminal, and then print out the last character of each word the user inputted.For example, "Hello World" should print out "od".Here is the code. I am not sure where I am going wrong when I try to resize the char pointer. The code follows.The issue only occurs w... | Where am I going wrong when allocating memory in this simple C program? |
The fact that Sonar server is running on a different machine is definitely not a problem for launching an analysis, and you shouldn't have any problem running a Sonar analysis from your Jenkins master, may the Sonar DB and/or the Sonar Server be on different machines.You just have to make sure that the configuration on... | I have a Jenkins job running Maven on master machineI've added a post build step to run Sonar and pointed it to the project'spom.xml.The problem is that Jenkins build runs on master, and Sonar server is running on different machine. So when the build finishes, Sonar looks for the build artifacts in the repository where... | Sonar looks for artifacts in wrong maven repository |
Rodrigo Moraes created some special loaders for Jinja2 under GAE, seehere. It's not bytecode caching but it precompiles all templates to Python so you avoid the Jinja2 parsing overhead.Note that (fromthis GAE page):compiled application code is cached
for rapid responses to web requests | I have started usingJinja2as my templating engine on Google App Engine (in Python).My question is this: Will bytecode caching work in production? It is working very well on the development server, but I read somewhere that bytecode caching depends on themarshalmodule, which is not supported in App Engine.This answerto ... | Jinja2 in Google App Engine |
now at first this does not make sense - i have 250GB memory so i should be able to launch five pods each requesting 50GB memory. shouldn't i?This depends on how much memory that is "allocatable" on your node. Some memory may be reserved for e.g. OS or other system tasks.First list your nodes:kubectl get nodesThen you g... | I am running single node K8s cluster and my machine has 250GB memory. I am trying to launch multiple pods each needing atleast 50GB memory. I am setting my pod specifications as following.Now I can launch first four pods and they starts "Running" immediately; however the fifth pod is "Pending".kubectl describe podssho... | what is kubernetes memory commitment limits on worker nodes? |
You need to enable WebSocket proxying to allow the editor to connect back to the runtime.To do that you need to add some additional options to yourlocationconfigs:location / {
proxy_pass "https://127.0.0.1:8080";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_h... | Greetings I am configuring a node-red server and after apply Nginx redirect I got the following issue.After Using Nginx to redrect subdomain node-red.domain.com to localhost:1880Nginx redirect config:server {
listen 80;
server_name sub1.domain.com;
location / {
proxy_pass "https... | nginx make node-red Lost connection to server but deploy works |
It is a one-to-one relationship.You can have many PVs in your environment. A specific PVC is aclaimfor a specific instance that match your requested criterias, e.g. size and type. The volume will be claimed and hold your data as long as your PVC-resource exist in your cluster, but if you delete your PVC, the data might... | This question already has answers here:Kubernetes NFS Persistent Volumes - multiple claims on same volume? Claim stuck in pending?(5 answers)Closed2 years ago.I'm currently writing the manifests for a few services in my home server that require persistent storage. I want to use PVs and PVCs. Do I create one single big ... | What is the relationship between Persistent Volumes and Persistent Volume Claims (1:1 or 1:n) [duplicate] |
Finally found a solution
$ git config --global url.git://github.com.insteadOf "https://github.com"
This forces the git protocol for public github sites without authentication while still working within the corporate network and our private GitHub repositories
|
When I try and git clone any repository using HTTPS, it will not prompt me for my access token, I just get a 403 error. git clone using SSH does work fine. I suspect the problem is related to being on a company laptop that uses ZScaler and HTTPS trust\certificate chain is broken.
How does git know what certificates to... | Unable to set GitHub access token |
+100This type of integration is blended of different things like AWS Java API, Log4J API, and AWS Cloud Watch configurations.You can achieve that by implementing acustomized log4j appender.
An example you may leverage from github is thefollowing link.The idea is to add the log4j appender class to your source project an... | I have a daemon in Scala running on EC2 that processes jobs. For each job I know a (possibly) different log stream I'd like to append messages to.How can I make a log-stream specific Appender that I can attach to my log4j logger, and change it when my listener moves on to the next job? | How to log to an explicit AWS CloudWatch log stream and change it programmatically (Java/Scala/log4j) |
Did you already get it? If not, you can try setting Default Root object for your cloudfront distribution.
|
I have an S3 bucket. When accessing its root URL via https://s3.amazonaws.com/... it tells me Access denied.
This S3 bucket doesn't have any permission rules defined for Everyone.
However, accessing the same bucket via our CloudFront Domain Name a full ListBucketResult is being returned.
CloudFront is giving a full di... | How do you disable directory listing in AWS CloudFront? |
.Remove all un-commited changes.2.Apply the changes from the stash by selecting from the stash list.Git->UnstashChanges -> (select the first one) ->ApplyStash3.Commit your changes4.Then use the VCS arrow to pull and merge the changes from the remote repository | I am working on an Android application for a school project and need assistance.I am new to collaborative development and version control with Github and I need to know how to revert to a previous commit using Android Studio's implementation of Git version control.I was just about to commit a large chunk of new code an... | Reverting git repository to previous commit in Android Studio |
You might have to construct it.
https://<restApiId>.execute-api.<region>.amazonaws.com/<stageName>
|
I have an API that has been deployed in a stage in API Gateway. I am trying to get the URL of the deployed API using cli, but am having difficulties finding the command to do so. I have tried all the get- commands from the docs, found here:
https://docs.aws.amazon.com/cli/latest/reference/apigateway/index.html#cli-aws... | Obtaining a deployed API Gateway URL using awscli |
If your editor uses CRLF:
git config --global core.autocrlf true
If your editor uses LF:
git config --global core.autocrlf input
You can also use a .gitattributes file in each project to save certain types with certain line endings. I use something like this because git will try to convert the crlf byte sequence in sa... |
What exactly should I write in the terminal to global config my git to save all files always with line endings = LF. I work on Windows but most of my co-workers use macOS and I want to save all my work on my PC with line endings = LF setting
I found this tutorial Dealing with line endings - GitHub help, but I still do... | Git global settings and dealing with line endings once and for all |
I recommend looking at existing libraries, that is if you want to know what other devs think the proper way to implement things is.Guzzle (because I see that you are using it already)https://github.com/commerceguys/guzzle-oauth2-pluginPHPleague (acommunity with really useful examples and packages)https://github.com/the... | So, I need to get the authorization code that is being sent to my site by the host in an OAuth2 situation where I am the client. When the host sends back an authorization code, what is the proper way to strip the code from the URL and then send it back to retrieve a token and secret?I have tried stripping the code in t... | Get token for OAuth2 in Laravel |
2
If I understand you correctly you want a past commit as the last commit on the branch.
If so, using examples with origin and master:
Use git reset <comit_id> and then git push origin +master to push & delete all commits past the one you reset to. Notice the + sign before ... |
There is a certain commit I did to my Git repository which I host in GitHub. After that commit I've made several other commits, which were bad and redundant, in a second look. I thus need to revert to the certain commit / certain point in history before these bad changes.
I didn't find a button like "revert to this ve... | GitHub: Commit a point in history as the head of master |
See below github issue
https://github.com/docker/for-mac/issues/1443#issuecomment-288055240
which points to
https://github.com/docker/for-mac/issues/1156#issuecomment-273764881
and which indicates you can't do it as of now using config. You can do it like below
$ socat TCP-LISTEN:2376,reuseaddr,fork,bind=127.0.0.1 UN... |
I am a neophyte when it comes to networking issues more generally, and Docker specifically, which I'm sure will become apparent in this question.
Right now the relatively simple thing I'd like to accomplish is enabling the tcp socket on Docker for Mac (and further to that, understanding where to ping my Docker host fr... | how to connect to Docker via TCP on MacOS |
It doesn't find the dependencies because you have set the root folder to the folder app, which won't get access to the bower components.
Instead you should "build" your app using gulp or grunt to the dist folder and deploy that folder to your server:
root /home/gestAngular/dist;
|
I'm trying to deploy my AngularJS app generated with Yoeman on Nginx, this is my nginx configuration :
server {
server_name 0.0.0.0;
listen 8080;
root /home/gestAngular/app;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
but when i start nginx, my app dosent fin... | Deploy AngularJS App on Nginx |
+25You can use something like this for installingnginxchartmyChart, err := loader.Load("https://charts.bitnami.com/bitnami/nginx-8.8.4.tgz")
...
install := action.NewInstall(m.actionConfig)
install.ReleaseName = "my-release"
...
myRelease, err := install.Run(myChart, myValues)It would be similar to:helm ins... | Im using the following code to install chart that is bounded in my source code (eg. in myapp/chart/chart1in my go bin app), Now I need to move the chart togit repositoryor toartifactory,My question is how can I install the chart from outside my program?This is the code I use which works for bundled chartI use thehelm3l... | Helm go sdk install chart from external location |
There is no SonarQube PowerShell Plugin available as of now. | Is there a way Sonar can also analyze my PowerShell scripts?
Does anyone know a plugin?I know there are some other Ways likePSScriptSAnalyzerbut we would really like to integrate it in our flow with sonar. | Is there a way to analyze powershell scripts wih Sonar? |
This is related toIncident with Actions, API Requests and PagesPages is experiencing degraded performanceWe are seeing failures in Actions jobs using environments.Downstream impact on the deployments of GitHub Pages.The fix for failing Actions jobs using environments is rolling out. We are expecting the rollout to take... | I tried to commit a change for a Github pages site. It reads: "deploy is waiting for github-pages deployment approval" and doesn't update the site. I've used Github pages frequently and this has never happened before. Any ideas as to what's causing this or how to fix it? This is in Github actions. I'm using Github in b... | Deploy taking hours on Github: "waiting for github-pages deployment approval" |
This is a bug/oddity in nslookup. The "can't resolve" message is actually about the DNS server in use, not the site you are trying to look up.For example this query (which tells nslookup to lookup google.com using the 8.8.8.8 DNS server) has no error message:nslookup google.com 8.8.8.8
Server: 8.8.8.8
Address 1: 8.... | I am on ubuntu, and I am running a docker default bridge network. I have containerized versions of zookeeper, kafka, and an app that I wrote that talks to kafka.I do a:docker exec -it <my-app id> /bin/bashThen inside my app's container I runnslookup kafka/go # nslookup schmafka
nslookup: can't resolve '(null)': Name do... | nslookup reported "can't resolve '(null)': Name does not resolve" though it successfully resolved the DNS names |
Your rule will never fire due to conflicting regex pattern matches.Try this rule:RewriteCond %{REQUEST_URI} !-f
RewriteRule ^store/images/products/p(\d+)/cache/([^.]+)\.card\.jpg$ index.php?r=backend/product/imageNew/$1/$2 [R,L]You're matching^$inRewriteRulebut matching URI =store/...inRewriteCond.ShareFollowansweredDe... | I have a htaccess rule that is not working now.RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} ^store/images/products/p(\d+)/cache/([^.]+).card.jpg
RewriteRule ^$ index.php?r=backend/product/imageNew/$1/$2 [R,L]The rule should force the broken images like this one: /store/images/products/p6/cache/i... | htaccess, if the image is not found go to other location |
Add this rule on top of your s7d9.scene7.com .htaccess file for rewrites /is/image/unisol/any to /is/image/ScanSource/any<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^is\/image\/unisol\/(.*)$ /is/image/ScanSource/$1 [L]
</IfModule> | I'm trying to hide the original image path from my WordPress site. wherever it does not work. but other rules are work properly.I had tried likeRewriteEngine On
RewriteRule ^unisol/([^/]+)$ ScanSource/$1 [L]but it is not working.when I check on .htaccess checker it shows true.I need image path like bellowOriginal Path:... | how to hide original image path using .htaccess |
You can only changea very limited set of container optionsafter a container starts up. Options like environment variables and container mounts can only be set during the initialdocker runordocker create. If you want to change these, you need to stop and delete your existing container, and create a new one with the ne... | I want to mount my usb drive into a running docker instance for manually backup of some files.I know of the-vfeature ofdocker run, but this creates a new container.
Note: its a nextcloudpi container. | How to mount a host directory into a running docker container |
If you still have origin/* remote-tracking names in your local repository, you can do this. Warning: it's a bit clumsy. It's probably better to just grab the list of names into a file and edit it, rather than using the grep -v HEAD trick.
git for-each-ref --format='%(refname):refs/heads/%(refname:lstrip=3)' refs/rem... |
I need to "re-push" all branches (not just local branches) from my local clone to my origin (github server).
git push --all origin only pushes the branches that I had previously checked out. I want to push all of them, including the ones that I did not check out.
Why do I need to do this? Because someone did a git pus... | How do I re push all branches in Git? (not just local branches) |
I hit the same issue. You need to specify the full domain name including the host in theDomainValidationOptionsDomainNameparameter, and just specify the hosted zone id:Resources:
MyAPICert:
Type: AWS::CertificateManager::Certificate
Properties:
DomainName: xxxx.dev.mydomain.io
DomainValidationOpti... | According the AWS docs athereandhereI should be able to automate a certificate creationand validationusing cloudformation. Apparently when you specify aHostedZoneIdin theDomainValidationOptions, it is supposed to create the required DNS record to complete the validation (at least that is what it seems from the very vag... | CloudFormation AWS::CertificateManager::Certificate automated certificate validation |
You can use a LinkedHashMap (Java 1.4+) :
// Create cache
final int MAX_ENTRIES = 100;
Map cache = new LinkedHashMap(MAX_ENTRIES+1, .75F, true) {
// This method is called just after a new entry has been added
public boolean removeEldestEntry(Map.Entry eldest) {
return size() > MAX_ENTRIES;
}
};
//... |
I know it's simple to implement, but I want to reuse something that already exist.
Problem I want to solve is that I load configuration (from XML so I want to cache them) for different pages, roles, ... so the combination of inputs can grow quite much (but in 99% will not). To handle this 1%, I want to have some max n... | Easy, simple to use LRU cache in java |
You can call them separately:
#!/bin/bash
docker-compose -f docker-compose.yml up -d
docker-compose -f docker-compose-mongo.yml up -d
Or combine both nginx and mongo services in the same docker-compose.yml.
|
I am new to scripting and require some assistance. I am building docker container using YML file. I have YML code written to automate my web server (docker-compose.yml) and database server(docker-compose-mongo.yml).
Now I want to build a bash script that will call for both the yml files and run together.
I was wonde... | Run docker-compose from bash script file |
AWS CodePipeline supports to deploy to ECS directly now. You can use the new ECS deploy action to update your ECS service to use the new container image you created. You need to modify your build step to output a configuration file which contains the image URL of the new image you built. More details can be found hereh... | I have a cluster on ECS with a container service. I've setup CodePipeline to build a new container on an update and push this to ECR. How can I trigger an update to my cluster to use the newly updated container? | How can I use AWS CodePipeline to update a container service on ECS |
You cannot use ACM to directly install your ACM Certificate on your AWS based website or applicationhttps://docs.aws.amazon.com/acm/latest/userguide/gs-acm-install.htmlYou must use one of the following services:Elastic Load BalancingAmazon CloudFrontAWS Elastic BeanstalkAmazon API GatewayAWS CloudFormation
Please read ... | So far i did below configuration.I hosted my site on EC2 AWS machine. Public ip and public DNS.I can access my website by ip as well as public DNS.I purchased domain name from GoDaddy. www.xxtrasc.comOn AWS I created Hosted Zone then map www.app.xxtrasc.com successfully.Now i access my website directly www.app.xxtrasc.... | how to enable (https) SSL certificate AWS EC2 hosted site |
1
I think the error is in the ENTRYPOINT line. You use the path "name.exe/bin" instead of "bin/name.exe" which is where your COPY put the file.
You actually don't need the entrypoint if you use CMD as @helmbert said.
I think the difference between ENTRYPOINT and CMD is that... |
I am facing problem when I build and run my image. here is my docker file code.
FROM microsoft/nanoserver
MAINTAINER [email protected]
COPY name.exe /bin/
ENTRYPOINT ["name.exe/bin"]
CMD ["/bin/name.exe", "input1", "output"]
To build I am using this : docker build -t my name .
When I build it it shows successfully b... | how to run any exe application on docker |
To do it from the Web U:Go to the people tab of the organization (https://github.com/orgs/myorg/people).Filter/find the person.Click their name; this will take you tohttps://github.com/orgs/myorg/people/theirusername, which lists all repos they have access to, including repos in the organization and forks the user has ... | When you remove a user from an organization, GitHub warns you that all their forks of the organisation's private repos will be deletedRemoving people from the XX organization will also delete their forks of any private XX-owned repositories.And GitHub tells you how many private forks the user has but it does not tell y... | GitHub: How to list all the private repositories that a particular user has forked? |
You can use panelStatto achieve similar result.For this:Add your query, for examplemy_query, and set its options (under query) to Type:Instant, Format:Table,Add TransformationConvert field type, Fieldexpire_daysasNumber,In the panel options:Value options:Show:All values,Limit: some number bigger than number of your cer... | We have e.g. 500 certificates to monitor, across several customers/environments/vm's.In Grafana, I want to create a high overview of all certificates validation time left.We'd like to use the 'status panel plugin':Assume a prometheus query w this dummy result:my_query{host="vm-1", cert_type="something", expire_days="23... | grafana - build tiles dynamically |
You are right in the sense it reads the directory structure, creates partitions out of it and then updates the hive metastore. In fact more recently, the command was improved to remove non-existing partitions from metastore as well. The example that you are giving is very simple since it has only one level of partitio... |
I know that MSCK REPAIR TABLE updates the metastore with the current partitions of an external table.
To do that, you only need to do ls on the root folder of the table (given the table is partitioned by only one column), and get all its partitions, clearly a < 1s operation.
But in practice, the operation can take a ... | What does MSCK REPAIR TABLE do behind the scenes and why it's so slow? |
mutate does operations in afixed order, and split comes before copy, so the targetList field does not exist at the point when the split runs. Split it into two mutatesmutate { copy => { "[log][target]" => "targetList" } }
mutate { split => { "targetList" => "-" } }Please tag this as answering your problem if it solve... | I'm having trouble splitting the string type field(target) in logstash."log" => {
"address" => "0.0.0.1",
"target" => "hello.exe - PID: 3005 - Module: nthdll.dll"
}I try to divide by "-" and this is my code :mutate {
copy => { "[log][target]" => "targetList" }
split => { "targetList" => "-" }
}but it is not work... | Elastic search's Logstash Mutate Split is not working |
You can use interfaces for doing such garbage collection.
If you use interfaces and not classes, you don't have to put an explicit try...finally block, with a call to the free method in the finally section. The compiler will generate it for you, just like with regular string methods.
You can extend this trick to every... |
Is there any third party solution , VCL ,Plugins etc to do automatic garbage collection in Delphi for win32
| Third party Solution for Garbage Collection in Delphi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.