Skip to content

Instantly share code, notes, and snippets.

View paulstraw's full-sized avatar

Paul Straw paulstraw

View GitHub Profile
@paulstraw
paulstraw / president elect
Created November 23, 2016 07:21
president elect
First of all, we don’t make the windmills in the United States. They’re made in Germany and Japan. They’re made out of massive amounts of steel, which goes into the atmosphere, whether it’s in our country or not, it goes into the atmosphere. The windmills kill birds and the windmills need massive subsidies. In other words, we’re subsidizing wind mills all over this country. I mean, for the most part they don’t work. I don’t think they work at all without subsidy, and that bothers me, and they kill all the birds. You go to a windmill, you know in California they have the, what is it? The golden eagle? And they’re like, if you shoot a golden eagle, they go to jail for five years and yet they kill them by, they actually have to get permits that they’re only allowed to kill 30 or something in one year. The windmills are devastating to the bird population, O.K. With that being said, there’s a place for them. But they do need subsidy. So, if I talk negatively. I’ve been saying the same thing for years about you kno
@paulstraw
paulstraw / drift-example.html
Created March 7, 2016 18:21
Using Drift with multiple images and images loaded via ajax
<img class="thumb" src="http://assets.imgix.net/dog.png?w=100" data-zoom="http://assets.imgix.net/dog.png?w=1200">
<img class="thumb" src="http://assets.imgix.net/cat.png?w=100" data-zoom="http://assets.imgix.net/cat.png?w=1200">
<img class="thumb" src="http://assets.imgix.net/frog.png?w=100" data-zoom="http://assets.imgix.net/frog.png?w=1200">
<img class="thumb" src="http://assets.imgix.net/llama.png?w=100" data-zoom="http://assets.imgix.net/llama.png?w=1200">
<p>Aenean lacinia bibendum nulla sed consectetur. Vestibulum id ligula porta felis euismod semper. Donec id elit non mi porta gravida at eget metus. Donec ullamcorper nulla non metus auctor fringilla.</p>
<div class="more-thumbs">
</div>

Keybase proof

I hereby claim:

  • I am paulstraw on github.
  • I am paulstraw (https://keybase.io/paulstraw) on keybase.
  • I have a public key ASC5INAHwB6m5L1ZG9Gl55j55kcY94kCqjM3g90GFvMfpgo

To claim this, I am signing this object:

* { margin: 0; padding: 0; border: 0; }
/* optional: always show scrollbar in non-IE */
html { overflow-y: scroll; }
body, input, select, textarea, button { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { -ms-interpolation-mode: bicubic; }
strong { font-weight: bold; }
em { font-style: italic; }
@paulstraw
paulstraw / modal.coffee
Created December 18, 2012 20:43
A hopefully-flexible class for JS modals. (Uses jQuery)
class Modal
constructor: (@content, @afterShow, @afterHide) ->
hide: =>
$(window).off 'resize', @setPosition
$('#shade').fadeOut 120, =>
$('#shade').remove()
@afterhide?()
function log(string){
document.getElementById('log').innerHTML += (string + '<br/>');
}
document.getElementById('the_div').addEventListener(
'click', function(){ log('the_div!') }, false);
document.getElementById('the_list').addEventListener(
'click', function(){ log('the_list!') }, false);
// 1. Write a class to support the following code:
function Person(name){
this.name = name;
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
console.log(thomas.name); // --> "Thomas"
// Exercise 1 - OO || !OO
// Define a data structure for cars (make and color), and a function
// that logs a string like "I'm a red Mercedes" to the console.
// Make two versions: a functional version, and a object-oriented version.
function logCar(car){
console.log(car.make + ", " + car.color);
}
var Car = function(make, color){