This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| MD_FILE=infile.md | |
| PDF_FILE=outfile.pdf | |
| LATEX_ENGINE=xelatex | |
| MAIN_FONT=Georgia | |
| SANS_FONT=Arial | |
| MONO_FONT=Consolas | |
| FONT_SIZE=11pt | |
| PANDOC_OPTIONS=\ |
| # Gitignore file for Grails application with IntelliJ | |
| # Ignore IDE specific files | |
| /.idea/ | |
| /*.iml | |
| /.classpath | |
| /.project | |
| # Ignore builds | |
| target/ |
| #!/bin/bash | |
| # Unattended GitLab Installation for Ubuntu Server 12.04 and 13.04 64-Bit | |
| # | |
| # Maintainer: @caseyscarborough | |
| # GitLab Version: 6.1 | |
| # | |
| # This script installs GitLab server on Ubuntu Server 12.04 or 13.04 with all dependencies. | |
| # | |
| # INFORMATION | |
| # Distribution : Ubuntu 12.04 & 13.04 64-Bit |
| /** | |
| * This class represents how to determine the solvability | |
| * of a 3 x 3 sliding puzzle. | |
| * | |
| * @author Casey Scarborough | |
| */ | |
| public class Solvable { | |
| public static void main(String[] args) { |
| Set oWMP = CreateObject("WMPlayer.OCX.7") | |
| Set colCDROMs = oWMP.cdromCollection | |
| wscript.sleep 600000 | |
| do | |
| if colCDROMs.Count >= 1 then | |
| For i = 0 to colCDROMs.Count - 1 | |
| colCDROMs.Item(i).Eject | |
| Next | |
| For i = 0 to colCDROMs.Count - 1 | |
| colCDROMs.Item(i).Eject |
| import com.mongodb.MongoClient; | |
| import com.mongodb.DB; | |
| import com.mongodb.DBCollection; | |
| import com.mongodb.BasicDBObject; | |
| import com.mongodb.DBObject; | |
| import com.mongodb.DBCursor; | |
| import java.net.UnknownHostException; | |
| import java.util.ArrayList; | |
| import java.util.Set; |
| require 'sinatra' | |
| require 'instagram_api' | |
| # Go to http://instagram.com/developer to get your client ID and client secret. | |
| CLIENT_ID = "YOUR CLIENT ID" | |
| CLIENT_SECRET = "YOUR CLIENT SECRET" | |
| # Set the redirect uri for your application to the following: | |
| REDIRECT_URI = "http://localhost:4567/callback" |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| try | |
| set network_location to do shell script ("scselect | awk '{if ($1==\"*\") print $3}' | sed 's/[()]//g'") | |
| on error | |
| display dialog "There was an error with the script." | |
| end try | |
| if network_location is "LocationA" then | |
| do shell script "scselect LocationB" | |
| else if network_location is "LocationB" then | |
| do shell script "scselect LocationA" |
| require 'benchmark' | |
| n = 10_000_000 | |
| puts "\nGenerating random string of length #{n}:" | |
| Benchmark.bm(9) do |x| | |
| x.report('Method 1: ') do | |
| range = [('a'..'z'),('A'..'Z'),('0'..'9')].map{ |i| i.to_a }.flatten | |
| (0...n).map{ range[rand(range.length)] }.join |