This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl 'http://www.shelfari.com/ws/json/ShelfariService.ashx' --data-binary '{"id":0,"method":"getShelfBooks","params":{"0":2504331,"1":2504331,"2":2,"3":"","4":"dateadded","5":2,"6":40,"7":0,"8":160}}' --compressed | |
0 - id of lookup | |
1 - id of you | |
2 - type of search (0: all, 1: favorites, 2: plans to read, 3: wishlist, 4: read, 5: owns, 6: reading, 100: common) | |
3 - leave blank | |
4 - sort type (dateadded, rating, opinions, datepublished, author, title) | |
5 - page | |
6 - 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def pop_if!(&block) | |
a,b = self.partition(&block) | |
self.replace(b) | |
a | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As a kid, I couldn't remember anything better than getting to go to Best Buy. All the gadgets and games made it seem almost magical. I could play with the newest and greatest gaming consoles, watch the biggest and best tv's, and get a glimpse at the future of technological achievement. It was awesome. As I grew older, I continued to go to Best Buy for all of my electronic entertainment needs. Through high school and college, I'd show up on Tuesdays to purchase the newest dvd's and video games I'd been anticipating for weeks or months with what little money I had earned working through summers and weekends. I remember buying my first flat screen CRT TV at Best Buy and thinking it was amazing. I remember buying my first HDTV there years later. I waited outside of Best Buy for nearly a day in the rain for the new XBOX 360. I waited outside of another Best Buy for over a day in below freezing weather through snow and sleet for the Playstation 3. Just a few months ago, I purchased another XBOX 360 and a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
# We are not loading Active Record, nor Active Resources etc. | |
# We can do this in any app by simply replacing the rails gem | |
# by the parts we want to use. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
gem "tzinfo" | |
# Let's use thin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Integrates with memegenerator.net | |
# | |
# Y U NO <text> - Generates the Y U NO GUY with the bottom caption | |
# of <text> | |
# | |
# I don't always <something> but when i do <text> - Generates The Most Interesting man in the World | |
# | |
# <text> ORLY? - Generates the ORLY? owl with the top caption of <text> | |
# | |
# <text> (SUCCESS|NAILED IT) - Generates success kid with the top caption of <text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
font-family:Courier; | |
padding:8px; | |
font-size:16px; | |
width:50%; | |
} | |
input::-webkit-input-placeholder { | |
color: #ddd; | |
font-style:italic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typical route | |
get '/my_model' do | |
# return query results if search param, otherwise return all | |
if params[:relation_id] | |
MyModel.all(:relation_id => params[:relation_id], :order => :name.asc) | |
else | |
MyModel.all(:order => :name.asc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start off with the hash | |
timezones = {} | |
# then build the hash | |
(-12..12).to_a.each do |i| | |
timezones["utc"+i] = 0 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#gbx3, #gbx4 {height:20px !important;} | |
#gb {font:10px/27px Arial,sans-serif !important;height:2px !important;} | |
.docs-title-inner {font-size:16px !important;} | |
.gbt {line-height:18px !important;} | |
.docs-menubar {height:28px !important;} | |
#docs-bars {height:4px !important;background:black !important;} | |
#docs-bars:hover {height:auto !important;background:none !important;} | |
#docs-menubar, #docs-toolbar-wrapper {display:none !important;} | |
#docs-bars:hover #docs-menubar, #docs-bars:hover #docs-toolbar-wrapper {display:block !important;} |