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
# fancy prompt | |
COLOR_NONE="\[\e[0m\]" | |
BLACK_BOLD="\[\e[30;1m\]" | |
RED_BOLD="\[\e[31;1m\]" | |
GREEN_BOLD="\[\e[32;1m\]" | |
BROWN_BOLD="\[\e[33;1m\]" | |
BLUE_BOLD="\[\e[34;1m\]" | |
PINK_BOLD="\[\e[35;1m\]" | |
CYAN_BOLD="\[\e[36;1m\]" |
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
startup_message off | |
term screen | |
#deflogin off | |
escape ^Oo | |
vbell off | |
defscrollback 10000 | |
bind h prev | |
bind C hardcopy | |
bell_msg "" | |
shell -$SHELL |
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
var crypto = require('crypto'); | |
var iv = Buffer.from('0000000000000000000000==', 'base64'); | |
var key = Buffer.from('ffffffffffffffffffffffffffffffff'); | |
// aes-256-gcm or aes-256-ctr | |
var encrypt = crypto.createCipheriv('aes-256-ctr', key, iv); | |
var decrypt = crypto.createDecipheriv('aes-256-ctr', key, iv); | |
var plaintext = 'hello world'; |
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
const request = require('request-promise'); | |
const twilio = require('twilio'); | |
const log = console.log; // switch to winston or something | |
// Your Account SID from www.twilio.com/console | |
let accountSid = process.env.TWILIO_SID; | |
// Your Auth Token from www.twilio.com/console | |
let authToken = process.env.TWILIO_AUTH_TOKEN; |
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
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import cv2 | |
# initialize the camera and grab a reference to the raw camera capture | |
camera = PiCamera() | |
camera.resolution = (1280, 720) | |
camera.framerate = 10 | |
rawCapture = PiRGBArray(camera, size=(1280, 720)) |
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 cv2 | |
import numpy as np | |
def canny_image(image): | |
gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) | |
blur = cv2.GaussianBlur(gray, (5,5), 0) | |
canny = cv2.Canny(blur, 50, 150) # TODO change values based on light levels | |
return canny | |
def region_of_interest(image): |
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
const int CH_1_PIN = 9; | |
const int CH_2_PIN = 10; | |
const int CH_3_PIN = 11; | |
char buf [64]; | |
void setup() { | |
Serial.begin(9600); | |
} |
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
#include <EnableInterrupt.h> | |
const int CH_1_PIN = 9; | |
volatile int pwmValue; | |
volatile unsigned long prevTime = 0; | |
void setup() { | |
Serial.begin(9600); | |
enableInterrupt(CH_1_PIN, rising, RISING); |
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
#include <EnableInterrupt.h> | |
#include "./ServoTimer2.h" | |
const int CH_1_PIN = 9; | |
const int CH_1_PIN_OUT = 3; | |
const int DEADZONE = 20; | |
volatile int pwmValue; | |
volatile unsigned long prevTime = 0; |
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
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import cv2 | |
import time | |
# initialize the camera and grab a reference to the raw camera capture | |
camera = PiCamera() | |
camera.resolution = (1280, 720) | |
camera.framerate = 10 | |
rawCapture = PiRGBArray(camera, size=(1280, 720)) |
OlderNewer