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
@ECHO OFF | |
REM Configuration | |
COLOR 0a | |
REM Kill explorer and restart | |
taskkill /im explorer.exe /f | |
start explorer.exe | |
REM Disable some programs |
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
<script type="text/javascript"> | |
(function () { // Immediately invoked function enclosure | |
var _store = [ | |
{ | |
section: '#lp-pom-block-160', | |
content: '#lp-pom-box-322', | |
button: '#lp-pom-button-245' | |
}, |
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
#!/bin/bash | |
# This script does some various utility tasks | |
# Builds the static site using Jekyll | |
# And syncs the generated site with S3 | |
# You can run this script with three options | |
# -i | enable Image processing. Creates thumbnails and quickly compresses images. | |
# -c | enable maximum Compression for images. Creates thumbnails, thoroughly compresses images, and takes a long time doing it | |
# -n | No-upload mode. Doesn't upload the build to S3. | |
# -s | enable Setup mode. Downloads the necessary npm files for compression |
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
// First, import the image like this | |
import image_src from './../img/your_image.png'; | |
// Use it inline like so (in React) | |
class YourImage extends React.Component { | |
render(){ | |
return ( | |
<img src={image_src} /> | |
) | |
} |
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
'use strict'; | |
function flatten(array) { | |
let result = []; | |
const f = function (x) { | |
if (Array.isArray(x)) { | |
x.forEach((x) => { f(x) }); | |
} else if (typeof x === 'number') { | |
result.push(x) | |
} |
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
https://www.adafruit.com/products/276 - 5V 2A (2000mA) switching power supply | |
https://www.adafruit.com/products/368 - Female DC Power adapter - 2.1mm jack to screw terminal block | |
https://www.adafruit.com/products/1461 - LED strip, but should've used the smaller strip (and I'm sure we would've if we knew it was there 😣 ) | |
https://www.adafruit.com/products/2880 - 2-pin JST SM Plug + Receptacle Cable Set | |
https://www.adafruit.com/products/1311 - Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft | |
https://www.adafruit.com/products/592 - USB cable - A/MicroB - 3ft | |
An Arduino Uno (R3) | |
http://hoopsupplies.com/shop/?id=17&collid=57 - Push Buttons - Package of 10; Select Size: Regular | |
https://www.amazon.com/dp/B000FMZ6D4 - White High Density Polyethylene (HDPE) Tubing, 3/4" ID, 1" OD, 1/4" Wall, 100' Length | |
Wire shrink |
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 "LPD8806.h" | |
#include "SPI.h" | |
#include <avr/sleep.h> | |
#include "hearts.h" | |
//since data is on 11 and clock is on 13, we can use hardware SPI | |
LPD8806 strip = LPD8806(160); //32 LED's per meter * 5 | |
int demoCaseNumber = 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
# Run this in your terminal | |
# Credit: http://stackoverflow.com/questions/27264574/import-psycopg2-library-not-loaded-libssl-1-0-0-dylib | |
export DYLD_FALLBACK_LIBRARY_PATH=$HOME/anaconda/lib/:$DYLD_FALLBACK_LIBRARY_PATH |
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 re | |
import string | |
def lowercase_match_group(matchobj): | |
return matchobj.group().lower() | |
# Make titles human friendly | |
# http://daviseford.com/python-string-to-title-including-punctuation |
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
<?php | |
/* By Davis Ford, 2015 | |
* http://daviseford.com | |
* Please feel free to re-use this code with credit. | |
*/ | |
$servername = "localhost"; | |
$username_Sample = "your_mysql_username"; | |
$password_Sample = "your_mysql_password"; |
NewerOlder