Skip to content

Instantly share code, notes, and snippets.

var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice <0.34){
computerChoice = "rock";
}else if(computerChoice <=0.67){
computerChoice = "paper";
}else{
computerChoice = "scissors";
}
@jvdgoot
jvdgoot / gist:2700557
Created May 15, 2012 10:10
Get size of image from Terminal in OS X hat-tip to @mijndert
sips -g pixelHeight -g pixelWidth
@jvdgoot
jvdgoot / gist:2437472
Created April 21, 2012 14:46
Enable local settings in django
try:
from local_settings import *
except ImportError, exp:
pass
@jvdgoot
jvdgoot / gist:2427304
Created April 20, 2012 09:19
Allow text selection in Quick Look
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
@jvdgoot
jvdgoot / Preferences.sublime-settings
Created April 2, 2012 12:29
My Sublime Text 2 Configuration
{
"auto_complete_commit_on_tab": true,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Espresso Aqua.tmTheme",
"detect_slow_plugins": false,
"drag_text": false,
"draw_white_space": "all",
"folder_exclude_patterns":
[
".svn",
@jvdgoot
jvdgoot / instacast.opml
Created May 3, 2011 10:48
My Instacast Subscriptions
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Instacast Subscriptions from Gordon Cole</title>
<dateCreated>Thu, 12 May 2011 12:58:26 GMT</dateCreated>
<dateModified>Thu, 12 May 2011 12:58:26 GMT</dateModified>
</head>
<body>
<outline text="1 Indie Nation" type="rss" xmlUrl="http://oneindienation.libsyn.com/rss" htmlUrl="http://1indienation.com/" />
<outline text="Think Vitamin Radio" type="rss" xmlUrl="http://feeds.feedburner.com/thinkvitaminradio" htmlUrl="http://thinkvitamin.com" />