This file contains hidden or 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
{ | |
init: function(elevators, floors) { | |
elevators.forEach(function(x, index){ | |
x.on("floor_button_pressed", function(floorNum) { | |
if (x.currentFloor() > floorNum) { | |
x.goingDownIndicator(true); | |
x.goingUpIndicator(false); |
This file contains hidden or 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
-- HUMAN RESOURCE MACHINE PROGRAM -- | |
init: | |
COPYFROM 24 | |
COPYTO 22 | |
BUMPUP 22 | |
BUMPUP 22 | |
COMMENT 0 | |
main: | |
COPYFROM 22 |
This file contains hidden or 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
#!/usr/bin/env python | |
import curses | |
# see 2/howto/curses.html for info. | |
# look into curses.textpad, which turns a window into a textbox with bindings | |
# look into curses.ascii for easier char handing | |
# the curses magical setup | |
stdscr = curses.initscr() # setup intial window | |
curses.noecho() # dont echo keystrokes |
This file contains hidden or 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
################## | |
# PS1 uses # | |
################## | |
PS1a - \u@\h\$ | |
PS1b - "\$ " | |
########################### | |
# useful utilities # | |
########################### | |
ping8 - ping -c4 8.8.8.8 |
This file contains hidden or 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
import os | |
#define x and y here i guess | |
for i in xrange(x,y): | |
(out, err) = os.popen3('cmd -s %s --switch2 %s' %(i, blah))[1:] | |
#Note: [1:] excludes [0], stdin, because I don't care for it. | |
#printing out to outfile and err to .errfile goes here | |
#code excluded because its not the main focus here |
NewerOlder