Skip to content

Instantly share code, notes, and snippets.

View drifterz28's full-sized avatar

Chris Whitney drifterz28

View GitHub Profile
@drifterz28
drifterz28 / wpa_supplicant.conf
Created March 14, 2018 17:40
Headless pi setup
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="SSID"
psk="password"
key_mgmt=WPA-PSK
}
@drifterz28
drifterz28 / PR-copy.js
Last active December 19, 2017 22:31
Copy to clipboard
// ==UserScript==
// @name PR Copy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://github.com/*
// @grant none
// ==/UserScript==
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
http://arduino.esp8266.com/staging/package_esp8266com_index.json
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
https://arduboy.github.io/board-support/package_arduboy_index.json
https://macchina.cc/package_macchina_index.json
http://drazzy.com/package_drazzy.com_index.json
@drifterz28
drifterz28 / something
Created March 30, 2015 17:36
spliting numbers in c++
// Example program
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
// declaring variables:
int a, remainder;
int result, result2, result3;
@drifterz28
drifterz28 / testservo.h
Created January 20, 2015 19:19
servo code found on g+
#include <SoftwareServo.h>
SoftwareServo myServo0; //create a servo object.
void setup() {
myServo0.attach(0); //attach the servo to pin 0 on Trinket
myServo0.write(90); // tell servo to go to position per quirk on arduino.cc
delay(15); // waits 15ms for the servo to reach the position
SoftwareServo::refresh();
}
@drifterz28
drifterz28 / debounce.js
Last active August 29, 2015 14:12
Throttle and debounce from underscore.js
/**
* @func function, a function to fire
* @wait int, wait time
* immediate bool, call function first then set timer
*/
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
@drifterz28
drifterz28 / base64_gif
Created November 26, 2014 17:56
transparent base64 gif image
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
@drifterz28
drifterz28 / clock.html
Last active August 29, 2015 14:10
animated clock
<div class="clock">
<div class="min_hand"></div>
<div class="center"></div>
<div class="hour_hand"></div>
</div>
@drifterz28
drifterz28 / label.html
Last active August 29, 2015 14:10
label show on focus
<style>
.input_wrapper {
position: relative;
margin-top: 24px;
float: left;
width: 100%;
margin-bottom: 20px;
}
input {
position: absolute;
@drifterz28
drifterz28 / firework.svg
Created November 11, 2014 23:53
firework svg with animated css
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.