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/bash | |
for g in `gem list --no-details --no-versions`; do sudo gem uninstall -aIx $g; done |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>H.264 Level Calculator</title> | |
<style> | |
textarea { | |
width: 640px; | |
height: 360px; | |
} |
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
# load triangle | |
triangle = [] | |
f = open('triangle.txt') | |
for line in f: | |
triangle.append(line.split()) | |
tree_height = len(triangle) |
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
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.back(15); | |
robot.turn(5); | |
robot.fire(); | |
}; |
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
var Robot = function(r) {}; | |
Robot.prototype.onIdle = function(e) { | |
var r = e.robot; | |
r.ahead(90); | |
r.turn(60); | |
}; | |
Robot.prototype.onWallCollision = function(e) { | |
var r = e.robot; |
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
var Robot = function(robot) { | |
this.longAgo = 50; | |
this.spot = this.longAgo; | |
}; | |
Robot.prototype.onIdle = function(e) { | |
var r = e.robot; | |
r.fire(); | |
if (this.spot > this.longAgo) { | |
r.rotateCannon(); |
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
var Robot = function(robot) {}; | |
Robot.prototype.onIdle = function(e) { | |
var r = e.robot; | |
r.turn(); | |
r.fire(); | |
r.ahead(); | |
}; | |
Robot.prototype.onScannedRobot = function(e) { |
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
# Updates if needed | |
git checkout master | |
git fetch | |
git pull | |
# Merge and reset | |
git merge whatever_branch | |
git reset origin/master | |
# Commits everything as a single commit |
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
#include <stdio.h> | |
#include <my_lib.h> | |
int main(void) { | |
printf("%s", my_function()); | |
} | |
/* | |
Build me with: |
OlderNewer