This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Reset routing table on OSX | |
# display current routing table | |
echo "********** BEFORE ****************************************" | |
netstat -r | |
echo "**********************************************************" | |
for i in {0..4}; do | |
sudo route -n flush # several times |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |