Skip to content

Instantly share code, notes, and snippets.

View tbartelmess's full-sized avatar
🐶
EventLoopFuture<Void>

Thomas Bartelmess tbartelmess

🐶
EventLoopFuture<Void>
View GitHub Profile
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
owF9UV1IFFEY3TUVW/yJkshQ1Is9GKvdmdn52xDzZ7NAKRE0qNjmztzdnWxn1tlx
/UPBgqAszfJJCbKEknCTkB58SGEhUh9EITVD8kFBRCqMpHyxO2Kv3ZfLPd855zvf
/R6lHLI57CmO1Fjyt7ke+8zkD2SryVgrbQNIV1qAuw3U4/3Lp2p+bIQMVTOBG1Cy
TNHIBRHrokVWFClOEinEKFCBEsQyA2WMFUrwAScI6GFLQWyQFMaFqk4w8vCqCkFh
OSyBnjIGlnk85ZRwntQa9wuIkjCUaVFmEUQuWaERy/Ac6cUysiRDaBHD2NCkICZs
E0mGiW8FcTgM2p2AFCKqjK3YBwS/agYa0X9FZkvIQpsw8h7ovUjVFDI2kUWwEVZ1
@tbartelmess
tbartelmess / gist:08174bba32a72762c41f
Created June 23, 2014 01:43
SubEthaEdit script to cleanup trailing whitespace
on seescriptsettings()
return {keyboardShortcut:"$@c", displayName:"Remove trailing whitespace", inContextMenu:"yes"}
end seescriptsettings
tell application "SubEthaEdit"
set someText to contents of front document as text
end tell
@tbartelmess
tbartelmess / keybase.md
Created February 24, 2015 18:59
keybase.md

Keybase proof

I hereby claim:

  • I am tbartelmess on github.
  • I am tbartelmess (https://keybase.io/tbartelmess) on keybase.
  • I have a public key whose fingerprint is 1CC1 2B40 B542 9599 16A9 1B3D 0D0A 0EC3 0CEE D18F

To claim this, I am signing this object:

@tbartelmess
tbartelmess / gist:861353
Created March 8, 2011 23:24
Syslogger for django
import syslog
from #YOUAPP# import settings
class SysLogging:
def __init__(self, facility, prefix=None):
self.facility = facility
if prefix:
syslog.openlog(prefix)
def _logit(self, priority, message):
syslog.syslog(self.facility | priority, '%s' % (message))
# Project: Controlpanel
# Copyright: ©2011 My Company, Inc.
# ===========================================================================
config :marketcircle,
:required => ['sproutcore/empty_theme'],
:theme_name => 'mc-theme',
:test_required => ['sproutcore/testing'],
:debug_required => ['sproutcore/debug']
// ==========================================================================
// Project: DesktopTimecard
// Copyright: ©2011 My Company, Inc.
// ==========================================================================
/*globals DesktopTimecard */
/** @namespace
My cool new app. Describe your application.
BEGIN;
CREATE TABLE "cars_car" (
"id" integer NOT NULL PRIMARY KEY,
"model" varchar(200) NOT NULL,
"color" varchar(200) NOT NULL
)
;
CREATE TABLE "cars_person_cars" (
"id" integer NOT NULL PRIMARY KEY,
"person_id" integer NOT NULL,
BEGIN:VTIMEZONE
TZID:Asia/Tokyo
BEGIN:DAYLIGHT
TZOFFSETFROM:+0900
RRULE:FREQ=YEARLY;UNTIL=19510505T170000Z;BYMONTH=5;BYDAY=1SU
DTSTART:19500507T020000
TZNAME:GMT+09:00
TZOFFSETTO:+1000
END:DAYLIGHT
BEGIN:STANDARD
#xcode Noise
build/*
*.pbxuser
*.mode2v3
*.mode1v3
*.xcworkspace
xcuserdata
# OSX Noise
.DS_Store
@tbartelmess
tbartelmess / Collection-to-Dict.swift
Last active April 9, 2017 18:51
An extension to the Collection Type to create a dictionary using a transform closure.
extension Collection {
// Create a Dictionary from a collection using a transformer.
// The transformer function takes an element from the collection and returns a tuple
// with the key/value pair.
func dictionary<K, V>(transform:(_ element: Iterator.Element) -> (K, V)) -> [K : V] {
var dictionary = [K : V]()
self.forEach { element in
let (key, value) = transform(element)
dictionary[key] = value
}