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
| class Game { | |
| constructor() { | |
| this.status = [ | |
| [0, 0, 0, 0], | |
| [0, 0, 0, 0], | |
| [0, 0, 0, 0], | |
| [0, 0, 0, 0] | |
| ]; | |
| this.game_over = false; | |
| this.random_spawn(); |
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 serial, sys | |
| import Adafruit_BBIO.UART as UART | |
| UART.setup("UART1") | |
| ser = serial.Serial(port = "/dev/ttyO1", baudrate=1000000, timeout=1, parity='O', stopbits=2) | |
| send = 'hola mundo hola mundo' | |
| def printHexS(myString): | |
| sys.stdout.write('\r') | |
| for x in myString: | |
| sys.stdout.write('{0:#04X} '.format(ord(x))) | |
| sys.stdout.flush() |
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 ruby | |
| CHAR_MAP = [('a'..'z'), ('A'..'Z'), ('#'..'9')].map { |i| i.to_a }.flatten | |
| pass = (0...10).map { CHAR_MAP[rand(CHAR_MAP.length)] }.join | |
| exec "echo #{pass} | xclip -sel clip && echo 'Copied to clipboard'" |
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 commands | |
| def getmac(iface): | |
| mac = commands.getoutput("ifconfig " + iface + "| grep HWaddr | awk '{ print $5 }'") | |
| if len(mac)==17: | |
| return mac | |
| getmac('eth0') |
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
| { | |
| "name": "test", | |
| "version": "0.0.1", | |
| "private": true, | |
| "scripts": { | |
| "start": "node test.js" | |
| }, | |
| "dependencies": { | |
| "sequielize":"https://dl.dropboxusercontent.com/u/18947902/sequelize-github-master-201309221617.tar.gz", | |
| "pg": "~0.10.2", |