Skip to content

Instantly share code, notes, and snippets.

View kevinresol's full-sized avatar
💭
Stand with Hong Kong

Kevin Leung kevinresol

💭
Stand with Hong Kong
View GitHub Profile
@RealyUniqueName
RealyUniqueName / KeyValueIterator.hx
Last active October 14, 2016 10:35
Key-value map iterator
class KeyValueIterator<K,V> {
var map:Map<K,V>;
var keys:Iterator<K>;
static public inline function pairs<K,V>(map:Map<K,V>) return new KeyValueIterator(map);
public inline function new(map:Map<K,V>) {
this.map = map;
this.keys = map.keys();
}
@elsassph
elsassph / poop.js
Last active October 18, 2021 13:45 — forked from edankwan/poop.js
Array.prototype.poop = function() {
this.pop();
// return nothing, it's poop
}
Array.prototype.shit = function() {
this.shift();
// return nothing, it's poop
}
@edankwan
edankwan / poop.js
Created February 10, 2015 11:55
Array.prototype.poop()
(function(p, l){
var s = '';
function yolo(i) {
return function() {
return this.splice(this.length - i - 2);
};
}