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
| ###################################### | |
| ########### INSTALLATION ############# | |
| ###################################### | |
| First, we will configure the primary internet-facing router. | |
| - Reserve an IP address that will be your DD-WRT router. In this example, I will use 192.168.1.69 | |
| - Setup your port-forwarding to expose SSH by setting the external port to something memorable like 420, and the internal port to 22 on IP 192.168.1.69. | |
| Now, factory reset the DD-WRT router, and connect it directly to your laptop via ethernet. Disconnect from your primary router. | |
| Go to the DD-WRT router configuration page at 192.168.1.1. |
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
| DROP TABLE saleinv; | |
| DROP TABLE car; | |
| DROP TABLE servinv; | |
| DROP TABLE prospect; | |
| DROP TABLE customer; | |
| DROP TABLE baseoption; | |
| DROP TABLE invoption; | |
| DROP TABLE servwork; | |
| DROP TABLE employee; | |
| DROP TABLE options; |
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 <SPI.h> | |
| int cspin = 10; | |
| int value = 255; | |
| void setup() { | |
| pinMode(cspin, OUTPUT); | |
| Serial.begin(9600); | |
| SPI.begin(); |
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
| MONTHS = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "january", "jan", "feb", "february", "march", "mar", "april", "apr", "may", "june", "jun", "july", "jul", "august", "aug", "september", "sept", "october", "oct"] | |
| DAYS = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th", "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th", "30th", "31st", "32nd", "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth", "twentieth", "twenty first", "twenty second", "twenty third"] | |
| YEARS = ["2018", "18", "1994", "94"] | |
| #find every instance of every elemen |
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 time | |
| alphabet = "abcdefghijklmnopqrstuvwxyz0123456789" | |
| def bruteforce(string_, password_, maxDepth_): | |
| for ch in alphabet: #for each character in the alphabet | |
| string_ = string_[0:len(string_)-1] + ch #change the last character of the working string to the next value in the alphabet | |
| #print(string_) | |
| if string_ == password_: #if the string has been found: | |
| return True #return true | |
| if len(string_) < maxDepth_: #if we're not too large: |
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
| ################################################## | |
| # Turtle Sine Wave Generator ##################### | |
| # This program draws a sine wave, ################ | |
| # using the turtle library, based on user input. # | |
| # 2018, Jeremy Clark ############################# | |
| ################################################## | |
| import turtle | |
| import math |
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 Pot { | |
| uint8_t rawValue = 0; //the raw value of the potentiometer | |
| uint8_t smoothValue = 0; //the smoothed public-facing value of the pot | |
| uint8_t stableSteps = 0; //value that tracks how many update() calls have passed since the last time the pot value change | |
| void (*changeMethod)(uint16_t); //the function that gets called when the smoothed value changes | |
| public: | |
| Pot(void (*changeMethod_)(uint16_t)) { | |
| changeMethod = changeMethod_; | |
| } |
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
| void Pot::update() { | |
| //how this debounce code works: | |
| //First, the pot value is retrieved and stored as a Reference | |
| //Next, the reference is checked against the current pot value for 8 steps. | |
| //if the value changes, go back to step 1. | |
| //if the value doesn't change, we know we're not bouncing, so store that value. | |
| uint16_t v = analogRead(pin); | |
| if(v != reference) { //bounce detected... |
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
| using a 16x2 HD44780 i2c LCD display with the arduino platform. | |
| with the lcd display soldered to the i2c controller, wire the 4 i2c pins up to the arduino, GND->GND, VCC->5v, SDA->SDA, SCL->SCL. | |
| Power on the arduino to ensure the lcd backlight comes on. and everything is kosher. | |
| Next, open up your arduino IDE and load up the sketch found here: https://playground.arduino.cc/Main/I2cScanner | |
| Run this sketch and take note of the address output. | |
| Next, load in this sketch, replacing 0x3F with the address you found. |
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
| //shift register ramblings | |
| void sendByte(bool value[8], int dataPin, int clockPin, int latchPin) { | |
| digitalWrite(latchPin, LOW); | |
| for(int i = 0; i < 8; i++) { | |
| digitalWrite(dataPin, value[i]); | |
| digitalWrite(clockPin, HIGH); | |
| digitalWrite(clockPin, LOW); | |
| } | |
| digitalWrite(latchPin, HIGH); |