Skip to content

Instantly share code, notes, and snippets.

View joshdick's full-sized avatar
💭
😋

Josh Dick joshdick

💭
😋
View GitHub Profile
@ttscoff
ttscoff / matrixish.sh
Created September 15, 2012 18:23
A Matrix-ish display for Bash terminal
#!/bin/bash
#
# matrix: matrix-ish display for Bash terminal
# Author: Brett Terpstra 2012 <http://brettterpstra.com>
# Contributors: Lauri Ranta and Carl <http://blog.carlsensei.com/>
#
# A morning project. Could have been better, but I'm learning when to stop.
### Customization:
blue="\033[0;34m"
@ttscoff
ttscoff / flavor.rb
Created September 16, 2012 16:01
Quick wrapper to convert Markdown to HTML via Github API
#!/usr/bin/ruby
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
#
# Requirements: json gem (`gem install json`)
#
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
# cat README.md | flavor > README.html
@mlgill
mlgill / New reminder from Launchbar
Last active May 18, 2021 13:19 — forked from Jayphen/New reminder from Launchbar
A script for quickly adding reminders to the Reminders app in Mountain Lion from Launchbar and Alfred. Save this as a .scpt and drop it in ~/Library/Application\ Support/LaunchBar/Actions
--Script for setting Reminders for LaunchBar and Alfred
--For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work
--For LaunchBar, place the script in ~/Library/Scripts/LaunchBar
--by Michelle L. Gill, 10/07/2012
--Inspired by https://gist.github.com/3187630
--A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder
--Changes
--02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used
-- * Removed the ability to set seconds for the time since Reminders doesn't recognize them
@ttscoff
ttscoff / searchlink.rb
Last active February 26, 2024 07:05
SearchLink creates Markdown links from automatic searches based on special syntax.

Snow in canvas land

Other people's code is awful, and your own code from months previous counts as someone else's. With this and the festive spirit in mind, I dug up a canvas snow demo I made two years ago to see how bad my code really was.

Turns out the performance landscape has changed quite a bit, but after applying a couple of workarounds, best practices, and memory management, I got the demo running smoother than it ever did.

Ugh, I can't believe I just wrote "performance landscape". Anyway...

How does the demo work?

@joshdick
joshdick / git_prompt.png
Last active February 12, 2024 04:16
My Git prompt for zsh.
git_prompt.png
@ttscoff
ttscoff / cliptextfile.sh
Created January 15, 2013 15:12
Copy the contents of any text file to the clipboard, intended for use as an OS X System Service
# A stupid script that actually makes a handy system service
# Use it to right click files and extract their text content to the clipboard
# Brett Terpstra 2013, no rights reserved
txtcount=`file "$@"|grep -c text`
response=0
msg=""
if [ $txtcount -eq $# ]; then
cat "$@"|pbcopy
if [ "$?" -ne "0" ]; then
msg="Error running command"
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@Profpatsch
Profpatsch / PKGBUILD_mutt-sidebar-lunar
Created February 6, 2013 15:34
PKGBUILD for mutt with Lunar Linux sidebar patch.
## PKGBUILD [plain_text]
# Contributor: tobias [tobias [at] archlinux.org]
# Additional : Profpatsch [https://bbs.archlinux.org/misc.php?email=68112]
pkgname=mutt-sidebar
pkgver=1.5.21
pkgrel=8
pkgdesc='Small but very powerful text-based mail client'
url='http://www.mutt.org/'
license=('GPL')
@ttscoff
ttscoff / downunder.rb
Created February 12, 2013 21:21
Possibly the dumbest script ever. Why make this gist public? Why not, I ask you, why not?
#!/usr/bin/ruby
input = STDIN.read
subs = {
" " => " ",
"a" => "ɐ",
"b" => "q",
"c" => "ɔ",
"d" => "p",