Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / untrusted-lvl7-solution.js
Created July 2, 2014 22:17
Solution to level 7 in Untrusted: http://alex.nisnevich.com/untrusted/
/*************
* colors.js *
*************
*
* You're almost at the exit. You just need to get past this
* color lock.
*
* Changing your environment is no longer enough. You must
* learn to change yourself. I've sent you a little something
* that should help with that.
anonymous
anonymous / untrusted-lvl6-solution.js
Created July 2, 2014 22:05
Solution to level 6 in Untrusted: http://alex.nisnevich.com/untrusted/
/****************
* drones101.js *
****************
*
* Do you remember, my dear Professor, a certain introductory
* computational rationality class you taught long ago? Assignment
* #2, behavior functions of autonomous agents? I remember that one
* fondly - but attack drones are so much easier to reason about
* when they're not staring you in the face, I would imagine!
@iori-yja
iori-yja / arm.vim
Created January 15, 2012 10:53
ARM Assembly syntax hilighting. put on $vim/syntax/
" Vim syntax file
" >Language: MCS-51 intel Mnemonics (armA)
" >Maintainer: Thomas Langewouters <thomas.langewouters@skynet.be>
" Inherit his script: iori yja
" Language: ARMv5-v7 Mnemonics.
" Last Change:
" Vim URL: http://www.vim.org/lang.html
" arm Home: ---
" arm Version: 2.00
@azizmb
azizmb / album_scrape.py
Created February 24, 2012 04:22
Script to download all photos from an album in imgur
from BeautifulSoup import BeautifulSoup
import requests
import os
album_url = "http://imgur.com/a/TYfWa/all/hot/day/page/%d?scrolled"
pages = 3
directory = "heroes"
posts_list = []
@tlehman
tlehman / st2_packageman.py
Created July 11, 2012 16:14
Sublime Text 2 Package manager install
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
@johnmurrayvi
johnmurrayvi / gcc-4.8-pm-fix
Last active December 19, 2015 01:59
patch to fix ng build with gcc 4.8
--- /usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h
+++ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h
@@ -32,6 +32,7 @@
extern int posix_memalign (void **, size_t, size_t);
#else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int posix_memalign (void **, size_t, size_t);
#endif
static __inline void *
@saik0
saik0 / 90-uinput.rules
Last active April 8, 2016 23:00
xboxdrv: Xbox 360 Wireless Receiver with up to four gamepads
# Set the ownership and permissions for the uinput device
KERNEL=="uinput", OWNER="root", GROUP="uinput", MODE="0660"
/* Sleep Demo Serial
* -----------------
* Example code to demonstrate the sleep functions in a Arduino. Arduino will wake up
* when new data is received in the serial port USART
* Based on Sleep Demo Serial from http://www.arduino.cc/playground/Learning/ArduinoSleepCode
*
* Copyright (C) 2006 MacSimski 2006-12-30
* Copyright (C) 2007 D. Cuartielles 2007-07-08 - Mexico DF
*
* With modifications from Ruben Laguna 2008-10-15
@scottferg
scottferg / LinuxMultitouch.py
Created August 24, 2010 02:13
Hard coded multitouch desktop gestures for Ubuntu/GNOME. To use it, enable the Dbus/Scale/Rotate plugins in Compiz.
from pymt import *
import sys, dbus, subprocess, os
import time
class Tracer(MTWidget):
SWIPE_X_THRESHOLD = 220
SWIPE_Y_THRESHOLD = 100
LEFT_SWIPE, RIGHT_SWIPE = range(2)
block = False
@douglasmiranda
douglasmiranda / gist:2527687
Created April 29, 2012 03:07
fixing dropbox - Ubuntu 12
#When dropbox is not working on ubuntu 12
#you tried to execute on terminal:
#dropbox start
#and the error is something like this:
#Starting Dropbox.../home/YOUR_USER/.dropbox-dist/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required #by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
#Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
#Done!
#FIX
cd /home/YOUR_USER/.dropbox-dist/