Skip to content

Instantly share code, notes, and snippets.

View odigity's full-sized avatar

Ofer Nave odigity

View GitHub Profile
@odigity
odigity / jsfiddle-problem.html
Created October 5, 2012 23:27
A bare-bones Ember.js app that works locally, but not on jsFiddle.net.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="//cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js" type="text/javascript"></script>
<script src="//cloud.github.com/downloads/emberjs/ember.js/ember-latest.js" type="text/javascript"></script>
</head>
<body>
<!doctype html>
<html lang="en"><head>
<meta charset="UTF-8" />
<title>Test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="//cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js" type="text/javascript"></script>
<script src="//cloud.github.com/downloads/emberjs/ember.js/ember-latest.js" type="text/javascript"></script>
<script type="text/javascript">
var App = Ember.Application.create();
</script>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Test</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src='https://github.com/JoePettersson/pretty-gist/raw/master/dist/jquery.prettygist.min.js' type='text/javascript' />
<script type='text/javascript'>
alert('hey');
</script>
@odigity
odigity / this.js
Created October 10, 2012 00:20
JavaScript Exploration -- this
console.log('01', this);
console.log('02', Object.keys(this));
// Browser:
// [object XrayWrapper [object Window]]
// ["window", "document", "InstallTrigger", "console", "getInterface"]
// Console:
// [object Window]
// ["console", "$", "$$", "$x", "$0", "clear", "keys", "values", "help", "inspect", "pprint", "print"]
@odigity
odigity / undefined.js
Created October 10, 2012 00:21
JavaScript Exploration -- undefined
console.log('01', undefined); // undefined
console.log('02', typeof undefined); // undefined
console.log('03', this.undefined); // undefined
console.log('04', this.unknownProperty); // undefined
console.log('05', 'undefined' in this); // true in browser, false in Node
console.log('06', 'unknownProperty' in this); // false
o = {
foo: function () { console.log('07', 'undefined' in this); }, // false
bar: function () { console.log('08', this.unknownProperty === undefined ); } // true
};
@odigity
odigity / var.js
Created October 10, 2012 00:40
JavaScript Exploration -- var
//console.log('01', v1); // generates ReferenceError and halts execution
//console.log('02', v2); // same
v2 = 23;
console.log('03', v2); // 23
console.log('04', v3); // undefined
var v3;
console.log('05', v3); // undefined
v3 = 42;
@odigity
odigity / existence.js
Created October 10, 2012 02:11
JavaScript Exploration -- existence
//console.log('01', v1); // generates ReferenceError and halts execution
var v2;
console.log('02', v2); // undefined
v2 = undefined;
console.log('03', v2); // undefined
v2 = null;
console.log('04', v2); // null
v2 = 42;
console.log('05', v2); // 42
acroread adobe-flashplugin apache2 autoconf automake bison build-essential bum curl gimp git-core gnucash imagemagick libc6-dev libncurses5 libreadline6 libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev libtool libxml2-dev libxslt1-dev libyaml-dev make mysql-client mysql-common mysql-server openjdk-7-jre openshot openssl pidgin postgresql postgresql-client rcconf ruby-rvm rubygems skype sqlite3 subversion ubuntu-restricted-extras vlc xchat zlib1g zlib1g-dev
PPAs
add-apt-repository
apt-get update
bitcoin-qt -> ppa:bitcoin/bitcoin
google-chrome-stable -> "deb http://dl.google.com/linux/chrome/deb/ stable main"
ALT: > echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
mongodb-10gen -> "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
File "./import.py", line 92, in load_batch
nodes = batch.submit()
File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line 154, in submit
for response in self._submit()
File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line 123, in _submit
for id_, request in enumerate(self.requests)
File "/usr/local/lib/python2.7/dist-packages/py2neo/rest.py", line 372, in _send
raise SocketError(err)
py2neo.rest.SocketError: error(104, 'Connection reset by peer')