Skip to content

Instantly share code, notes, and snippets.

View aaronj1335's full-sized avatar
🤠

Aaron Stacy aaronj1335

🤠
View GitHub Profile
@aaronj1335
aaronj1335 / collection.js
Last active August 29, 2015 13:57
waterfall data layer
define([
'underscore',
'knockout'
], function(_, ko) {
function Collection() {
}
Collection.prototype.init = function() {
this._instances = ko.observableArray();
@aaronj1335
aaronj1335 / README.md
Last active December 26, 2015 15:09
how generators work w/ iterating over collections.

generators

2 (most?) common uses of generators:

  • async control flow
    • this is what the js community has mostly been talking about
    • that's a huge topic, and it's [better covered elsewhere][jlongster], so i'm not going to go over that stuff here
  • iteration - this is probably the most common use case for python

iteration

Fun with Mutation Observers

I’ve been having a play around with Mutation Observers this morning, trying to work out when notifications happen and what happens when removing a node that was just added.

If you’re unfamiliar with Mutation Observers, they let you receive notifications when an element, or elements, have been modified in a particular way (here's an intro to Mutation Observers from Mozilla).

Observing mid-parsing

Consider this:

@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@jeetsukumaran
jeetsukumaran / custom_iterator.cpp
Created February 18, 2010 02:33
Sample C++/STL custom iterator
// Sample custom iterator.
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558)
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cassert>
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶