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
ABApp.FileField = Ember.View.extend({ | |
classNames: ['ember-file-field'], | |
tagName: "input", | |
attributeBindings: ['type', 'value'], | |
value: "", | |
file: null, | |
type: "file", | |
fileSize: 1024000, | |
fileTypes: ["image/png", "image/gif", "image/jpg", "image/tif", "image/gif"], | |
init: function(){ |
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
make a env variable called prompt and enter this | |
tim@$T$S$P$_$$$S |
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
set nocompatible " use vim defaults | |
set mouse=a " use mouse because I am a noob | |
set ls=2 " allways show status line | |
set tabstop=2 " numbers of spaces of tab character | |
set shiftwidth=2 " numbers of spaces to (auto)indent | |
set scrolloff=3 " keep 3 lines when scrolling | |
set showcmd " display incomplete commands | |
set hlsearch " highlight searches | |
set incsearch " do incremental searching | |
set ruler " show the cursor position all the time |
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
ABApp.TriggerableTextField = Ember.TextField.extend(Ember.TargetActionSupport, { | |
insertNewline: function() { | |
this.triggerAction(); | |
} | |
}); |
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
git ls-files | perl -pe "s/.*\.(.*?)\n/\.\1\n/" | awk '/\..*/' | sort | uniq | xargs -n1 -E '\n' -I % sh -c 'git ls-files "*%" | xargs cat | echo "$(wc -l) %"' | sort -rn |
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
package main | |
import ( | |
"fmt" | |
"flag" | |
"net" | |
"bufio" | |
"os" | |
"time" | |
"strconv" |
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 | |
###################### USAGE ###################################### | |
usage() { | |
echo " | |
Usage: mongotos3 [-t n] mongo_host mongo_collection s3_bucket | |
-t : number of parallel processes to use | |
mongo_host : the host of the mongodb server | |
mongo_collection : the collection to collecthe gridfs data from | |
s3_bucket : the name of the bucket you want to cp the files to | |
" |
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 | |
# used for kill signals | |
kill_rails () { | |
kill -6 ${rails_pid} > /dev/null 2>&1 | |
} | |
#get password for haproxy | |
read -s -p "Enter Password: " proxy_pass | |
echo "" |
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
require 'csv' | |
puts "[unifi.rb] Grabbing data from UniFi Controller" | |
result = <<-eos | |
NAME MAC AP CHAN RSSI RX TX | |
GARETH-LAPTOP 9c:2a:70:c9:c3:37 SR_Wifi 1 44 72 72 | |
android-ac059065c685d5be 90:18:7c:2f:bd:40 SR_Wifi 1 33 1 72 | |
Joes-iPhone a8:88:08:66:7e:ed SR_Wifi 1 32 24 72 | |
sr-dash-01 90:4c:e5:b3:3a:69 SR_Wifi 1 28 52 58 | |
android-1be24885e86c9fb1 80:57:19:03:08:5f SR_Wifi 1 21 6 52 |
OlderNewer