Skip to content

Instantly share code, notes, and snippets.

View VladimirCores's full-sized avatar
💭
evolve

Vladimir Minkin VladimirCores

💭
evolve
View GitHub Profile
@VladimirCores
VladimirCores / gist:8e3ea60ae8c37c008181b4265d6ae991
Created September 29, 2019 13:09
Remove breaks from text and copy to clipboard
function copyToClipboard(text) {
var dummy = document.createElement("textarea");
// to avoid breaking orgain page when copying more words
// cant copy when adding below this code
// dummy.style.display = 'none'
document.body.appendChild(dummy);
//Be careful if you use texarea. setAttribute('value', value), which works with "input" does not work with "textarea". – Eduard
dummy.value = text;
dummy.select();
document.execCommand("copy");
0. Downalod atlassian-jira-core-X.X.X-x64.bin
1. gcloud config set compute/zone europe-west4-a
2. sudo chmod a+x atlassian-jira-core-X.X.X-x64.bin
3. sudo ./atlassian-jira-core-X.X.X-x64.bin
@VladimirCores
VladimirCores / meta-tags.md
Created August 10, 2018 18:57 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@VladimirCores
VladimirCores / gist:5df9026ccd882799ab43523d63b6d9b3
Created August 9, 2018 16:33
Convert image to base64 on mac with OpenSSL
openssl base64 -A -in <image_path> | pbcopy
@VladimirCores
VladimirCores / gist:5a35fe7804f131cbdf75b47c1c50039e
Created August 8, 2018 08:23
Change all files permission from current folder to not executable in git
find . -type f -exec git update-index --chmod=-x {} \;
git status
git commit -m "Changing file permissions to remove execute bit"
git push
gcloud config list project
gcloud compute target-vpn-gateways \
create vpn-1 \
--network vpn-network-1 \
--region us-east1
gcloud compute target-vpn-gateways \
create vpn-2 \
--network vpn-network-2 \
@VladimirCores
VladimirCores / gist:72c2a19143a47a5318f41f1d9bb7a449
Created May 17, 2018 12:08
GCP - Multiple VM instances creation from console
for i in {1..3}; \
do \
gcloud compute instances create "nginxstack-$i" \
--machine-type "f1-micro" \
--tags nginxstack-tcp-443,nginxstack-tcp-80 \
--zone us-central1-f \
--image "https://www.googleapis.com/compute/v1/projects/bitnami-launchpad/global/images/bitnami-nginxstack-1-10-2-0-linux-debian-8-x86-64" \
--boot-disk-size "200" --boot-disk-type "pd-standard" \
--boot-disk-device-name "nginxstack-$i"; \
done
Here what you need to do:
1. Install pm2: npm i -g pm2
2. Run: pm2 start http-server-spa --name “DAZN” -- -p 8080 -d false
3. Manage processes: pm2 status, pm2 monit, pm2 logs, pm2 delete 0, pm2 restart 0
4. See “pm2 help” for more info
UPDATE:
You can use web interface and monitor you process from browser, for that install pm2-web
https://github.com/achingbrain/pm2-web
And run it same way: pm2 start pm2-web --name “WEB”
echo "deb https://apache.bintray.com/couchdb-deb stretch main" \
| sudo tee -a /etc/apt/sources.list
&& curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc \
| sudo apt-key add -
&& sudo apt-get update && sudo apt-get install couchdb