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
groups = Rails.groups(assets: %w(development test)) | |
unless Rails.env.production? | |
user = `cd "#{Rails.root}" && git config user.email`.chomp | |
groups << user unless user.blank? | |
end | |
Bundler.require(*groups) |
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
func loadWebshims() { | |
scr = document.createElement("script") | |
scr.type = "text/javascript" | |
scr.src = "#{asset_path('javascript.js')" | |
document.head.appendChild(scr) | |
} | |
setTimeout(loadWebshims, 0) |
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
Installing libv8 (3.3.10.4) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/divoxx/.rbenv/versions/ree-1.8.7-2012.02/bin/ruby extconf.rb | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. | |
Provided configuration 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
package main | |
import ( | |
"fmt" | |
"math" | |
"sort" | |
) | |
// Wraps a slice of ints with a target num and define sorting by distance from element and the num | |
type IntDistSlice struct { |
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 RomanNumeral | |
VALUE_MAPPER = [['M', 1000], ['D', 500], ['L', 50], ['X', 10], ['IX', 9], ['V', 5], ['IV', 4], ['I', 1]] | |
def initialize(int) | |
@int = int.freeze | |
end | |
def to_roman | |
output = '' | |
num = @int |
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 RomanNumeral | |
VALUE_MAPPER = [['M', 1000], ['D', 500], ['L', 50], ['X', 10], ['IX', 9], ['V', 5], ['IV', 4], ['I', 1]] | |
def roman num | |
output = '' | |
while num > 0 | |
VALUE_MAPPER.each do |letter, letter_value| | |
num_of_letters = (num / letter_value) |
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
package main | |
/* | |
* This is just a example to ilustrate the issue, don't conside this is the actual code ;) | |
* I'm mixing the graph package and the main (application) package to illustrate the problem | |
*/ | |
import "log" | |
// graph package below |
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
gem list | cut -d ' ' -f 1 | tee gems.txt | xargs gem uninstall -I -a && for path in $(echo `gem env path` | tr ":" "\n"); do rm -rf ${path}/specifications/* ${path}/cache/*; done && cat gems.txt | xargs gem install | |
rm gems.txt |
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
roar_test.rb:11:in `initialize': wrong number of arguments(1 for 0) (ArgumentError) | |
from roar_test.rb:11:in `new' | |
from roar_test.rb:11:in `<main>' |
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
divoxx@wizard ~ : goinstall go-gb.googlecode.com/hg/gb | |
/bin/bash: === cd /usr/local/Cellar/go/HEAD/src/pkg/go-gb.googlecode.com/hg/gb; bash gomake -f- install | |
6g -I "/usr/local/Cellar/go/HEAD/pkg/darwin_amd64" -I "/usr/local/share/go/pkg/darwin_amd64" -o _go_.6 build.go cgo.go deps.go files.go gb.go genmake.go gentest.go gofix.go gofmt.go goinstall.go make.go pkg.go protobuf.go query.go runext.go usage.go util.go | |
pkg.go:255: cannot use this (type *Package) as type filepath.WalkFunc in function argument | |
pkg.go:255: too many arguments in call to filepath.Walk | |
make: *** [_go_.6] Error 1 | |
--- exit status 2 | |
goinstall: go-gb.googlecode.com/hg/gb: install: running bash: exit status 2 |