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
# install gcc 6.x | |
# Install CentOS SCLo RH repository: | |
yum install centos-release-scl-rh | |
# Install devtoolset-6-gcc rpm package: | |
yum install devtoolset-6-gcc | |
# activate scl | |
scl enable devtoolset-6 bash | |
# Prerequisites | |
sudo yum -y install libtool autoconf automake cmake gcc gcc-c++ make pkgconfig unzip patch gettext |
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
app.filter('capitalize', function() { | |
return function(input, scope){ | |
if ( input ) { | |
input = input.toLowerCase(); | |
return input.substring(0,1).toUpperCase() + input.substring(1); | |
} | |
}; | |
}); |
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
app.filter('capitalize', function() { | |
return function(input, scope) { | |
if (input!=null) | |
input = input.toLowerCase(); | |
return input.substring(0,1).toUpperCase()+input.substring(1); | |
} | |
}); |
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
function uploadXls(file) { | |
authorize(); | |
var key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // <-- developer key | |
var metadata = { title: file.getName() } | |
var params = {method:"post", | |
oAuthServiceName: "drive", | |
oAuthUseToken: "always", | |
contentType: "application/vnd.ms-excel", | |
contentLength: file.getBytes().length, | |
payload: file.getBytes() |
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 | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# TODO add -v for echo message | |
#################################### | |
showHelp () { |
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
" http://vim.wikia.com/wiki/HTML_entities | |
" http://www.bigbaer.com/sidebars/entities/ | |
" FIXME: you don't know how to use the -range argument! (doesn't work) | |
command! -range HtmlEncode <line1>,<line2>call HtmlEntities('encode') | |
command! -range HtmlDecode <line1>,<line2>call HtmlEntities('decode') | |
" TODO: only accept full lines as a range; would be nice for arbitrary selection | |
function! HtmlEntities(action) range | |
" & -> & should be the first substitution | |
let entities = [ |
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
# mongo_template.rb | |
# | |
# mongo_template | |
# | |
# Usage: | |
# rails new appname -m /path/to/mongo_template.rb | |
# | |
# Also see http://textmate.rubyforge.org/thor/Thor/Actions.html | |
# |
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
# mongo_template.rb | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" |