Skip to content

Instantly share code, notes, and snippets.

View vilhalmer's full-sized avatar

Bill Doyle vilhalmer

View GitHub Profile
@ELLIOTTCABLE
ELLIOTTCABLE / bank.client.paws
Created May 30, 2010 03:03
Solving the classic banking concurrency problem with Paws
bank.client ← list clone
heir.cache ← list clone
definition(‘heir.cache’) depth ← 0 ; “Heirs’ lookups will ‘overlook’ this `heir.cache` definition.”
“This will either retrieve the existing client object from the cache, or create a new one with its `id` set.”
clone ← routine {
result(heir.cache[argument] ⇤ up
id ← argument
client ← HTTP client clone
"""
Script to convert a Xcode3 Color theme into a Xcode4 one.
Example:
bash# python xcode3_theme_to_xcode4.py Twilight.xcolortheme
It will write a new file: Twilight.dvtcolortheme into the same folder as the script is residing in.
"""
import plistlib,sys
""" Define boilerplate of the color theme """
defaultConfig = {
@ELLIOTTCABLE
ELLIOTTCABLE / sodomy.c
Created March 29, 2011 02:05
Sodomizing ISO C for fun and profit.
// The upshot: (in legal, sane(?) ISO C99)
type v = Namespace__foo_bar(.first = 123, .third = "non-default value!");
/* We want a function (macro.) that appears to take “named arguments,” by preprocessing into a designated
* initializer directly at the position of the function call, post-processing.
*/
// This portion is all, effectively, a neat way to define default, named arguments.
#!/bin/sh
### General ###
/usr/bin/defaults write -g 'AppleAquaColorVariant' -int 6
/usr/bin/defaults write -g 'AppleHighlightColor' -string '0.600000 0.800000 0.600000'
/usr/bin/defaults write -g 'AppleShowScrollBars' -string 'Always'
@ELLIOTTCABLE
ELLIOTTCABLE / gist:1411167
Created November 30, 2011 21:56
List of irssi's default format values
[core] - [Core]
[Windows]
line_start = {line_start}
line_start_irssi = {line_start}{hilight Irssi:}
timestamp = {timestamp $Z}
servertag = [$0]
daychange = Day changed to %%d %%b %%Y
talking_with = You are now talking with {nick $0}
refnum_too_low = Window number must be greater than 1
@ELLIOTTCABLE
ELLIOTTCABLE / xmpp.fml
Last active December 10, 2015 08:58
Playing with a new markup language. Something halfway between YAML and @fileability's Self-ML. Tentative name: “Fucking Markup Language.”
stream:stream
(to example.com
xmlns jabber:client
xmlns:stream http://etherx.jabber.org/streams
version 1.0)
message
(from [email protected]
to [email protected]
xml:lang en)
@ELLIOTTCABLE
ELLIOTTCABLE / some.paws
Created January 1, 2013 01:25
Trying to add a FUNC to locals. ಠ_ಠ
implementation void()
( infrastructure execution stage()
(infrastructure affix() (locals))
(infrastructure empty()) )
( infrastructure execution stage()
(infrastructure charge() (locals))
(infrastructure length() (locals)) )
@k2052
k2052 / Eva.rb
Created January 13, 2013 00:36
Eva Zebra In Code
class Eva < Zebra
include MongoMapper::Document
include Vegan::Powers
include MongoMapperExt::Taggable
include MongoMapper::Tweetable
## Keys
key :scarves_count, Integer, :default => 20
key :compliments_count, Integer, :default => 100
@nquinlan
nquinlan / 1 - Readme.md
Last active March 21, 2020 22:53
Useful Twitter Mute Filters

Useful Mute Filters

This is a collection of useful (and useless) mute filters for Twitter. More will be added as I find them.

All are Regular Expressions unless otherwise noted

All have been tested in Tweetbot.

@mislav
mislav / _readme.md
Last active February 19, 2025 20:21
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work: