Skip to content

Instantly share code, notes, and snippets.

View clouder's full-sized avatar

Gumaro Melendez clouder

View GitHub Profile
@clouder
clouder / output
Created February 2, 2012 21:58
should I not be doing this?
1) Broom when unit is not in [days, weeks, months, years] has an error about unit not being supported
Failure/Error: @broom.errors.get(:unit).should include "#{value} is not a supported duration"
expected ["eval() is not a supported duration"] to include "0 is not a supported duration"
Diff:
@@ -1,2 +1,2 @@
-["0 is not a supported duration"]
+["eval() is not a supported duration"]
# spec/models/broom_spec.rb:75:in `block (4 levels) in <top (required)>'
2) Broom when unit is not in [days, weeks, months, years] has an error about unit not being supported
@clouder
clouder / bracket.js
Created March 19, 2012 04:29
advanced ncaa bracket creator
['hi','lo'][Math.floor(Math.random()*2)]
@clouder
clouder / gist:3730989
Created September 16, 2012 04:26
newline word wrapper for textarea
// throttle function used so that we are only formatting textarea
// after the person stops typing for so long
function throttle(f, delay) {
var timer = null;
return function(){
var context = this, args = arguments;
clearTimeout(timer);
timer = window.setTimeout(function(){
f.apply(context, args);
},
@clouder
clouder / robot.js
Created December 5, 2012 09:30
#HTTR v1
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(5);
@clouder
clouder / robot.js
Created December 5, 2012 09:30
#HTTR v1
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(5);
@clouder
clouder / robot.js
Created December 5, 2012 09:30
#HTTR v1
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(5);
@clouder
clouder / robot.js
Created December 5, 2012 09:49
Zolmeister
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {
@clouder
clouder / robot.js
Created December 5, 2012 09:52
#HTTR v1
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(5);
clouder@dillen-vbox:~$ rvm get head; rvm pkg remove; rvm reinstall all --force
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 240 0 --:--:-- --:--:-- --:--:-- 407
100 11525 100 11525 0 0 9528 0 0:00:01 0:00:01 --:--:-- 2813k
Downloading RVM from wayneeseguin branch master
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 124 100 124 0 0 320 0 --:--:-- --:--:-- --:--:-- 576
100 1619k 100 1619k 0 0 333k 0 0:00:04 0:00:04 --:--:-- 450k
clouder@dillen-vbox:~$ rvm rubygems head --verify-downloads 1
Retrieving rubygems-rubygems-b79ed97
######################################################################## 100.0%
No checksum for downloaded archive, recording checksum in user configuration.
Extracting rubygems-rubygems-b79ed97 ...
Removing old Rubygems files...
/home/clouder/.rvm/scripts/functions/support: line 170: cd: /home/clouder/.rvm/src/rubygems-rubygems-b79ed97: No such file or directory
Installing rubygems-rubygems-b79ed97 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/home/clouder/.rvm/gems/ruby-2.0.0-p0:/home/clouder/.rvm/gems/ruby-2.0.0-p0@global:/home/clouder/.rvm/gems/ruby-2.0.0-p0:/home/clouder/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/home/clouder/.rvm/gems/ruby-2.0.0-p0 /home/clouder/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -d /home/clouder/.rvm/src/rubygems-rubygems-b79ed97/setup.rb', please read /home/clouder/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.