Skip to content

Instantly share code, notes, and snippets.

jondthompson

Block or report user

Report or block jondthompson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View convert "bad" array in a property of items in a list.
var ref // Firebase ref to your list that has items with bad arrays in them.
var arrayToChange // String of the name of the property that contains the bad array.
ref.once("value", function(snapshot) {
snapshot.forEach(function(listItem){
var goodArray = $firebaseArray(listItem.ref().child(arrayToChange));
listItem.child(arrayToChange).forEach(function(arrayItem){
var arrayItemVal = arrayItem.val();
arrayItem.ref().remove();
goodArray.$add(arrayItemVal);
@jondthompson
jondthompson / gist:1cdbe5304b894aa8cae2
Created Oct 24, 2015
issue in iron-chrome-storage
View gist:1cdbe5304b894aa8cae2
.controller( 'HomeCtrl', function HomeController( $scope, $firebaseArray, $firebaseObject, chromeStorage ) {
var ref;
Firebase.INTERNAL.forceWebSockets();
var storage;
chromeStorage.getOrElse('storage', function() {
var keyValue = {
path: 'demo',
key: 'unknown'
};
return keyValue;
View battery_temperature.sh
#!/bin/bash
# battery_temperature for mac osx 10.9.2
if [ `uname` == "Darwin" ]; then
if [ "$1" == "-h" ]; then
echo "Usage: $(basename $0 ".sh") [option]"
echo " -l also show Model Name and Processor Name"
echo " -h display this help message"
exit
fi
You can’t perform that action at this time.