start new:
tmux
start new with session name:
tmux new -s myname
# Jornal Mauá e Região | |
for i in $(ls *.pdf); do convert -monitor -crop 0x0+150+150 -gravity Center -density 300 -quality 90 -attenuate 40 -antialias -colorspace RGB -level 0%,100%,1.7 -crop -75-75 -bordercolor white -border 130x130 -resize 1060x1500 $i $i.jpg; done | |
# Quando o anúncio do jornal não possuir margem | |
for i in $(ls *.pdf); do convert -crop 0x0+100+100 -gravity Center -density 300 -quality 90 -attenuate 40 -antialias -colorspace RGB -level 0%,100%,1.7 -crop -0-0 -bordercolor white -border 130x130 -resize 1060x1500 $i $i.jpg; done | |
for i in $(ls *.jpg); do convert -monitor -resize 1536x2067 $i CONVERTIDO-$i.jpg; done | |
convert -monitor *.jpg documento.pdf |
var itens = [ | |
'apple', | |
'grape', | |
'orange' | |
]; | |
itens | |
.join(',') | |
.replace(/(\w+(?!=\,))/g, '<li>\$1<\li>') | |
.split(','); |
# limpar memória do R | |
rm(list=ls(all=TRUE)) | |
# indicar diretório de trabalho | |
setwd('~/Documents/R-workspace/2013 tutorial microdados') | |
# mostrar até 8 casas decimais | |
options("scipen" = 8) | |
# listar arquivos do diretório de trabalho | |
dir() | |
# ---------------------------------------------- | |
# informações a serem retiradas da PNAD 2011 |
==> Upgrading opencv | |
Unsatisfied dependency: numpy | |
Homebrew does not provide Python dependencies; install with: | |
pip install numpy | |
brew remove opencv | |
/usr/local/share/python/pip install numpy | |
brew install tbb | |
brew install qt |
/** | |
* supplant() does variable substitution on the string. It scans through the string looking for | |
* expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
* and if the key has a string value or number value, it is substituted for the bracket expression | |
* and it repeats. | |
* | |
* Written by Douglas Crockford | |
* http://www.crockford.com/ | |
*/ | |
String.prototype.supplant = function (o) { |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Javascript minification | |
min : { | |
code : { | |
'src' : [ | |
'public/js/file1.js', | |
'public/js/file2.js', | |
'public/js/file3.js' | |
], |
def is_even(num): | |
"Returns true iff num is even." | |
i = 0 | |
while i < num: | |
i += 2 | |
return i == num | |
def get_even_numbers(a, b): |