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
uint32_t baud; | |
uint32_t old_baud; | |
void loop() { | |
// put your main code here, to run repeatedly: | |
baud = Serial.baud(); | |
if (baud != old_baud) { |
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
/************************************* | |
* Dual Channel DC Motor Driver Board* | |
* Code Written by Idayu - MYBOTIC * | |
*************************************/ | |
int IN1 = 12; | |
int IN2 = 11; | |
int IN3 = 7; | |
int IN4 = 6; |
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
// N0 M106*36 | |
// N1 G28*18 | |
// N2 M107*39 | |
getCS("N0 M106"); | |
getCS("N1 G28"); | |
getCS("N2 M107"); |
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
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
#PS1="\h:\W \u\$" # Default | |
PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " | |
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 key1Name = "test13"; | |
var key2Name = "test22"; | |
// "hex" or "base64", default is raw(Uint8Array) | |
var encoding = "hex"; | |
////----------------------- | |
var atob = require("atob"); | |
var btoa = require("btoa"); |
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 | |
modprobe libcomposite | |
command="$1" # "up" or "down" | |
gadgetDevice="/sys/kernel/config/usb_gadget/my_gadget" | |
usb_up() { |
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
// cloud9 nvm node runner | |
{ | |
"script": [ | |
"source $HOME/.nvm/nvm.sh", | |
"set -e", | |
"if ! [ \"$debug\" == true ]; then ", | |
" node \"$file\" $args", | |
"elif \"$(node -p 'parseInt(process.version.slice(1)) < 7')\" == true; then", | |
" FLAGS=\"--nocrankshaft --nolazy --debug-brk=$debugport\"", | |
" if node --nodead_code_elimination -e '' &> /dev/null; then", |
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 have abstract application keys into a keychain, so you can keep | |
your keys (aka one login, but many apps) without having to constantly | |
shift your logins between applications or shared documents | |
We do this by: | |
- Initiate 2 instances of gun. | |
- The main user instance will act as you, using a key chain to keep key pairs | |
that apps may generate. | |
- All keys will be encrypted to yourself, which means only you will be able to access |
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 alive = false; | |
function setupChat(leave_trigger_fn) { | |
alive = true; | |
if (!gunky) { | |
gunky = new imports.gunky(gun.get("chatapp-10").get("events"), true); | |
gunky.me = new imports.gunky(gun.get(gunky.emitter_id).get("events"), true); | |
gunky.me.on("user-alive", function(id, name) { | |
var user_tag = userTag(id, name); |
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
/* | |
http://www.JSON.org/json2.js | |
2011-10-19 | |
Public Domain. | |
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
See http://www.JSON.org/js.html |