Skip to content

Instantly share code, notes, and snippets.

View medeirosthiago's full-sized avatar
🍫
Só quero chocolate

Thiago Medeiros medeirosthiago

🍫
Só quero chocolate
View GitHub Profile

Keybase proof

I hereby claim:

  • I am medeirosthiago on github.
  • I am medeirosthiago (https://keybase.io/medeirosthiago) on keybase.
  • I have a public key ASB7neHklGOZekqLpZJpl7he7SkqMlGLP4PUX_ahE3WqYAo

To claim this, I am signing this object:

@medeirosthiago
medeirosthiago / pyenv-conflict.sh
Created December 30, 2018 13:59
Solve pyenv conflict problem
if [ -n "$PYENV_COMMAND" ] && [ ! -x "$PYENV_COMMAND_PATH" ]; then
versions=($(pyenv-whence "${PYENV_COMMAND}" 2>/dev/null || true))
if [ -n "${versions}" ]; then
if [ "${#versions[@]}" -gt 1 ]; then
echo "pyenv-implicit: found multiple ${PYENV_COMMAND} in pyenv. Use version ${versions[0]}." 1>&2
fi
PYENV_COMMAND_PATH="${PYENV_ROOT}/versions/${versions[0]}/bin/${PYENV_COMMAND}"
fi
fi
@medeirosthiago
medeirosthiago / cedilla.md
Last active March 13, 2017 12:15
Cedilla on Debian

http://luizschmitt.blogspot.com.br/2014/10/cedilha-no-debian-wheezy.html

Primeiro Passo - Configurar teclado

Antes de tudo é necessário que você configure seu teclado para o layout "US international with dead keys". Você pode configurar pelo seu gerenciador de teclado do próprio gnome ou pelo console:

$ sudo dpkg-reconfigure keyboard-configuration

Segundo Passo - Editando arquivos

@medeirosthiago
medeirosthiago / remap_caps.md
Last active March 13, 2017 12:15
Remapping Caps Lock (Ctrl and Escape)

First we map the caps lock as additional Ctrl. Can be with gnome-tweak-tools or on keyboard configurations (cinnamon).

And then... To find out the number (id) of Caps Lock

xcape -d

To set as Escap to!

@medeirosthiago
medeirosthiago / maven3rdJar.md
Created November 1, 2016 19:50
Installing 3rd part jars trough Maven Dependecies

Following (Maven Guide)[https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html] it is possible to add the an external JAR as a depencie.

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

Example:

mvn install:install-file -Dfile=polymer-components-0.5.2-RELEASE.jar -DgroupId=org.webjars -DartifactId=polymer-components -Dversion=0.5.2-RELEASE -Dpackaging=jar
@medeirosthiago
medeirosthiago / force-gitignore.md
Last active April 24, 2022 17:19
Forcing .gitignore

Based on this stackoverflow's answer.

To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use:

git rm --cached filename

To untrack every file that is now in your .gitignore:

First commit any outstanding code changes, and then, run this command:

@medeirosthiago
medeirosthiago / javalinux.md
Last active September 8, 2016 17:08
setting up java on linux (debian/ubuntu)

Manual install

The tar.gz provided by Oracle don't have an actual installation process. You just extract those files to a location you want and add them to your path. So the process is the following:

  • Download a .tar.gz from Oracle (here I will be using jdk-8u20-linux-x64.tar.gz);
  • Extract it to somewhere;
  • Move the extracted folder to /usr/lib/jvm. This is not required but it is the place where Java runtime software is installed, and where tools like IDE's may search for it:
sudo mv /path/to/jdk1.8.0_20 /usr/lib/jvm/oracle_jdk8

Instalar texlive Linux:

sudo apt-get install texlive texlive-latex-extra texlive-lang-portuguese

Só se quiser:

sudo apt-get install texlive-math-extra
@medeirosthiago
medeirosthiago / UCP.md
Last active June 3, 2016 13:05
Use Case Points

UCP - Use Case Points

  • Medir um sw, quantificar um sw

    • Definir equipe / prazo / custo
    • esforço homem-hora
  • Substituir o FPA (ponto de função)

  • Criado por Gustav Kerner (1993)

    • Pouco depois do início do uso de OO

Canivete! 🔩

Remove linhas em brancos:

sed '/^$/d' <in> > <out>


Adiciona vírgula no fim de cada linha:

sed 's/$/,/' <in> > <out>