Skip to content

Instantly share code, notes, and snippets.

View ilosamart's full-sized avatar

Fábio Tramasoli ilosamart

View GitHub Profile

Quem me conhece um pouco melhor sabe o quanto gosto de recomendar a leitura de livros.

Após ler um livro muito bom que me faz repensar o que sei ou apresentar algo completamente novo irei chatear as pessoas mais próximas até que elas o comprem e possam entender melhor aquela linha de pensamento ou mesmo ajudar a ajustar/melhorar algo que interpretei de uma forma diferente - basicamente forço a pessoa a entrar em um "Clube do Livro" comigo (:

Há também o caso de livros que compilam boa parte do que estudei no passado recente e me dão um feedback que estou no caminho certo - ou próximo dele.

Costumo dizer que se você está fazendo algo inédito em computação é um forte candidato ao próximo Turing Award ou idiota do ano. Minha auto-crítica sempre leva a crer na segunda opção e me obriga a constantemente a encontrar referências ou construí-las a partir de connhecimento existinte, afinal, pouquíssimas vezes na vida fui realmente pioneiro.

Livros?

@slowkow
slowkow / pdfoptim.sh
Last active August 18, 2023 22:13
Optimize PDF files with Ghostscript.
#!/usr/bin/env bash
# pdfoptim.sh
#
# Optimize a PDF with Ghostscript
#
# Usage: bash pdfoptim.sh FILE.pdf
#
# This will copy the input file to FILE-original.pdf
# And write an optimized file to FILE.pdf
#
@gotofritz
gotofritz / gitlab-markdown-toc.js
Last active May 7, 2019 12:50
creates a gitlab markdown table of contents for a README.md page
// quick and dirty snippet to creates a gitlab markdown table of contents for a README.md page
// preview gitlab page and paste in browser console
var str = "";
$('.file-content')
.find('h1, h2, h3, h4, h5, h6, h7')
.each((i, node) => {
// node.tagName is H1 H2...
let indent = Number(node.tagName[1]) - 1;
// markdown mested lists are
// - xxx
@raprasad
raprasad / test_unmanaged_models.md
Last active November 1, 2023 00:04
Ignoring migrations during Django testing (unmanaged databases, legacy databases, etc)

Scenario

  • Django 1.9 application with two databases:
    • Legacy database with readonly access via unmanaged models. Both Django models (models.py) and related migrations have "managed" set to False
      • 'managed': False
    • Default database holding django specific tables (e.g. auth_user, django_content_type, etc)

Testing Woes

@dgmorales
dgmorales / Makefile
Last active February 14, 2023 06:18
Example Makefile for creating deb/rpm packages with jordansissel/fpm
# This is an example Makefile for quick package creation
#
# It uses FPM [1] to generate simple packages.
# - If you need more features or a greater quality package, use debian
# standard tools for packaging.
# - Do not use checkinstall. Use FPM instead.
#
# [1] (https://github.com/jordansissel/fpm/wiki)
# IMPORTANT:
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@ftao
ftao / install_pytho27.sh
Created July 7, 2011 10:00
install python 2.7 on debian 6
#!/bin/sh
mkdir ~/down/
cd ~/down/
sudo apt-get install build-essential
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar -xzf Python-2.7.2.tgz
cd Python-2.7.2
sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev
sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev
sudo apt-get install libssl-dev libdb-dev