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 homeModule = angular.module('HomeModule', []); | |
homeModule.filter('titleCase', function () { | |
return function (input) { | |
var words = input.split(' '); | |
for (var i = 0; i < words.length; i++) { | |
words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1); | |
} | |
return words.join(' '); | |
} |
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
/*jslint devel: true, node: true, passfail: true, vars: true */ | |
// TODO: check out http://www.jslint.com for more jslint options | |
function itzStrict() { | |
"use strict"; | |
// TODO: write you js code here... |
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
exec: { | |
//get IP & Set a local variable | |
get_ip: { | |
command: 'ifconfig | grep -m 1 "inet addr:192.168.1" | cut -c21-31', | |
callback: function (error, stdout, stderr) { | |
if (error !== null) { | |
grunt.log.error('exec error: ' + error); | |
}; | |
globalConfig.myIP = stdout; |
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-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
set-option -g renumber-windows on | |
# vi is good | |
setw -g mode-keys vi | |
bind-key -t vi-copy v begin-selection |
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
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/) | |
// Then, use underscore's mixin method to extend it with all your other utility methods | |
// like so: | |
_.mixin({ | |
escapeHtml: function () { | |
return this.replace(/&/g,'&') | |
.replace(/>/g,'>') | |
.replace(/</g,'<') | |
.replace(/"/g,'"') | |
.replace(/'/g,'''); |
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
wget http://www.mdcharm.com/release/1.1.6/mdcharm_1.1.6_i386.deb | |
sudo dpkg -i mdcharm_1.1.6_i386.deb; | |
sudo apt-get -f install |
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
apt-get remove -y --purge x11-common | |
apt-get autoremove -y --purge | |
apt-get install -y deborphan | |
deborphan | xargs dpkg -P # do this a bunch of 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
from osgeo import gdal | |
import numpy | |
g = gdal.Open ("baikal_subset.tif") | |
if g is None: | |
raise IOError, "Couldn't open baikal_subset.tif" | |
b3 = g.GetRasterBand(3).ReadAsArray().astype(np.float32) | |
b4 = g.GetRasterBand(4).ReadAsArray().astype(np.float32) |
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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
package_reboot_if_required: true | |
manage-resolv-conf: true | |
resolv_conf: | |
nameservers: | |
- '8.8.8.8' |
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
#cloud-config | |
package_upgrade: true | |
packages: | |
- zsh | |
- tmux | |
- nmap | |
- curl | |
- wget | |
- git | |
- htop |
OlderNewer