Skip to content

Instantly share code, notes, and snippets.

@EndangeredMassa
EndangeredMassa / autobinding.coffee
Created October 6, 2012 19:59
Issues with Ember
###
# This emberjs example makes me cring for a couple reasons,
# but the biggest is that it calls `.property` on the function
# to turn fullName into a auto-updating value.
# Since emberjs is a framework instead of a library, like Backbone,
# it seems like it should do this for you.
App.Person = DS.Model.extend({
firstName: DS.attr('string'),
lastName: DS.attr('string'),
@EndangeredMassa
EndangeredMassa / nko_entries.md
Created November 12, 2012 06:02
Sean's Picks for NKO2012
@EndangeredMassa
EndangeredMassa / 0.README
Last active December 14, 2015 00:49
Chicago Node.js: Intro to Node.js Workshop
Slides: https://docs.google.com/presentation/d/17qCqjo9MgNKdH3i0pVgqkbXyVPYS-7_COCi-etR9new/pub?start=false&loop=false&delayms=3000#slide=id.gab72b792_05
Event: http://www.meetup.com/Chicago-Nodejs/events/98566142/
To select the code in the slides, go to the gear menu in the bottom-left and select Speaker Notes.
Answers are below.
@EndangeredMassa
EndangeredMassa / 1.index.html
Created April 12, 2013 06:43
CasperJS and Infinite Redirects
<html>
<meta http-equiv="refresh" content="0" />
</html>
@EndangeredMassa
EndangeredMassa / 0.double-start.coffee
Created May 9, 2013 15:13
Multiple calls to casper.start
Scenario = (message, tests) ->
casper.start()
casper.test.info message
tests()
casper.run ->
casper.test.done()
Scenario 'Test a 200', ->
_G.createContext()
local a = require('complex')
print( a.add(5, 6) )
@EndangeredMassa
EndangeredMassa / require.lua
Created August 6, 2013 14:44
Lua Requires
-- GLOBAL CHANGES --
-- make requires return the object --
_require = _G.require
_G.require = function (name)
local original = _G[name]
_require(name)
local package = _G[name]
_G[name] = original
return package
@EndangeredMassa
EndangeredMassa / cookie.coffee
Last active January 2, 2016 12:49
testium examples
# ~/.config/ReText project/ReText.conf
[General]
autoSave=true
restorePreviewState=true
highlightCurrentLine=true
tabWidth=2
styleSheet=github.css
useWebKit=true
autoPlainText=false
@EndangeredMassa
EndangeredMassa / testing.js
Last active August 29, 2015 14:06
Estimating Over-determined Systems of Equations
/*
An over-determined system of equations is one that has more equations than unknowns.
This can lead to unsolvable systems--where there is no one value for each unkown
that can satisfy all equations in the system.
When this happens, there are ways to estimate the value of each unkown
such that it is the best fit for the system. That is, it will make each equation
come the closest to being balanced.
I am trying to reproduce this operation to get the same result.
https://www.elie.net/blog/hearthstone/how-to-find-automatically-hearthstone-undervalued-cards#.VBdzGi5dWEg