Skip to content

Instantly share code, notes, and snippets.

View XaviArnaus's full-sized avatar

Xavier Arnaus XaviArnaus

View GitHub Profile

Python docstring reStructuredText style

Python Signatures

Signatures of functions, methods and class constructors can be given like they would be written in Python.

#!/usr/bin/swift
import Foundation
let path = NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath
let data = NSKeyedUnarchiver.unarchiveObject(withFile: path) as! NSDictionary
let mutableData = data.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableData {
if value is NSDate {
@XaviArnaus
XaviArnaus / profile.md
Created November 1, 2018 06:57 — forked from ezekg/profile.md
iTerm key bindings

Open the iTerm preferences ⌘+, and navigate to the Profiles tab (the Keys tab can be used, but adding keybinding to your profile allows you to save your profile and sync it to multiple computers) and keys sub-tab and enter the following:

Delete all characters left of the cursor

⌘+←Delete Send Hex Codes:

  • 0x18 0x7f – Less compatible, doesn't work in node and won't work in zsh by default, see below to fix zsh (bash/irb/pry should be fine), performs desired functionality when it does work.
  • 0x15 – More compatible, but typical functionality is to delete the entire line rather than just the characters to the left of the cursor.

Delete all characters right of the cursor

⌘+fn+←Delete or ⌘+Delete→ Send Hex Codes:

  • 0x0b
@XaviArnaus
XaviArnaus / gist:93cd0d924a445562eef2
Created November 27, 2014 08:17
Verifying that +arnaus is my openname
Verifying that +arnaus is my openname