Skip to content

Instantly share code, notes, and snippets.

View armoucar's full-sized avatar

Arthur Moura Carvalho armoucar

  • Brasília, DF - Brasil
View GitHub Profile
#shortcut
alias ..="cd .."
alias ...="cd ../.."
alias cd..="cd .."
alias l="ls -lhG"
alias ll="ls -lahG"
alias eb="vim ~/.bashrc"
alias sb="source ~/.bashrc"
alias cb="cat ~/.bashrc | grep \"alias \""
alias eg="vim ~/.gitconfig"
@armoucar
armoucar / index.html
Created June 5, 2012 13:15
html init file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8"/>
<title>js test</title>
</head>
<body>
<script type="text/javascript" src="jquery.min.js"></script>
@armoucar
armoucar / .bash_profile
Created May 31, 2012 22:49
.bash_profile aliases
alias eg="vim ~/.gitconfig"
alias em="vim ~/.m2/settings.xml"
alias eb="vim ~/.bash_profile"
alias sb="source ~/.bash_profile"
@armoucar
armoucar / gist:1876768
Created February 21, 2012 14:22
js currying
/***
currying
***/
function add(x, y) {
var oldx = x, oldy = y;
if (typeof oldy === "undefined") { // partial
return function (newy) {
return oldx + newy;
}
}
@armoucar
armoucar / gist:1476808
Created December 14, 2011 14:34 — forked from viniciusteles/gist:556029
Sete Atitudes para Hackear a Indústria de Software
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@armoucar
armoucar / .project
Created November 24, 2011 13:23
Maven archetypes
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Gists</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
@armoucar
armoucar / remove_gems
Created November 5, 2011 14:32
great commands
great commands.
remove all gems from a gemset:
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
find a pattern inner files:
find / -type f -print0 | xargs -0 grep -i pattern
change encoding of files:
iconv -f ISO-8859-1 -t UTF-8 EncodeFrom.java > EncodeTo.java
@armoucar
armoucar / build.xml
Created October 24, 2011 15:07
proxy configuration snippet for ant
<target name="proxy">
<property name="proxy.host" value="proxy.server"/>
<property name="proxy.port" value="80"/>
<input message="Please enter proxy username" addproperty="proxy.user" />
<input message="Please enter proxy password - NOTE: CLEAR TEXT" addproperty="proxy.pass"/>
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}"/>
</target>
<target name="proxy">
<property name="proxy.host" value="proxy.server"/>