This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=PhpStorm | |
Icon=/usr/share/applications/phpstorm/bin/webide.png | |
Exec="/usr/share/applications/phpstorm/bin/phpstorm.sh" %f | |
Comment=The Drive to Develop | |
Categories=Development;IDE; | |
Terminal=false | |
StartupWMClass=jetbrains-phpstorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# IMPORTANT. This will install phpstorm to the shared application space in /usr | |
# IMPORTANT. Run with sudo! | |
echo -n "Please enter the PhpStorm download url (eg http://download.jetbrains.com/webide/PhpStorm-EAP-141.690.tar.gz): " | |
read url | |
# Download file from url | |
echo "Downloading PhpStorm to /tmp" | |
cd /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go parameters | |
GOCMD=go | |
GOBUILD=$(GOCMD) build | |
GOCLEAN=$(GOCMD) clean | |
GOTEST=$(GOCMD) test | |
GOGET=$(GOCMD) get | |
BINARY_NAME={{binary_name}} | |
BINARY_UNIX=$(BINARY_NAME)_unix | |
all: test build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl --silent "https://discovery.etcd.io/$1" | \ | |
jq '.node.nodes | map(.value)' | \ | |
grep -oE '([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3})' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo $(curl --silent "https://discovery.etcd.io/$1" | \ | |
jq '.node.nodes | map(.value)' | \ | |
grep -oE '([[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\:[[:digit:]]{4})' | \ | |
sed -e 's/2380/2379/g; 1!s/^/,/g') | \ | |
sed -e 's/\(\s\)//g' |