Skip to content

Instantly share code, notes, and snippets.

View andreinitescu's full-sized avatar

Andrei Nitescu andreinitescu

View GitHub Profile
@WinstonFassett
WinstonFassett / KOBindings.js
Created June 12, 2012 20:58
Common Knockout Bindings
// from https://github.com/SteveSanderson/knockout/wiki/Bindings---class
// addresses https://github.com/SteveSanderson/knockout/issues/233
// be careful of using the attr binding -- it has issues with iOS and quotes
// instead, use this to bind to the class attribute
ko.bindingHandlers['class'] = {
'update': function (element, valueAccessor) {
if (element['__ko__previousClassValue__']) {
$(element).removeClass(element['__ko__previousClassValue__']);
}
var value = ko.utils.unwrapObservable(valueAccessor());
@detroitpro
detroitpro / Developer-Questions.textile
Last active March 16, 2017 10:42
.NET Developer-Questions

You

  • Your twitter name:
  • Your blog address:
  • Your stackoverflow name:
  • Your github name:

Think of

The following is a list of nouns (person,place,thing). Please write down your first thoughts on each one. There is no right answer and it is assume you will not know all of them.

@cjoudrey
cjoudrey / twitter.js
Created November 5, 2011 16:37
Lazy-rendering in PhantomJS
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)
@kennym
kennym / blogspot_to_jekyll.rb
Created July 30, 2011 18:14
Migrate your blogger blog posts to jekyll.
#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format: