Skip to content

Instantly share code, notes, and snippets.

View jakeboxer's full-sized avatar

Jake Card jakeboxer

View GitHub Profile
@jakeboxer
jakeboxer / gist:3605769
Created September 3, 2012 00:07
FizzBuzz Test
Write a program that prints the numbers from 1 to 100. But for multiples of
three print “Fizz” instead of the number and for the multiples of five print
“Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
So, for example, if you were to print from 1 to 20, it would look like this:
1
2
Fizz
4
@jakeboxer
jakeboxer / gist:2513226
Created April 27, 2012 21:06
C string reverse
void reverse(char txt[]) {
int i, j;
char tmp;
for (i = 0, j = strlen(txt) - 1; i < j; ++i, --j) {
tmp = txt[i];
txt[i] = txt[j];
txt[j] = tmp;
}
}
<ul>
<% @sections.each do |section| %>
<li>
<a href="<%= section_articles_path section %>">
<%= section.name %>
</a>
</li>
<% end %>
</ul>
@jakeboxer
jakeboxer / gist:1353121
Created November 9, 2011 21:31
My .vimrc.local for janus
color vividchalk
" Ignore bad Rails stuff
set wildignore+=test/fixtures/**,vendor/gems/**
set wildignore+=enterprise,repositories
set wildignore+=public/images,public/javascripts/MathJax,tmp
" Show whitespace
set list listchars=trail:.,tab:>.

New Machine

Here's what I do after I do a fresh install of Lion. Things are sorta grouped by type.

General Config

  1. Run Software Update
  2. Start downloading Xcode
  3. Disable auto-bright and turn brightness all the way up
  4. Enable mouse right click