Skip to content

Instantly share code, notes, and snippets.

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@g3d
g3d / gist:2709563
Last active February 7, 2024 15:21 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
@iamtabu
iamtabu / Evernote to DEVONthink Export.scpt
Created August 10, 2012 16:13
Exports from Evernote using HTML to DEVONthink
(*
http://veritrope.com
EVERNOTE TO DEVONTHINK EXPORTER
VERSION 1.63
April 12, 2012
// TERMS OF USE:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
@PawelWitan
PawelWitan / racounter2dayone.sh
Created September 1, 2012 15:59
Import to Day One Journal app from Racounter Application Data Extract
#!/bin/bash
# Uses Day One cli [http://dayoneapp.com/tools/cli-man] and sqlite3
# Expects extract from iPhone backup made by JuicePhone [http://www.addpod.com/juicephone], folder with a device name should be passed as an argument
[ -z "$1" ] && echo "$0: Usage: $0 Device-Name-Exctracted-Folder" && exit 0
[ ! -d "$1" ] && echo "$0: $1 is not a directory" && exit 0
[ ! -e "$1/Application Data/Raconteur/Documents/Entries.sqlite" ] && echo "$0: $1 doesn't contain Racounter app extract." && exit 0
RT="$1"
@ttscoff
ttscoff / lsz.sh
Last active December 14, 2015 22:09
A bash function that lists the contents of various types of archives. Easier to remember, faster to type.
# ls archives (inspired by `extract`)
lsz() {
if [ $# -ne 1 ]
then
echo "lsz filename.[tar,tgz,gz,zip,etc]"
return 1
fi
if [ -f $1 ] ; then
case $1 in
*.tar.bz2|*.tar.gz|*.tar|*.tbz2|*.tgz) tar tvf $1;;
#!/bin/bash
# Original post at http://n8henrie.com/2012/12/pinboard-backups-with-curl-and-launchd/
curl -k -u "[username]:[password]" "https://api.pinboard.in/v1/posts/all?format=json" -o "/Users/[username]/Dropbox/[pathToBackup]/[filename].json"
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active May 10, 2024 15:41
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
javascript:window.location='drafts://x-callback-url/create?text=text%3D%22'+encodeURIComponent(document.title)+'%22%20url%3D%22'+encodeURIComponent(location.href)+'%22&action=opml'
@matthiaseisen
matthiaseisen / contact.html
Last active December 17, 2015 18:59
You are probably already familiar with the possibility of hosting static website on Amazon S3. If you're not you should read this great tutorial by Chad Thompson: http://chadthompson.me/2013/05/06/static-web-hosting-with-amazon-s3/. One common problem is that while being static your website still needs a contact form. Here's a solution for this …
<!-- You are probably already familiar with the possibility of hosting static websites on Amazon S3.
If not you should read this great tutorial by Chad Thompson: http://chadthompson.me/2013/05/06/static-web-hosting-with-amazon-s3/.
One common problem is that while being static your website still needs a contact form.
Here's a solution for this problem using Newman API (http://www.newmanapi.com). -->
<html>
<body>
<!-- First we set the 'action' attribute of <form> to point to Newman API -->
<form method="post" action="http://submit.newmanapi.com/" >
<!-- Now we create our input elements as we would in any other form -->
@n8henrie
n8henrie / Create messages_phonebook.py
Last active July 10, 2022 14:59
Send iMessage messages with Quicksilver -- version 2. This version uses some Python to search a plaintext "phonebook" for non-email / non-phone number third-pane input (like a name). See the full post at http://n8henrie.com/2013/06/send-imessages-with-quicksilver-v2/
import os
import re
import sys
vcf_file = sys.argv[1]
def parse_file(infile):
card = ''
for line in infile:
if line.startswith('BEGIN:VCARD') and card.endswith('END:VCARD\r\n'):