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
`brew install postgis` | |
But you don't have gdal installed (a dependency) so brew trys to install gdal aaand... | |
Fails with: `'gcc-4.2' failed with exit status 1` | |
Solutuion: Run brew install in verbose mode | |
`brew install -vd postgis` or `brew install -vd gdal` |
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
<div id="slideshow"> | |
<img id="container" src="http://placekitten.com/400" alt="kitten" /> | |
<img id="container" src="http://placekitten.com/250" style="display:none;" alt="kitten" /> | |
<img id="container" src="http://placekitten.com/300" style="display:none;" alt="kitten" /> | |
<img id="container" src="http://placekitten.com/200" style="display:none;" alt="kitten" /> | |
<img id="container" src="http://placekitten.com/500" style="display:none;" alt="kitten" /> | |
</div> | |
<script src="solution.js"></script> |
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
require 'webrick' | |
include WEBrick | |
s = HTTPServer.new( | |
:Port => 3000, | |
:DocumentRoot => Dir::pwd | |
) | |
trap("INT"){ s.shutdown } |
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
# https://gist.github.com/1214011 | |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= BootstrapLinkRenderer | |
super.try :html_safe | |
end | |
class BootstrapLinkRenderer < LinkRenderer |
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
# https://github.com/mxcl/homebrew/issues/13373 | |
cd `brew --prefix` | |
rm Library/Formula/stunnel.rb | |
brew update -v |
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
ChSound::Application.routes.draw do | |
#get "list/index" | |
resources :list | |
#get "gallery/index" | |
resources :gallery | |
# Set List/index as root | |
# app can now be accessed at 0.0.0.0:3000 | |
# instead of 0.0.0.0:3000/list/index |
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
https://gist.github.com/1951671 | |
http://ejohn.org/projects/javascript-diff-algorithm/ | |
https://github.com/aurelian/ruby-stemmer | |
http://www.propublica.org/nerds/item/when-are-190-emails-like-six-emails |
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
options = { :address => "smtp.gmail.com", | |
:port => 587, | |
:domain => 'gmail.com', | |
:user_name => user_name, | |
:password => password, | |
:authentication => 'plain', | |
:enable_starttls_auto => true } | |
Mail.defaults do | |
delivery_method :smtp, options |
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
<script src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
function onYouTubePlayerReady(playerId) { | |
ytplayer = document.getElementById("myytplayer"); | |
setInterval(updateytplayerInfo, 250); | |
updateytplayerInfo(); | |
ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); | |
ytplayer.addEventListener("onError", "onPlayerError"); | |
} | |
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
<script type="text/javascript"> | |
$(function () { | |
// Creating styles here to keep boilerplate down | |
var chartStyles = { | |
fontSize: '14px', | |
fontWeight: 'normal', | |
color: '#231F20', | |
fontFamily: "Georgia, 'Times New Roman', Times, serif", | |
textTransform: 'uppercase' |