Skip to content

Instantly share code, notes, and snippets.

@andrewbolster
andrewbolster / vimrc
Created October 20, 2015 09:46
My Fucked VIMrc
" Pathogen : https://github.com/tpope/vim-pathogen
execute pathogen#infect()
set nocompatible " be iMproved
filetype off " required!
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
x, *xs, y, z = map(lambda j: lambda i: j**i ,range(1, 10))
x(2),y(2),z(2)
awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' INFILE > OUTFILE
➜ _posts git:(master) ✗ file 2014-01-20-schreibdochmal_19_01_14.md
2014-01-20-schreibdochmal_19_01_14.md: exported SGML document, UTF-8 Unicode (with BOM) text, with very long lines
➜ _posts git:(master) ✗ file 2014-01-11-the-making-of-a-timelapse.md
2014-01-11-the-making-of-a-timelapse.md: ASCII text, with very long lines
@andrewbolster
andrewbolster / .oh-my-zsh\oh-my-zsh.sh
Created January 12, 2014 21:12
My zsh config for debugging
# Check for updates on initial load...
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
/usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh $ZSH/tools/check_for_upgrade.sh
fi
# Initializes Oh My Zsh
# add a function path
fpath=($ZSH/functions $ZSH/completions $fpath)
@andrewbolster
andrewbolster / Ubuntu Touch Install
Created December 20, 2013 16:10
Simplest device flashing process ever
sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo aptitude -y install phablet-tools android-tools-adb android-tools-fastboot
phablet-flash ubuntu-system --channel devel --bootstrap
@andrewbolster
andrewbolster / NI or Irish Inventions
Created December 2, 2013 19:58
List of Irish Inventions
* C14 - Whiskey
* 1680s - Chocolate Milk
* 1730 - the concept of an entrepreneur - Richard Cantillion introduced the term before Jean-Baptiste Say in his work
* 1813 - the mining safety lamp
* 1836 - the induction coil
* 1844 - the syringe
* 1851 - the stereo-stethoscope
* 1866 - the trans-atlantic phone call
* 1891 - the torpedo
* 1884 - the steam turbine
@andrewbolster
andrewbolster / RCUK Arduino
Created November 15, 2013 11:15
Jing Deng's Arduino code for RCUK Magherafelt project
/*
Melody
Plays a melody
circuit:
* 8-ohm speaker on digital pin 8
created 21 Jan 2010
modified 30 Aug 2011
@andrewbolster
andrewbolster / brutus
Created November 11, 2013 19:17
Solution to PyPool 11/11/13 Problem: You have intercepted a coded message. (Also available in plain text.) Your objective is to identify the source of the material. You can see from the character encoding of the HTML document that the encoded message is in Unicode. You have also received intelligence that the original message is in English and t…
import string
from urllib.request import urlopen
from collections import Counter
def getCipherText():
cipherreq = urlopen("http://pypool.daihuws.me.uk/crypto/encrypted.txt")
cipherstr = cipherreq.read().decode("utf-8")
cipherreq.close()
return cipherstr
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.