Skip to content

Instantly share code, notes, and snippets.

View philoserf's full-sized avatar
Remote and happy

Mark Ayers philoserf

Remote and happy
View GitHub Profile
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- Added: creation date, due date, start date functionality
-- Empty your Things Trash first.
-- Note that this won't move over scheduled recurring tasks.
@fcrespo82
fcrespo82 / .bash_completion
Last active August 29, 2015 13:57
A shell completion for Brett Terpstra's doing command line utility http://brettterpstra.com/projects/doing/
_doing()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(doing help -c)" -- $cur) )
}
complete -F _doing doing
@beaugunderson
beaugunderson / Default (OSX).sublime-keymap
Created January 23, 2014 23:22
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
}
},
{
"keys": ["ctrl+4"],
@craigeley
craigeley / sifttter.rb
Last active July 23, 2018 16:37
This script looks for text files in a specific folder that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter
#!/usr/bin/ruby
# SIFTTTER 1.5: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
# Multiple Date Function by Paul Hayes 2014 <http://paulrhayes.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 67, and the location of your Day One in line 66
# * Scans leading timestamps in each line matching the selected dates
# * Does not alter text files in any way
anonymous
anonymous / gist:8075952
Created December 21, 2013 22:30
Tags files and directories per Brett Terpstra's approach.
#!/usr/bin/env ruby
def package?(file)
results = `mdls -name kMDItemContentTypeTree "#{file}" | grep com.apple.package`
results.length > 0
end
base = ARGV[0]
if !base
script = File.basename("#{__FILE__}")
@ttscoff
ttscoff / lazylink.rb
Created October 19, 2013 18:56
Marked 2 Preprocessor for "lazy links"
@mwhite
mwhite / git-aliases.md
Last active April 30, 2024 11:32
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@remy
remy / batcharge.py
Last active March 6, 2024 00:57
My zsh set up as of July 25, 2013
#!/usr/bin/env python
# saved to ~/bin/batcharge.py and from
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity
#!/usr/bin/env python
# coding=UTF-8
import math, subprocess
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE)
output = p.communicate()[0]
@mvilrokx
mvilrokx / opendyslexic.css
Created January 15, 2013 06:09
OpenDyslexic CSS
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Regular.otf');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Italic.ttf');