Skip to content

Instantly share code, notes, and snippets.

@mikegee
mikegee / classes.rb
Last active Aug 18, 2016
99 bottles exercise solutions
View classes.rb
class Bottles
def song
verses(99, 0)
end
def verses(from, to)
from.downto(to).map(&method(:verse)).join("\n")
end
def verse(number)
View keybase.md

Keybase proof

I hereby claim:

  • I am mikegee on github.
  • I am mikegee (https://keybase.io/mikegee) on keybase.
  • I have a public key whose fingerprint is F8C3 95B9 304E CD5C 1EB9 7B8A 570F 4E6F AE24 2A26

To claim this, I am signing this object:

View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
View gist:6684145
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 12 2013 20:55:01)
MacOS X (unix) version
Included patches: 1-27
Compiled by Homebrew
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
@mikegee
mikegee / new_rails_app.sh
Created Mar 25, 2013
script to generate a rails app with some stuff I always use
View new_rails_app.sh
#!/bin/zsh
source "$HOME/.rvm/scripts/rvm"
rvm use 1.9.3@global
rails new $1 --skip-bundle --skip-test-unit
cd $1
@mikegee
mikegee / weekly_activity_report
Created Sep 11, 2012
A log of the last 7 days worth of commits to all the branches of all the repos in the current folder.
View weekly_activity_report
#!/bin/bash
for repo in *
do
[[ -d "${repo}/.git" ]] || continue
cd "${repo}"
git branch --list --no-color | cut -c'3-' | xargs -I branch git --no-pager log --author="`git config user.name`" --format="${repo} %Credbranch%Creset %Cgreen%ar%Creset %s" 'branch@{7 days ago}..branch@{now}' 2>/dev/null
View application.sh
git clone git://github.com/osuclse/scarlet.git
cd scarlet
cat << EOF > config/database.yml
production:
adapter: mysql
database: scarlet
username: root
password: <Password you entered above>
host: localhost
pool: 5
View Grade Distribution from Google Charts
http://chart.apis.google.com/chart?cht=bhs&chs=300x400&chd=t:30,35,40,95,130,120,45,35,30,20,10&chds=0,150&chxt=y,x&chxl=0:|E|D|D%2B|C-|C|C%2B|B-|B|B%2B|A-|A|&chxs=0,000000,14,-1,l|1,FFFFFF,0,0,t,FFFFFF&chm=N+**,000000,0,-1,14&chco=3366FF&chbh=a
View gist:31623
// Course Instructor
SELECT DW8HCQA_PS_PERSONAL_DATA.NAME, DW8HCQA_PS_CLASS_TBL.ACAD_ORG, DW8HCQA_PS_CLASS_TBL.CATALOG_NBR, DW8HCQA_PS_CLASS_TBL.STRM, DW8HCQA_PS_CLASS_TBL.CAMPUS, DW8HCQA_PS_CLASS_INSTR.INSTR_ROLE, DW8HCQA_PS_CLASS_TBL.CRSE_ID, DW8HCQA_PS_CLASS_TBL.CRSE_OFFER_NBR, DW8HCQA_PS_CLASS_TBL.CLASS_SECTION, DW8HCQA_PS_CLASS_INSTR.INSTR_ASSIGN_SEQ
FROM DW8HCQA_PS_CLASS_TBL INNER JOIN (DW8HCQA_PS_CLASS_INSTR INNER JOIN DW8HCQA_PS_PERSONAL_DATA ON DW8HCQA_PS_CLASS_INSTR.EMPLID = DW8HCQA_PS_PERSONAL_DATA.EMPLID) ON (DW8HCQA_PS_CLASS_INSTR.CLASS_SECTION = DW8HCQA_PS_CLASS_TBL.CLASS_SECTION) AND (DW8HCQA_PS_CLASS_TBL.STRM = DW8HCQA_PS_CLASS_INSTR.STRM) AND (DW8HCQA_PS_CLASS_TBL.CRSE_OFFER_NBR = DW8HCQA_PS_CLASS_INSTR.CRSE_OFFER_NBR) AND (DW8HCQA_PS_CLASS_TBL.CRSE_ID = DW8HCQA_PS_CLASS_INSTR.CRSE_ID)
WHERE (((DW8HCQA_PS_CLASS_TBL.ACAD_ORG)="D0326") AND ((DW8HCQA_PS_CLASS_TBL.CATALOG_NBR)=" 113") AND ((DW8HCQA_PS_CLASS_TBL.STRM)="1078") AND ((DW8HCQA_PS_CLASS_TBL.CAMPUS)="COL"))
ORDER BY DW8HCQA_PS_PER
View Mike Gee's Robocopy Backup Script
set drive=V:
set dayofweek=%DATE:~0,3%
set excludeddirs=AppData .svn .metadata
net use %drive% \\gromit\backup /SAVECRED
robocopy "%USERPROFILE%" "%drive%\PC\%dayofweek%" /MIR /R:0 /FFT /XD %excludeddirs%
net use %drive% /DELETE
You can’t perform that action at this time.