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
@tbartelmess
tbartelmess / Attach to Xcode.scpt
Last active January 2, 2021 21:56
Apple Script to Attach Xcode to a Process
--- Usage: osascript [PATH TO SCRIPT] pid
on run argv
tell application "System Events"
tell process "Xcode"
set frontmost to true
click menu item "Attach to Process by PID or Name…" of menu "Debug" of menu bar 1
click first text field of sheet 1 of window 1
keystroke item 1 of argv
click button "Attach" of sheet 1 of window 1
end tell
### Keybase proof
I hereby claim:
* I am tbartelmess on github.
* I am tbartelmess (https://keybase.io/tbartelmess) on keybase.
* I have a public key ASAWYT6XzOADXiBDZvMQL5OIqd_-k96oLrtrXMyp5NmBMAo
To claim this, I am signing this object:
@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
}
@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: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
-----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
#xcode Noise
build/*
*.pbxuser
*.mode2v3
*.mode1v3
*.xcworkspace
xcuserdata
# OSX Noise
.DS_Store
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
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,
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop>
<D:displayname/>
</D:prop>
</D:propfind>