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
web: bundle exec thin start | |
worker: bundle exec rake jobs:work | |
log: tail -f -n 0 log/development.log | |
watchr: bundle exec rake watchr |
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
[52/70] cxx: src/node.cc -> build/default/src/node_6.o | |
../src/node.cc: In function ‘void node::CheckIdleness(ev_timer*, int)’: | |
../src/node.cc:135: error: no matching function for call to ‘v8::V8::IdleNotification()’ | |
default/deps/v8/include/v8.h:2331: note: candidates are: static bool v8::V8::IdleNotification(bool) | |
../src/node.cc: In function ‘void node::NotifyIdleness(ev_idle*, int)’: | |
../src/node.cc:149: error: no matching function for call to ‘v8::V8::IdleNotification()’ | |
default/deps/v8/include/v8.h:2331: note: candidates are: static bool v8::V8::IdleNotification(bool) | |
../src/node.cc: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handle<v8::Value>, node::encoding)’: | |
../src/node.cc:376: error: ‘HINT_MANY_WRITES_EXPECTED’ is not a member of ‘v8::String’ | |
../src/node.cc:381: error: ‘HINT_MANY_WRITES_EXPECTED’ is not a member of ‘v8::String’ |
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
# mongo_template.rb | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" |
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
def possible_win_combo(board, combos) | |
combos.each do |combo| | |
multiple_x = board.select {|space,value| combo.include?(space) && value == 'X'} | |
if multiple_x.length == 2 | |
return combo if (board[combo[0]] != 'O' && board[combo[1]] != 'O' && board[combo[2]] != 'O') | |
end | |
end | |
nil #return not necessary, implicit | |
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
class Player | |
def initialize | |
@health = 20 | |
@clear_behind = false | |
@wounded = false | |
end | |
def play_turn(warrior) | |
warrior_wounded?(warrior) |
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
Vector2 mousePos = Input.mousePosition; | |
if (lastMousePos.Equals(mousePos)) { | |
return; | |
} | |
lastMousePos = mousePos; | |
Ray ray = Camera.main.ScreenPointToRay(mousePos); | |
float dist; | |
Plane plane = new Plane(Vector3.up, Vector3.right, Vector3.down); | |
plane.Raycast(ray, out dist); | |
Vector3 worldPoint = Camera.main.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, dist)); |
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
function upload_img($id = null) | |
{ | |
$this->layout = 'empty'; | |
//Configure::write('debug', 0); | |
if(empty($this->data)) { | |
die(); | |
} | |
$full = $this->JqImgcrop->uploadImage($this->data['Listing']['image'], 'img/listings/full/', time()); | |
NewerOlder