This file contains hidden or 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
FROM google/dart | |
ADD ./dart-sass-1.62.0-linux-x64.tar /opt/ | |
WORKDIR /opt/dart-sass | |
ENTRYPOINT ["/opt/dart-sass/sass", "--watch", "/css"] |
This file contains hidden or 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
post_to_slack() { | |
USERNAME="<username>" | |
CHANNEL="<channel>" | |
MESSAGE="$1" | |
PAYLOAD="payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"text\": \"$MESSAGE\"}" | |
SLACK_URL=<webhook_url> | |
curl -X POST --data-urlencode "$PAYLOAD" $SLACK_URL | |
} | |
This file contains hidden or 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
[alias] | |
co = checkout | |
st = status | |
cm = commit | |
sm = submodule | |
lg = log --color --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
This file contains hidden or 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
export RED="\033[0;31m" | |
export NO_COLOUR="\033[0m" | |
function check_keys() { | |
ssh-add -l >/dev/null | |
if [ $? -gt 0 ] | |
then | |
echo -en $RED | |
echo "You should add your key to the keychain" | |
echo -en $NO_COLOUR |
This file contains hidden or 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
import Image | |
SPACING = 10 | |
# Open source images | |
imgs = map(Image.open, ['1.gif', '2.gif', '3.gif', '4.gif']) | |
# Assume standard dimensions and store them | |
width, height = imgs[0].size | |
side_length = sqrt(len(imgs)) |
This file contains hidden or 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
# Download the latest pic of the day from NASA and delete or archive any | |
# previous ones in a specified directory. Optionally create a copy of the most | |
# current picture to allow OSX to pick up pictures as wallpapers | |
# | |
# Steve Challis 2011 | |
# http://schallis.com/2011/mar/20/nasa-astronomy-picture-of-the-day-background/ | |
DEST=`dirname $0` | |
NAME='img.jpg' | |
NAME_COPY='imgcopy.jpg' |
This file contains hidden or 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
parents(){ :(){ | |
read p n <<<`ps -o ppid,comm -p $1 | awk 'NR>1{print $1,$2}'`; | |
echo -e "$1\t$n"; | |
test $1 -ne 0 && : $p; }; | |
: $1; } |
This file contains hidden or 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
# Quick Bash function to lookup telephone extensions. Better if agrep is installed. | |
# Usage: | |
# $ tel steve | |
# 3900 - Steve Challis | |
# Terminal colour codes | |
export CYAN="\033[0;36m" | |
export GREEN="\033[0;32m" | |
PHONE_LIST='/usr/share/phone-extensions.txt' |
This file contains hidden or 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
var selection = window.getSelection(); | |
if (/^\d+\.\d+\.\d+\.\d+$/.test(selection)) { | |
window.open('http://www.geoiptool.com/en/?IP=' + selection, '_blank'); | |
} |