Skip to content

Instantly share code, notes, and snippets.

@phaufe
phaufe / LICENSE.txt
Created September 28, 2011 09:20 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@phaufe
phaufe / dabblet.css
Created March 19, 2012 10:14 — forked from JoelBesada/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@phaufe
phaufe / markdown2evernote.rb
Created June 2, 2012 17:52 — forked from kopischke/markdown2evernote.rb
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@phaufe
phaufe / gist:2972853
Created June 22, 2012 13:52 — forked from nateps/gist:1172490
Hide the address bar in a fullscreen iPhone or Android web app
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;
@phaufe
phaufe / pdbdump.c
Created June 22, 2012 14:23 — forked from mridgers/pdbdump.c
Small tool to list and query symbols in PDB files.
//------------------------------------------------------------------------------
// pdbdump.c - dump symbols from .pdb and executable files (public domain).
// - to compile; cl.exe /Ox /Zi pdbdump.c
// -
// - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk
//------------------------------------------------------------------------------
#include <stdio.h>
#include <Windows.h>
#include <DbgHelp.h>
@phaufe
phaufe / recentgists.rb
Created July 28, 2012 17:20 — forked from ttscoff/recentgists.rb
Log my public gists for the last 24 hours to Day One and nvALT
#!/usr/bin/env ruby
require 'open-uri'
require 'time'
require 'erb'
require 'rubygems'
require 'json'
user = 'ttscoff'
dayone = true # log to day one? (true or false)
@phaufe
phaufe / shellista.py
Created January 26, 2013 16:00 — forked from tul/shellista.py
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# You can skip over reading this class, if you like.
# It's an implementation of mine of the bash parser in pure python
# This has advantages over shlex, glob, and shlex->glob in that it expects
# the strings to represent files from the start.
class BetterParser:
def __init__(self):
self.env_vars = {"$HOME": os.path.expanduser('~')}
import SimpleHTTPServer
import SocketServer
import webbrowser
import os
os.chdir('/')
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", 0), Handler)
port = httpd.server_address[1]
webbrowser.open('http://localhost:' + str(port), stop_when_done=True)
httpd.serve_forever()
If you see...
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libmacfuse_i32.2.dylib /usr/local/lib/libmacfuse_i64.2.dylib /usr/local/lib/libosxfuse_i32.2.dylib /usr/local/lib/libosxfuse_i64.2.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
# A demo of the Windows CE Remote API
#
# This connects to a CE device, and interacts with it.
import wincerapi
import win32event
import win32api
import win32con
import os
import sys