Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am neener54 on github.
  • I am neener54 (https://keybase.io/neener54) on keybase.
  • I have a public key ASDNYOu-xFqNTgqPV_yr_zaB2rcuS-tXKelRt2tHqKGLxwo

To claim this, I am signing this object:

@Neener54
Neener54 / Browser.md
Last active November 11, 2015 16:49
Browser Functionality Links

What every developer should know about rendering 101 - High level but clear. This is a baseline for what we should keep in mind to avoid jankiness.

HTML5rocks - Tutorial on how various browsers handle rendering. Includes discussions of the parsing and lexing as well as the internals of various browser implementations.

In Depth Slideshow - Great in-depth slideshow that covers more than just rendering. Very thorough.

Google Developers - This covers just the rendering portion. This explains performance related issues with it.

Slideshare deck - Manish Trivedi did a nice high level look at things.

@Neener54
Neener54 / .railsrc
Last active September 18, 2015 00:28 — forked from ivanoats/.railsrc
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
@Neener54
Neener54 / 000_postgresql_fancy_datatypes
Last active August 29, 2015 14:27 — forked from pcreux/000_postgresql_fancy_datatypes
Postgresql fancy datatypes with Rails / ActiveRecord. Run it with `rake`!
# Postgresql fancy datatypes!
* array
* hstore (=~ hash)
* json
* jsonb
Philippe Creux - [@pcreux](http://twitter.com/pcreux)
@Neener54
Neener54 / NullObject
Last active August 29, 2015 14:07
Simple Null Object Pattern
class NullObject
# You can instantiate a new NullObject with arbitrary methods by calling
# NullObject.new({method1: "outcome1"})
# That will apply the method to the object
def initialize(methods={})
methods.each_pair do |k,v|
define_singleton_method k do |*params|
v
end
end
(function() {
var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject,
__slice = [].slice;
deepClone = function(obj) {
var func, isArr;
if (!_.isObject(obj || _.isFunction(obj))) {
return obj;
}
if (_.isDate(obj)) {
rivets.configure({
adapter: {
subscribe: function(obj, keypath, callback) {
obj.on('change:' + keypath, callback)
},
unsubscribe: function(obj, keypath, callback) {
obj.off('change:' + keypath, callback)
},
read: function(obj, keypath) {
return obj.get(keypath)
$.scrollWindowTo = function(pos, duration, cb) {
if (duration == null) {
duration = 0;
}
if (pos === $(window).scrollTop()) {
$(window).trigger('scroll');
if (typeof cb === "function") {
cb();
}
return;
<!DOCTYPE HTML>
<!--
Prologue 1.2 by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Prologue by HTML5 UP</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
@Neener54
Neener54 / listsubselect.js
Created May 8, 2014 16:35
LIst Sub Selector.js
var listSubSelector = function(){
"use strict";
$('body').on('click','li input', function(){
var $this = $(this);
if ($this.attr('checked')){
$this.parentsUntil('ul').find('input[type="checkbox"]').attr('checked',true);
}else{
$this.parentsUntil('li').find('input[type="checkbox"]').attr('checked',false);
$this.parents('.description').find('input[type="checkbox"]:first').attr('checked',false);