Skip to content

Instantly share code, notes, and snippets.


Sean McNamara allquixotic

  • GDIT
  • Maryland, USA
View GitHub Profile
View pcae.c
//C99 program that prints out the supplied command line arguments and exits. WTFPL
//Compile with `gcc -std=c99 pcae.c -o pcae`
#include <stdio.h>
int main(int argc, char **argv)
for(int i = 0; i < argc; i++)
printf("argument %d: %s\n", i, argv[i]);
View gist:4964713
pattern=$(awk -vORS=" " -v q="'" '{ print q $1 q }' .gitignore | sed 's/,$/\n/')
echo zip -r ignored $directory -i $pattern
zip -r ignored $directory -i $pattern
View gist:6194351
<!doctype html>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
View gist:6195836
<!doctype html>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
View tetris.html
<!doctype html><html lang="en-us"><head><meta charset="utf-8"><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><title>Emscripten-Generated Code</title><style>.emscripten{padding-right: 0;margin-left: auto;margin-right: auto;display: block;}textarea.emscripten{font-family: monospace;width: 80%;}div.emscripten{text-align: center;}div.emscripten_border{border: 1px solid black;}/* the canvas *must not* have any border or padding, or mouse coords will be wrong */ canvas.emscripten{border: 0px none;}</style></head><body><hr/><div class="emscripten" id="status">Downloading...</div><div class="emscripten"><progress value="0" max="100" id="progress" hidden=1></progress></div><div class="emscripten_border"><canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas></div><hr/><div class="emscripten"><input type="checkbox" id="resize">Resize canvas <input type="checkbox" id="pointerLock" checked>Lock/hide mouse pointer    <input type="button" value="Fullscreen" onclick="Module
allquixotic / gist:7553961
Last active Dec 28, 2015
how to install linux-vserver 3.10.19 patch vs2.3.6.8 on Debian Wheezy
View gist:7553961
  1. sudo apt-get install build-essential git
  2. sudo apt-get build-dep linux-image-$(uname -r) libncurses5-dev
  3. mkdir ~/dev; cd ~/dev
  4. wget
  5. wget
  6. tar xJf linux-3.10.19.tar.xz
  7. mv patch-3.10.19-vs2.3.6.8.diff linux-3.10.19
  8. cd linux-3.10.19
  9. git apply patch-3.10.19-vs2.3.6.8.diff
  10. cp /boot/config-* .config # CRITICAL STEP: Replace * with the latest vanilla kernel version you have installed from the Debian package repositories. Try ls /boot for info.
allquixotic / gist:7677760
Last active Dec 29, 2015
browser crash ff linux
View gist:7677760
<!DOCTYPE html>
<meta charset="utf-8">
<title>FF Linux SVG Browser Crash</title>
<script type="text/javascript">
var i = 0, j = 2500, removePrev = false;
var urls = ['','','','','','','','','','','','
allquixotic / crash.svg
Created Nov 27, 2013
Firefox worst-case svg behavior - memory balloons and CPU pegs -
View crash.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
allquixotic / gist:8197531
Created Dec 31, 2013
chatbotjohncavil memory dec. 31 2013
View gist:8197531
allquixotic / driver.js
Created Jan 3, 2014
properly sanitized zombie.js bot this time
View driver.js
// Make sure we got a filename on the command line.
if (process.argv.length < 3) {
console.log('Usage: node ' + process.argv[1] + ' FILENAME');
// Read the file and print its contents.
var fs = require('fs')
, filename = process.argv[2]
, happy = "";
fs.readFile(filename, 'utf8', function(err, data) {