Skip to content

Instantly share code, notes, and snippets.

View ebi's full-sized avatar

Tobias Ebnöther ebi

View GitHub Profile
export class Immutable<S> {
private obj: S;
constructor(obj: S) {
Object.freeze(obj);
if (typeof obj === 'object') {
Object.keys(obj).forEach((key: string): void => {
Object.freeze(obj[key]);
});
}
this.obj = obj;
### Keybase proof
I hereby claim:
* I am ebi on github.
* I am ebi (https://keybase.io/ebi) on keybase.
* I have a public key whose fingerprint is 1E51 CCE7 908B 7ACB C858 C57E 2150 5AC6 4723 F6CA
To claim this, I am signing this object:
pip install --upgrade sqlalchemy
Downloading/unpacking sqlalchemy
Running setup.py egg_info for package sqlalchemy
warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'
Installing collected packages: sqlalchemy
@ebi
ebi / gist:4605115
Created January 23, 2013 12:41
Use different users on travis for saucelabs
if [ "$TRAVIS" = "true" ]; then
echo "Configuring saucelabs..."
case "${TRAVIS_BUILD_NUMBER:(-1):1}" in
"1")
TRAVIS_SAUCE_CREDENTIALS="travis-digicomp1,secret"
echo "Using travis-digicomp1"
;;
"2")
TRAVIS_SAUCE_CREDENTIALS="travis-digicomp2,secret"
echo "Using travis-digicomp2"
@ebi
ebi / travis.sh
Created January 15, 2013 08:53
Using multiple saucelabs accounts on travis
echo "Connecting to Saucelabs..."
case "$((${TRAVIS_BUILD_NUMBER:(-1):1}/2))" in
"1")
TRAVIS_SAUCE_CREDENTIALS="sauce-subaccount1,access-key"
echo "Using sauce-subaccount1"
;;
"2")
TRAVIS_SAUCE_CREDENTIALS="sauce-subaccount2,access-key"
echo "Using sauce-subaccount2"
;;
@ebi
ebi / gist:1985289
Created March 6, 2012 09:29
YUItest deepequal
/**
* Assert that an object has all of the same properties and property values
* as the expected one. It doesn't consider prototype properties.
* @param {Object} expected The object with all expected properties and values.
* @param {Object} actual The object to inspect.
* @param {String} message (Optional) The message to display if the assertion fails.
* @method areSame
* @static
*/
areSame: function (expected, actual, message) {
@ebi
ebi / buster.sublime-build
Created September 26, 2011 22:01
Small build system for sublime text 2 to execute Buster.JS
{
"cmd": ["buster-test", "--reporter", "xUnitConsole", "--color", "none"],
"working_dir": "${project_path}",
"selector": "source.js",
"file_regex": "@(.*?):([0-9]*)"
}
//Your example Class
function Person(name) {
this.name = name;
}
Person.prototype.greet = function () {
alert(this.name);
};
//The code using the class you want to test
diff --git a/src/fe-gtk/dccgui.c b/src/fe-gtk/dccgui.c
index 61f6d50..ccb60cf 100644
--- a/src/fe-gtk/dccgui.c
+++ b/src/fe-gtk/dccgui.c
@@ -704,7 +704,7 @@ dcc_exp_cb (GtkWidget *exp, GtkWidget *box)
#if GTK_CHECK_VERSION(2,20,0)
if (gtk_widget_get_visible (box))
#else
- if (GTK_WIDGET_VISIBLE (box))
+ if (gtk_widget_get_visible (box))
dfgsdfg
sdfgdfsg
sdfgdsfg