Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj
juanpabloaj / neovim-centos-6.sh
Last active January 2, 2022 14:18
Install Neovim on Centos 6 from source
# 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
app.filter('capitalize', function() {
return function(input, scope){
if ( input ) {
input = input.toLowerCase();
return input.substring(0,1).toUpperCase() + input.substring(1);
}
};
});
app.filter('capitalize', function() {
return function(input, scope) {
if (input!=null)
input = input.toLowerCase();
return input.substring(0,1).toUpperCase()+input.substring(1);
}
});
@juanpabloaj
juanpabloaj / DriveUpload.js
Last active May 13, 2020 22:17 — forked from rcknr/DriveUpload.gs
xls attached to google spreadsheet
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()
@juanpabloaj
juanpabloaj / itunes
Created October 7, 2012 19:17 — forked from rkumar/itunes.sh
control iTunes from command line
#!/bin/bash
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# TODO add -v for echo message
####################################
showHelp () {
" 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
" & -> &amp; should be the first substitution
let entities = [
# 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
#
# 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"