Skip to content

Instantly share code, notes, and snippets.

View marclundgren's full-sized avatar

Marc Lundgren marclundgren

View GitHub Profile
@marclundgren
marclundgren / finder-open-iterm-here.scpt
Created November 14, 2012 06:00 — forked from cowboy/finder-open-iterm-here.scpt
Finder Open iTerm Here: Drop a folder on this script (or just run it) to open a new iTerm window there. If the selected item isn't a folder, it will open the item's parent folder. Great when bound to a hotkey in FastScripts or added to the Finder Sidebar
(*
* Finder Open iTerm Here - v1.0.2 - 4/14/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*)
tell application "Finder"
function tunnel {
# Using localtunnel
# https://npmjs.org/package/localtunnel
# Usage:
# tunnel [port [subdomain]]
# tunnel 8080 bzog
local port=${1-"80"};
if [ "$2" != "" ]; then
function restroomEtiquette(you, restroom) {
var toilet = restroom.toilet,
urinal = restroom.urinal;
while (true) {
if (you.needToGo === 1) {
if (you.urinalsOkay && restroom.urinalAvailable()) {
you.evacuate();
urinal.flush();
@marclundgren
marclundgren / in.n.out.md
Last active December 22, 2015 22:49
My Favorite In N Out order

My Favorite In N Out order

  • Three-by-One (3 meat, 1 cheese)
  • mustard instead of spread
  • grilled unions
  • add pickles
  • add chopped chilis
  • add extra everything (all teh veggies)
.-'---`-.
,' `.
| \
| \
\ _ \
,\ _ ,'-,/-)\
( * \ \,' ,' ,'-)
`._,) -',-')
\/ ''/
) / /
@marclundgren
marclundgren / 3gods.js
Last active December 29, 2015 03:39
3 gods, true, false, random
/*
Three gods A, B, and C are called, in no particular order, True, False, and Random.
True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter.
The gods understand English, but will answer all questions in their own language, in which the words for yes and no are da and ja, in some order. You do not know which word means which.
*/
(function() {
# Set Up Your Sound Card
aplay -l &&
alsamixer
speaker-test &&
cd /etc/modprobe.d &&
echo "Look for this line && comment out: options snd-usb-audio index=-2"
sudo nano alsa-base.conf
@marclundgren
marclundgren / setup-my-computer.sh
Last active January 2, 2016 01:48
setup my computer
# Download Apps
# Chrome, Sublime Text, Adium, iTerm2, Disk Inventory X
# install Xcode ... manually..
# then get Command Line Tools https://developer.apple.com/downloads/index.action
# oh my zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# node
@marclundgren
marclundgren / os-x-configuration.md
Last active January 2, 2016 16:09 — forked from g3d/gist:2709563
OS X Configuration

Useful Shortcuts (Mac OS X)

General

Shortcut Command