Skip to content

Instantly share code, notes, and snippets.

View beardhatcode's full-sized avatar

Robbert Gurdeep Singh beardhatcode

View GitHub Profile
@beardhatcode
beardhatcode / AssemblyLST.tex
Created March 24, 2014 10:39
Assembly syntax highlighting
\usepackage{listings}
\usepackage{color}
\usepackage{float}
\definecolor{lightgray}{rgb}{0.95, 0.95, 0.95}
\definecolor{darkgray}{rgb}{0.4, 0.4, 0.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
% Shamelessly stolen from: http://tex.stackexchange.com/a/22992/37828
\lstdefinelanguage{Assembler}[x86masm]{Assembler}{%
@beardhatcode
beardhatcode / daysoftheyear.sh
Last active December 24, 2015 19:08
Gets information about the current day from http://www.daysoftheyear.com
lynx -dump http://www.daysoftheyear.com/days/$(date +%Y)/$(date +%m)/ | grep -v "^\s" | grep -v "^\s*$"|sed "s/\[[0-9]*\]/ -/;s/And also.../Fun 33th Mon, 9999/"|sed -n "/\S* $(date +%-d)\S* \S*, \d*/,/\S* \d*\S* \S*, \d*/p"|head -n -1;echo "See http://www.daysoftheyear.com for more"
@beardhatcode
beardhatcode / konami.js
Last active April 4, 2020 01:02
Do KONAMI up up down down left right left right b a
function(){
//Konami magic
var code=[38,38,40,40,37,39,37,39,66,65], konamiStep=0;
window.addEventListener("keydown", function(event) {
if(event.keyCode==code[konamiStep]){konamiStep++;}else{konamiStep=0;}
if(konamiStep==code.length){
//KONAMI MAGIC HERE
konamiStep=0;
}
}, false);