Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
trinidadmauricio / 1_query_timestamp.js
Created Jun 16, 2017 — forked from katowulf/1_query_timestamp.js
Get only new items from Firebase
View 1_query_timestamp.js
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP)
// pros: fast and done server-side (less bandwidth, faster response), simple
// cons: a few bytes on each record for the timestamp
var ref = new Firebase(...);
ref.orderByChild('timestamp').startAt('child_added', function(snapshot) {
console.log('new record', snap.key());
trinidadmauricio /
Created Feb 20, 2017
reset intellij idea 14 evaluation
echo "removeing evaluation key"
rm ~/.IntelliJIdea15/config/eval/idea15.evaluation.key
echo "resetting evalsprt in options.xml"
sed -i '/evlsprt/d' ~/.IntelliJIdea15/config/options/options.xml
echo "resetting evalsprt in prefs.xml"
sed -i '/evlsprt/d' ~/.java/.userPrefs/prefs.xml
trinidadmauricio / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console