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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@medeirosthiago
medeirosthiago / secret_gen.py
Created February 3, 2016 10:56 — forked from henriquebastos/secret_gen.py
SECRET_KEY generator.
#!/usr/bin/env python
"""
Django SECRET_KEY generator.
"""
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
print(get_random_string(50, chars))
@medeirosthiago
medeirosthiago / pentaho-config.md
Created April 9, 2016 16:53
Some configs for Pentaho

Changing ports

tomcat/conf/server.xml

<Conncetor URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443">
@medeirosthiago
medeirosthiago / pentaho-logfiles.md
Last active April 9, 2016 17:45
Config for enable log files for Mondrian and Reporting Log

Allowing reporting log

tomcat/webapps/pentaho/WEB-INF/classes/log4.xml -> add to the end

<!-- ========================================================= -->
<!-- Special Log File specifically for Reporting log           -->
<!-- ========================================================= -->
@medeirosthiago
medeirosthiago / colors-matplotlib.py
Created April 20, 2016 17:57
Colors for matplotlib
import matplotlib
for name, hex in matplotlib.colors.cnames.iteritems():
print(name, hex)

Canivete! 🔩

Remove linhas em brancos:

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


Adiciona vírgula no fim de cada linha:

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

@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

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 / 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
@medeirosthiago
medeirosthiago / force-gitignore.md
Last active July 26, 2024 22:58
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: