Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Evans bencevans

View GitHub Profile
@bencevans
bencevans / install-ivpn.sh
Created Apr 18, 2016
Install OpenVPN + iVPN Config Files.
View install-ivpn.sh
#!/bin/bash
echo IVPN Installer...
echo Ensuring wget is installed
which wget
if [[ $? == 1 ]]; then
echo Installing wget
sudo apt-get install -y -qq wget
fi
View ubuntu-diff-from-base.sh
tasksel --task-packages ubuntu-desktop | sort > /tmp/base
dpkg --get-selections | awk '{print $1}' | sort >/tmp/selections
diff -u /tmp/base /tmp/selections | less
View keybase.md

Keybase proof

I hereby claim:

  • I am bencevans on github.
  • I am bencevans (https://keybase.io/bencevans) on keybase.
  • I have a public key whose fingerprint is F3AF CA92 92B7 A6F3 E2B2 2A21 9AE7 1F2C 871E DB67

To claim this, I am signing this object:

@bencevans
bencevans / lpk25.js
Created Jan 22, 2016
AKAI LPK25 Keyboard Events
View lpk25.js
const midi = require('midi')
var input = new midi.input()
input.getPortCount()
input.getPortName(0)
input.on('message', function (deltaTime, message) {
View clean-ignored.sh
while read p; do
git rm -r --cached $p
done < .gitignore
@bencevans
bencevans / brunel-week.js
Created Oct 6, 2015
Get the Brunel Week Number in JavaScript
View brunel-week.js
var today = new Date()
var secondsInAWeek = 604800
var startDate = new Date(2015, 8, 20)
var weekNo = Math.ceil((today - startDate) / (secondsInAWeek * 1000))
console.log('Current Week Number: ' + weekNo)
@bencevans
bencevans / Tabs2SpacesAndRemoveTrailingSpaces.sh
Created Jun 25, 2014
Tabs 2 Spaces + Remove Trailing Spaces in .js files
View Tabs2SpacesAndRemoveTrailingSpaces.sh
for file in split $(find -path "./*.js"); do
expand --tabs=2 $file | sed 's/[ \t]*$//' > "${file}_temp"
mv "${file}_temp" $file
rm "${file}_temp"
done
View dabblet.css
html, body {
margin: 0;
height: 100%;
padding: 0;
font-size: 30px;
}
.container {
width: 80%;
text-align: center;
margin: auto;
View docker-postgresql.md

Ubuntu Docker PostgreSQL How-To

How to use [zaiste/postgresql][1] Docker container.

Docker >= 0.5.0 required.

sudo docker pull zaiste/postgresql