Skip to content

Instantly share code, notes, and snippets.

View gvn's full-sized avatar
🥀
technopagan is the term

Gavin Suntop gvn

🥀
technopagan is the term
View GitHub Profile
@gvn
gvn / mofo-testing.md
Last active August 29, 2015 14:16
Mofo Testing

Mofo Testing Notes

General approach for functional testing:

Do programmatic user interactions via headless browser and analyze the resulting DOM mutations.

PhantomJS

  • Gotcha: Phantom 2 downloaded from official site doesn't work on Yosemite. Get a working binary here.
  • mocha-phantomjs looks promising but isn't on 2 yet.
@gvn
gvn / react-notes.md
Last active August 29, 2015 14:10
React Notes

React Notes

JSX is a JavaScript syntax extension that looks similar to XML. You can use a simple JSX syntactic transform with React.

You don't have to use JSX with React. You can just use plain JS. However, we recommend using JSX because it is a concise and familiar syntax for defining tree structures with attributes.

React can either render HTML tags (strings) or React components (classes).

React's JSX uses the upper vs. lower case convention to distinguish between local component classes and HTML tags.

@gvn
gvn / index.html
Last active August 29, 2015 14:08
Pure CSS Bubble Steps
<ol class="steps">
<li>
<a class="current" href="#"><span class="number">1</span> Choose</a>
</li>
<li>
<a href="#"><span class="number">2</span> Details</a>
</li>
<li>
@gvn
gvn / criterion.csv
Last active July 7, 2023 10:29
The Criterion Collection
Catalog Number Title Director Year
1 Grand Illusion Renoir,Jean 1937
2 Seven Samurai Kurosawa,Akira 1954
3 The Lady Vanishes Hitchcock,Alfred 1938
4 Amarcord Fellini,Federico 1974
5 The 400 Blows Truffaut,François 1959
6 Beauty and the Beast Cocteau,Jean 1946
7 A Night to Remember Baker,Roy Ward 1958
8 The Killer Woo,John 1989
9 Hard Boiled Woo,John 1992
@gvn
gvn / LED.md
Last active August 29, 2015 14:00

LED Bulb Mania

Bulbs Tried

Satco S9041 8 Watt (50 Watt) 540 Lumens R20 LED Cool White 4000K 106 Beam Ditto Light Bulb, Dimmable

Tried 6 in kitchen. Clinical white, not bad. Good cooking light. Highest buzzing with Lutron Maestro CL dimmer. Small almost traditional bulb size.

Grimaldi R20 LED Recessed Light - 4 Watts - 2900K - 380 Lumens - Equivalent to a 45W Philips Incandescent Reflector Bulb

Keybase proof

I hereby claim:

  • I am gvn on github.
  • I am gvn (https://keybase.io/gvn) on keybase.
  • I have a public key whose fingerprint is 45E7 D73E 4EB9 17E6 9E1C 4BB6 7B8F D5AF 5D35 96B6

To claim this, I am signing this object:

JS Punctuation Preprocessor

Before

function blah()
  console.log('blah')

  if (foo === 1)
 bar = 2
@gvn
gvn / geometric-js.md
Created February 14, 2014 19:18
Geometric Functions in Javascript

Geometric Functions in Javascript

Distance between 2 points

function distance(x1, y1, x2, y2) {
  return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
}
@gvn
gvn / echo.js
Last active January 4, 2016 09:58
Echo (Proof of concept)
window.echo = function (message, namespace) {
if (namespace && !echo.namespaces[namespace]) {
return;
}
console.log(message);
};
// TODO : DRY
echo.warn = function (message, namespace) {