Skip to content

Instantly share code, notes, and snippets.

View CrowdHailer's full-sized avatar

Peter Saxton CrowdHailer

View GitHub Profile
@CrowdHailer
CrowdHailer / orientation-speed.html
Created June 1, 2015 13:08
Check how often request animation frame is called compaired to device orientation
<script>
var i = 0
var deviceOrientationData
window.addEventListener('deviceorientation', function( event ) {
deviceOrientationData = event;
i = i + 1
}, false);
function AddCount() {

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@CrowdHailer
CrowdHailer / first.rb
Created January 21, 2015 01:11
Some fun with ruby currying
class Fixnum
alias_method :times, :*
def *(o=nil)
o.nil? ? ->(x){ times x } : times(o)
end
end
puts (11..14).map(&3.*)
@CrowdHailer
CrowdHailer / command don't query
Last active August 29, 2015 14:11
Tell don't ask and service objects
gist
@CrowdHailer
CrowdHailer / list
Last active August 29, 2015 14:08
Padrino Demo applications
- postgreSQL database example. just create action limit to 5 heroku clear db testing
- form object Money Gem or
- Presenter object, geokit and googlemaps
- Flash, flash now
- Error Handling
- views
- sass scut pure
- Crud two - heroku -datetime category form for
- Mailer
- Service objects