Skip to content

Instantly share code, notes, and snippets.

<div class="et-wrapper">
<button class="et-rotate" et-in="rotateSlideIn" et-out="rotateSlideOut">Next</button>
<div class="et-page">
<h2>Page 1</h2>
</div>
<div class="et-page">
<h2>Page 2</h2>
</div>
</div>
@dan-silver
dan-silver / tips.md
Last active July 17, 2017 22:26
Generating Haar Classifiers

####Resources

####Goals

<link rel="stylesheet" type="text/css" href="elementTransitions.min.css" />
<script src="elementTransitions.min.js"></script>
// https://github.com/microsoftgraph/microsoft-graph-explorer/blob/master/src/app/base.ts
export type AuthenticationStatus = "anonymous" | "authenticating" | "authenticated";
export type RequestType = "GET" | "PUT" | "POST" | "GET_BINARY" | "POST" | "PATCH" | "DELETE";
export interface GraphApiCall {
statusCode?: number
duration?: number
method?: RequestType
calendars.read calendars.readwrite files.read files.readwrite mail.read mail.send user.read user.readbasic.all user.readwrite
/* Photocell simple testing sketch.
Connect one end of the photocell to 5V, the other end to Analog 0.
Then connect one end of a 10K resistor from Analog 0 to ground
Connect LED from pin 11 through a resistor to ground
For more information see http://learn.adafruit.com/photocells */
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the sensor divider
int LEDpin = 11; // connect Red LED to pin 11 (PWM pin)
<div class="et-wrapper et-rotate" et-out="scaleDown" et-in="scaleUpDown delay300">
<div class="et-page">
<h5>In:</h5>
scaleUpDown delay300
<h5>Out:</h5>
scaleDown
</div>
<div class="et-page">
<h5>In:</h5>
scaleUpDown delay300
<div class="et-wrapper">
<div class="et-page">
<h2>Page 1</h2>
<button class="et-rotate" et-in="rotateCarouselRightIn" et-out="rotateCarouselRightOut">Next</button>
</div>
<div class="et-page">
<h2>Page 2</h2>
<button class="et-rotate" et-in="rotateCarouselLeftIn" et-out="rotateCarouselLeftOut">Back</button>
</div>
</div>
<div class="et-wrapper et-rotate" et-in="rotateSlideIn" et-out="rotateSlideOut">
<div class="et-page">
<h2>Page 1</h2>
</div>
<div class="et-page">
<h2>Page 2</h2>
</div>
</div>
@dan-silver
dan-silver / gist:5514553
Created May 3, 2013 22:05
Generates a random username
lorem_ipsum = "Lorem ipsum dolor sit amet consectetur adipiscing elit Maecenas egestas libero eu mauris blandit vitae imperdiet dolor lacinia Sed ac diam vel urna viverra ullamcorper Nulla enim tortor mollis at venenatis at porta dui ligula sollicitudin non mollis non tincidunt arcu Mauris volat sagittis lorem nec tincidunt Vestibulum ipsum massa Mauris sit amet purus sit amet est feugiat gravida vel sed Proin quam sem Sed laoreet massa mauris laoreet non rhoncus lit iaculis Duis non risus augue vitae sagittis metus Fusce sagittis imperdiet massa sit amet mattis Proin sed scelerisque orci Aliquam grav justo non lacus rum tincidunt Donec faucibus sollicitudin felis eu porttitor dui porttitor faucibus";
lorem_ipsum_words = lorem_ipsum.split(" ");
function generateRandomWord() {
word = lorem_ipsum_words[Math.floor(Math.random()*lorem_ipsum_words.length)];
word = word[0].toUpperCase() + word.substring(1);
return word;
}
function generateUserName() {