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
¯\_(ツ)_/¯ | |
┌( ಠ_ಠ)┘ | |
{ಠಠ}_,,|, | |
ಥ_ಥ | |
(///_ಥ) | |
๏̯͡๏ | |
טּ_טּ | |
◪_◪ | |
◮_◮ | |
◔_◔ |
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
//To change the way (below) is displayed | |
$display("%t", $realtime); | |
//$timeformat(unit#, prec#, "unit", minwidth); | |
$timeformat(-3, 2, " ms", 10); // -3 and " ms" give useful display msg | |
unit is the base that time is to be displayed in, from 0 to -15 | |
precision is the number of decimal points to display. | |
"unit" is a string appended to the time, such as " ns". | |
minwidth is the minimum number of characters that will be displayed. |
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
virtualenv --no-site-packages hodor | |
hodor/bin/pip install simplejson ujson cbor tnetstring msgpack-python | |
curl -s 'http://www.json-generator.com/api/json/get/cvfsLVmKiG?indent=2' > test.json | |
hodor/bin/python shootout.py |
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
#!/usr/bin/env python | |
import RPi.GPIO as gpio | |
from time import sleep | |
import re | |
import sys | |
gpio.setmode(gpio.BCM) | |
red = 23 | |
yel = 24 |
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 clear_data(session): | |
meta = db.metadata | |
for table in reversed(meta.sorted_tables): | |
print 'Clear table %s' % table | |
session.execute(table.delete()) | |
session.commit() |
(Note: This was originally from my blog post on AlexanderRobotics.com, but I brought that site down and wanted to keep this post alive since it's referenced by Stack Overflow).
The beauty of the Arduino lies in its simplicity. A look under the covers of the Arduino and its IDE, however, reveals a fascinating chipset and an open, extensive toolchain.
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
# First, Install Vagrant and Virtualbox then: | |
# Create new project directory | |
mkdir -p ~/Sites/newproject # Create new project directory | |
mk ~/Sites/newproject # Go into your new project directory | |
# Setup Vagrant | |
vagrant init | |
# Edit vagrant file box and box url to install Ubuntu, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L6-L8 | |
# Edit Vagrantfile to create a static IP address, just like https://gist.github.com/fideloper/dab171a2aa646e86b782#file-vagrantfile-share-var-www-rb-L10 |
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
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions |
OlderNewer