Skip to content

Instantly share code, notes, and snippets.

@fholgado
fholgado / pong.js
Created December 8, 2014 14:08
Pong Score Tracker
var pong = {};
// Flags
// Player 0, Player 1 scores :)
pong.score = [0, 0];
// We'll use this flag to set first serve
pong.gameStart = false;
pong.currentlyServing = 0;
// Scoring functions
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.html
Created March 13, 2013 19:47
A CodePen by Federico Holgado.
<nav id="btns">
<a href="#" class="next">Next</a>
</nav>
@fholgado
fholgado / index.js.coffee
Created June 25, 2012 15:39
Spine.js preloader logic
class App extends Spine.Controller
@extend(Spine.Events)
constructor: ->
super
# Initialize cache object
App.cache = {} unless App.cache?
@fholgado
fholgado / root_controller.js.coffee
Created June 18, 2012 18:32
Fix routing for substacks
class App.Root extends Spine.Stack
controllers:
feeds: App.Feeds
routes:
'/feeds' : 'feeds'
className: 'stack root'
constructor: ->
@fholgado
fholgado / index.js.coffee
Created March 19, 2012 18:52
Load all models before instantiating app
# Let's get all the data first
query_params =
data: {page: 1}
processData: true
new_request: true
App.Email.fetch(query_params)
App.User.fetch()
App.Rule.fetch()
App.PopAccount.fetch()