Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
def tokenize(string):
# Regular expression to extract blocks
_recipient = re.compile(r'^(.+?)\s(in|to|about)\b',
re.IGNORECASE)
_time = re.compile(r'\bin\s(\d+\s\b.+?\b)(?:\sto\b|\sabout\b|$)',
re.IGNORECASE)
_message = re.compile(r'\b(?:to|about)\s(.+?)(?:\sin\b|$)',
re.IGNORECASE)
@austinrfnd
austinrfnd / gist:2d48013a769261599090
Created October 27, 2014 15:57
Sublime Text Key Bindings
[
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }
]
/* global Application, ObjC, $ */
/**
* repozish.js
*
* this is an example of using os x yosemite's "JavaScript for Automation":
*
* https://developer.apple.com/library/prerelease/mac/releasenotes/interapplicationcommunication/rn-javascriptforautomation/index.html
*
* it repositions some windows based on some position settings. you can run
@integrii
integrii / irssi.sh
Last active August 29, 2015 14:05
Create or attach screen with irssi
#!/bin/bash
# Save script to ~/.irssi.sh
# Creates a screen and starts irssi in it.
# If the screen already exists, it simply attaches it.
# Create an alias in your ~/.bashrc to access it simply.
# alias irc='~/.irssi.sh'
if screen -list | grep -q "irssi"; then
screen -x irssi
else
@omz
omz / UpsideDownText.py
Created June 28, 2014 18:31
UpsideDownText.py
import ui
# Mapping based on http://www.upsidedowntext.com/unicode
CHARMAP = {'!': '\xc2\xa1', '"': ',,',
"'": ',', '&': '\xe2\x85\x8b',
')': '(', '(': ')', ',': "'",
'.': '\xcb\x99',
'1': '\xc6\x96',
'0': '0', '3': '\xc6\x90',
'2': '\xe1\x84\x85',
@Zettt
Zettt / expandurl.sh
Created June 12, 2014 09:02
Expand short URL from clipboard. Works with Keyboard Maestro, TextExpander, Alfred, LaunchBar, you name it.
curl -sIL `pbpaste` | grep ^[lL]ocation | cut -c 11- | pbcopy
@rosenhouse
rosenhouse / qr_label.py
Created June 12, 2014 05:34
Put a QR code in a PDF sized for our label maker
#!/usr/bin/env python2.7
import tempfile
from reportlab.graphics import renderPDF
from reportlab.pdfgen import canvas
import qrcode
import qrcode.image.svg
from svglib.svglib import svg2rlg
@yuchi
yuchi / dictionary_map.swift
Last active September 13, 2018 15:39
Swift extension that gives Dictionaries support for .map
extension Dictionary /* <KeyType, ValueType> */ {
func mapKeys<U> (transform: KeyType -> U) -> Array<U> {
var results: Array<U> = []
for k in self.keys {
results.append(transform(k))
}
return results
}
@EvanLovely
EvanLovely / Get_front_Mac_App_URL--markdown.applescript
Created May 27, 2014 22:05
Get Front Mac App Title and URL and make a Markdown Link to it
# Grab a URL from Chrome, Safari, Mail, Contacts, Finder, TextEdit, Omnifocus, Chrome Canary, or FoldingText
# Borrowed from: http://www.alfredforum.com/topic/917-reminders/?hl=reminders
tell application (path to frontmost application as text)
set theApplication to get name
end tell
set theText to ""
set theBody to ""
if theApplication is "Google Chrome" then
tell application id "com.google.chrome"

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: