Skip to content

Instantly share code, notes, and snippets.

View cbudjan's full-sized avatar

Christoph Budjan cbudjan

View GitHub Profile
#!/bin/sh
# Installing Adobe AIR creates an application called "Adobe AIR Uninstaller" in /Applications/Utilities.
# Unfortunately, running this application does not uninstall the application and instead, it seems to
# unhelpfully confirm that it's installed (http://twitter.com/modernscientist/status/495388916267384833/photo/1).
# The proper way to run this application as an uninstaller is to run the enclosed from the command line
# with the flag "-uninstall" as superuser:
sudo /Applications/Utilities/Adobe\ AIR\ Uninstaller.app/Contents/MacOS/Adobe\ AIR\ Installer -uninstall
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@cbudjan
cbudjan / tp2md.rb
Created October 31, 2013 18:09 — forked from ttscoff/tp2md.rb
#!/usr/bin/env ruby -rjcode -Ku
# TaskPaper to Markdown converter
# Usage: tp2md.rb filename.taskpaper > output.md
require 'ftools'
infile = ARGV[0]
title = File.basename(infile,'.taskpaper').upcase
output = "# #{title} #\n\n"
prevlevel = 0
begin
@cbudjan
cbudjan / gist:6329499
Last active December 21, 2015 15:49 — forked from sjwilliams/gist:3903157
ST: cheat sheet

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘KB toggle side bar
⌘⇧P command prompt
⌃ ` python console
⌘⇧N new window (useful for new project)
@cbudjan
cbudjan / gist:6327474
Last active December 21, 2015 15:29
ST: Installed packages (2013-08-24)
{
"installed_packages":
[
"AdvancedNewFile",
"Alignment",
"BracketHighlighter",
"Gist",
"Git",
"MarkdownEditing",
"Origami",
@cbudjan
cbudjan / gist:6327466
Last active December 21, 2015 15:29
ST: Preference file (2013-08-24)
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme",
"default_encoding": "UTF-8",
"draw_centered": false,
"ensure_newline_at_eof_on_save": false,
"find_selected_text": true,
"flatland_sidebar_tree_small": true,
@cbudjan
cbudjan / gist:6321714
Last active December 21, 2015 14:48
Python: Rename Pinboard tag
#!/usr/bin/env python
# A quick and dirty script to rename a pinboard.in tag.
# I'll probably update this become a proper command line app one day
import urllib2
import pinboard
pinuser = ""
pinpasswd = ""
@cbudjan
cbudjan / gist:6321707
Last active December 21, 2015 14:48
Ruby: TP to DayOne
#!/usr/bin/ruby
# tp-dailylog.rb - Log TaskPaper tasks completed on the current day to a Day One entry
# Brett Terpstra 2012 <http://brettterpstra.com>
#
# Run it with launchd at 11pm and forget about it
#
# Notes:
# * Uses `mdfind` to locate all .taskpaper files changed in the last day
# * Scans for @done(xxxx-xx-xx) tags in each line matching today's date
# * Does not alter TaskPaper files in any way