Skip to content

Instantly share code, notes, and snippets.

💭
λ𝑓.(λ𝑥.𝑓(𝑥𝑥))(λ𝑥.𝑓(𝑥𝑥))

Mark Wales smallhadroncollider

💭
λ𝑓.(λ𝑥.𝑓(𝑥𝑥))(λ𝑥.𝑓(𝑥𝑥))
Block or report user

Report or block smallhadroncollider

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@smallhadroncollider
smallhadroncollider / new-domain.sh
Last active Feb 23, 2019
Sets up a new domain with Nginx and initialises a Git respository
View new-domain.sh
#! /bin/sh
domain="$1"
# Check a domain is provided
if [ -z "$domain" ]
then
echo "Domain required"
exit
fi
View keybase.md

Keybase proof

I hereby claim:

  • I am smallhadroncollider on github.
  • I am smallhadron (https://keybase.io/smallhadron) on keybase.
  • I have a public key whose fingerprint is 0B9B 854F 2AC8 2A06 70DF 81A4 4FC4 9C94 7B6F 764F

To claim this, I am signing this object:

View orientation-detect.js
/*
Device agnostic orientation check
=================================
Should work on most mobile platforms. Trying changing the 250ms timeout to a
higher value if still doesn't work on some devices.
Can't rely on window.orientation as wrong result given on some Samsung devices.
iOS doesn't need the 250ms timeout and reports the correct result for
@smallhadroncollider
smallhadroncollider / Makefile
Created Mar 31, 2015
SCP Changes Makefile using Ag
View Makefile
.PHONY: watch
watch: .updated.ref
.updated.ref: $(shell ag -l -U -g "" --ignore={Makefile,.updated.ref})
@ touch $@
rsync -R -a --partial --progress --rsh=ssh $? abc@xyz.com:/var/www/xyz.com/
@ chrome-canary-cli reload
@smallhadroncollider
smallhadroncollider / git-store-working-tree.sh
Created Feb 13, 2015
Two shell functions to store/restore the working tree - for use between multiple computers
View git-store-working-tree.sh
git-store() {
branch=$(git rev-parse --abbrev-ref HEAD)
git checkout -b save-point && git add --all && git commit -m "save point" && git push origin save-point && git checkout "$branch"
}
git-restore() {
branch=$(git rev-parse --abbrev-ref HEAD)
git checkout save-point && git reset HEAD@{1} && git checkout "$branch" && git push origin :save-point && git branch -d save-point
}
@smallhadroncollider
smallhadroncollider / watch.sh
Last active Aug 29, 2015
Watch Shell Script for Makefiles
View watch.sh
#! /bin/zsh
# Setup empty variables
last_error_message=""
last_error_timestamp=""
last_error_time=""
last_message=""
time_since=0
while true;
You can’t perform that action at this time.