Skip to content

Instantly share code, notes, and snippets.

View vilhalmer's full-sized avatar

Bill Doyle vilhalmer

View GitHub Profile
@matthiasplappert
matthiasplappert / gist:9493050
Last active August 29, 2015 13:57
QuickLook Debugging for `UIView`
@interface UIView (MPAdditions)
@end
@implementation UIView (MPAdditions)
- (id)debugQuickLookObject {
if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) {
return nil;
}
{
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/peel.tmTheme",
"font_face": "Inconsolata",
"font_size": 16,
"ignored_packages":
[
"Vintage"
],
"line_padding_bottom": 4,
"line_padding_top": 4,
@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 = {
@cdl
cdl / .vimrc
Created December 7, 2015 20:21
"""""""""""""""""""""""""""""
" Files, backups, undo, etc.
"""""""""""""""""""""""""""""
set nocompatible
set encoding=utf8
set ffs=unix,dos,mac
set nobackup
set nowb
set noswapfile
@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 juliet@example.com
to romeo@example.net
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
Tweetbot for Mac Super Secret Settings
You will need to use the Terminal app to change these settings:
# these all affect the text in a DM or new tweet - the default is yes for all of them
defaults write com.tapbots.TweetbotMac TextAutomaticQuoteSubstitution -bool NO
defaults write com.tapbots.TweetbotMac TextAutoCorrect -bool NO
defaults write com.tapbots.TweetbotMac TextContinuousSpellChecking -bool NO
defaults write com.tapbots.TweetbotMac TextAutomaticTextReplacement -bool NO
@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.