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 | |
evernoteDir="$HOME/Library/Application*Support/Evernote/data" | |
dataDir=$(ls -trlh $evernoteDir| tail -n 1| awk '{print $NF}') | |
contentDir="$evernoteDir/$dataDir/content" | |
file=$(ls -trlh $contentDir | tail -n 1| awk '{print $NF}') | |
vim -c '%s/<\/\([A-z]*\)>/<\/\1>\r/g' -c 'g/^$/d' $contentDir/$file/content.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
" http://j.mp/dotvimrc | |
nn gt : exec tabpagenr('$') == 1 ? 'bn' : 'tabnext'<CR> | |
nn gT : exec tabpagenr('$') == 1 ? 'bp' : 'tabprevious'<CR> |
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://j.mp/dotvimrc | |
nn <leader>e :call LastEvernote()<CR> | |
fun! LastEvernote() "{{{ | |
" a better solution is with evernote api | |
let evernoteDir=expand("$HOME")."/Library/Application*Support/Evernote/data" | |
let dataDir=system("ls -trlh ".evernoteDir."| tail -n 1| awk '{print $NF}'") | |
let contentDir=evernoteDir."/".dataDir."/content" | |
let contentDir=substitute(contentDir,"\n","",'g') | |
let note=system("ls -trlh ".contentDir." | tail -n 1| awk '{print $NF}'") | |
let note=substitute(note,"\n","",'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
#!/bin/bash | |
# | |
# This file echoes a bunch of color codes to the | |
# terminal to demonstrate what's available. Each | |
# line is the color code of one forground color, | |
# out of 17 (default + 16 escapes), followed by a | |
# test use of that color on all nine background | |
# colors (default + 8 escapes). | |
# |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<script type="text/javascript" charset="utf-8"> | |
function bloques () { | |
var canvasContext = document.getElementById("canvas").getContext("2d"); | |
canvasContext.fillStyle = "rgba(200,200,200,0.0)"; | |
var dx=2; | |
var a=new Array(); var b=new Array(); | |
for (var i = 0; i < 200; i += 1) a[i]=Math.round(Math.random()); |
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
# 256 terminal colors | |
# http://superuser.com/q/285381 | |
for i in {0..255} ; do | |
printf "\x1b[38;5;${i}mcolour${i}\n" | |
done |
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 | |
a="" | |
b="" | |
for i in $(seq 0 10) | |
do | |
b=$(git diff --shortstat "@{ $i day ago }") | |
if [[ "$b" != "$a" ]]; then | |
echo $(date --date="$i days ago" +%F) $b | |
fi | |
a=$b |
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/python | |
# -*- coding: utf-8 -*- | |
import multiprocessing | |
from datetime import datetime | |
def f(x): | |
n = int(1e2) | |
for i in range(n): | |
for i in range(n): | |
# computo | |
i |
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 | |
# http://library.linode.com/lamp-guides/debian-6-squeeze | |
# curl -sL https://raw.github.com/gist/2768883/lamp_install.sh | sh | |
apt-get -y install apache2 | |
a2enmod rewrite | |
/etc/init.d/apache2 reload | |
apt-get -y install mysql-server | |
apt-get -y install php5 php-pear php5-suhosin | |
apt-get -y install php5-mysql | |
/etc/init.d/apache2 restart |