Skip to content

Instantly share code, notes, and snippets.

Tom von Schwerdtner tvon

Block or report user

Report or block tvon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tvon
tvon / ubiquity-todoist.js
Created Feb 6, 2009
Todoist plugin for Ubiquity
View ubiquity-todoist.js
TODOIST_DUE = "";
TODOIST_PRIORITY = 4;
Todoist = {
setToken:function(key){
if (!Application.prefs.has("todoist_token")) {
Application.prefs.setValue("todoist_token", key);
} else {
var new_key = Application.prefs.get("todoist_token");
new_key.value = key;
View safari.css
body { margin: 0; color: #fff; background: #000; overflow: hidden; }
audio { visibility: hidden; }
#header h1, #apple div.icon { color: transparent; }
#apple, #header, #safari { position: absolute; top: 40%; left: 50%; }
#apple { width: 600px; height: 538px; margin: -290px 0 0 -290px; overflow: hidden; }
#apple div { position: absolute; width: 600px; height: 538px; opacity: 0; }
#apple div.icon { z-index: 3; background: url(http://images.apple.com/safari/welcome/images/apple_icon.png) no-repeat 233px 184px; }
@tvon
tvon / kristol-memo.markdown
Created Mar 3, 2009
"Bill Kristol’s 1993 Memo Calling For GOP To Block Health Care Reform" converted to Markdown format from sources here: http://is.gd/lAKi
View kristol-memo.markdown

Defeating President Clinton's Health Care Plan

What follows is the first in what will be a series of political strategy memos prepared by The Project for the Republican Future. The topic of this memo is President Clinton's health care reform proposal, the single most ambitious item on the Administration's domestic policy agenda.

These four pages are an attempt to describe a common political strategy for Republicans in response to the Clinton health care plan. By examining the president's own strategy and tactics, this memo suggests how Republicans might reframe the current health care debate, offer a serious alternative, and, in the process, defeat the president's plan outright.

Nothing in these pages is intended to supplant the many thoughtful analysis of the Clinton health care plan already produced by republican and others, analyses which have done much to expose both its glaring weaknesses and immediate dangers. In fact, this memo borrows heavily from articles and papers prepared by conserva

View gig.py
#!/usr/bin/env python
"""
This script aims at providing a simple way to bootstrap a self-contained django project.
In short, it makes a few trivial decisions for you.
To those who use the Django framework this may seem a bit unecessary, but I believe that
it could be easier to get started with django, without having to impose minor decisions
on new users such as where to place templates and basic media files.
@tvon
tvon / admin.py
Created Apr 16, 2009
Customizing User list view and edit form in Django
View admin.py
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from forms import UserChangeForm
class UserAdmin(BaseUserAdmin):
list_display = ('username', 'last_name', 'first_name', 'is_superuser', 'is_staff')
View adduser-osx
#!/bin/sh
#
# Copyright (c) 2002-2004 Michael Telahun Makonnen. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
@tvon
tvon / freeciv.net-bootstrap.sh
Created Mar 7, 2011
A script to bootstrap (and build) freeciv.net on Ubuntu 10.10
View freeciv.net-bootstrap.sh
#!/bin/bash
basedir="${HOME}/freeciv-build"
srcdir="${basedir}/freeciv-web"
destdir="${basedir}/build"
# User will need permissions to create a database
mysql_user="root"
mysql_pass="changeme"
@tvon
tvon / homebrew-macvim.sh
Created Apr 8, 2011
Use homebrew installation of macvim for terminal vim command.
View homebrew-macvim.sh
if [ -x `which brew` ]; then
macvim_version=`brew list --versions macvim | sed 's/.* \([0-9\.\-]*\)$/\1/'`
if [ -n "${macvim_version}" ]; then
alias vim=`brew --prefix`/Cellar/macvim/${macvim_version}/MacVim.app/Contents/MacOS/Vim
fi
fi
@tvon
tvon / pow.sh
Created Apr 8, 2011
"pow" shell function for quick linking of directories to ~/.pow (if using http://pow.cx)
View pow.sh
function pow {
if [ -d "`cd $1; pwd`" ]; then
ln -s "`cd $1; pwd`" ~/.pow/
fi
}
@tvon
tvon / raw-client.rb
Created Aug 29, 2011
raw api file upload
View raw-client.rb
#!/usr/bin/env ruby
require "net/http"
require "uri"
url = 'http://example.com/submissions.json'
token = 'TOKEN HERE'
boundary = "pop-pop"
uri = URI.parse(url)
You can’t perform that action at this time.