Skip to content

Instantly share code, notes, and snippets.

View dgellow's full-sized avatar
🐢
Pulu pulu 🏳️‍🌈

Sam El-Borai dgellow

🐢
Pulu pulu 🏳️‍🌈
View GitHub Profile
(defn polling [fun]
(println "[polling] started")
(loop []
(if (not (realized? fun))
(recur)))
(println "[polling] result: " (deref fun))
(println "[polling] end")
(deref fun))
(do
// Define a class
AwesomeClass = function () {
this.hello = function(param) {
console.log("[base method] ", param);
return param;
};
};
// Create an instance
awesome_object = new AwesomeClass();
@dgellow
dgellow / predicat_totem.py
Created March 3, 2014 09:53
Get only tweets tagged as 'fixme'
def filter_fixme(data):
return filter(
lambda x: 'fixme' in x.get('tags', []), data
)
function Point(x, y, proto) {
var p = Object.create(proto || Point.prototype);
p.x = x;
p.y = y;
return p;
};
Point.prototype = {
if (!window.app) {
window.app = {}
}
window.app.Cow = function(name) {
this.name = name || 'Anon cow';
}
window.app.Cow.prototype = {
greets: function(target) {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dgellow
dgellow / gtk-keys.css
Created April 17, 2014 15:45
GTK's emacs keybindings /usr/share/themes/Emacs/gtk-3.0/gtk-keys.css
/*
* GTK - The GIMP Toolkit
* Copyright (C) 2002 Owen Taylor
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
"[{\"title\":null,\"id\":null,\"steamcmd\":null,\"steam client\":null,\"anonymous login\":null,\"note\":null},{\"title\":\" Arma 3 Dedicated Server\",\"id\":\"233780\",\"steamcmd\":\"Yes\",\"steam client\":\"Yes\",\"anonymous login\":\"\",\"note\":\"\\n\"},{\"title\":\" Blade Symphony Dedicated Server\",\"id\":\"228780\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"\",\"note\":\"Beta. Game Purchase Required\\n\"},{\"title\":\" Counter-Strike Dedicated Server\",\"id\":\"90\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Counter-Strike Global Offensive Dedicated Server\",\"id\":\"740\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"\\n\"},{\"title\":\" Counter-Strike: Condition Zero Dedicated Server\",\"id\":\"232330\",\"steamcmd\":\"Yes\",\"steam client\":\"\",\"anonymous login\":\"Yes\",\"note\":\"+app_set_config \\\"90 mod czero\\\"\\n\"},{\"title\":\" Counter-Strike: Source Dedicated Server\",\"id