Skip to content

Instantly share code, notes, and snippets.

@jadsonbr
jadsonbr / README.md
Created August 13, 2019 20:34 — forked from guillaumevincent/README.md
Windows Service with Python 3.5 and pyinstaller
@jadsonbr
jadsonbr / env.py
Created August 2, 2018 16:42 — forked from nickretallack/env.py
How to run multi-tenant migrations in alembic.
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool, MetaData, Table, ForeignKeyConstraint
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python logging.
@jadsonbr
jadsonbr / comoNaoDeixarNoVaucoNoWhatsapp.js
Created January 3, 2018 16:41 — forked from callmeloureiro/comoNaoDeixarNoVaucoNoWhatsapp.js
Como não deixar no vácuo no whatsapp
/*
Hoje não deixaremos mais ninguém no vácuo no whatsapp
Para utilizar:
- Abra o web.whatsapp.com;
- Abra o console e cole o código que está no gist;
- Aguarde e verá uma mensagem sendo enviada a cada momento que alguém te enviar alguma mensagem.
Confira também como ser chato no whatsapp: https://gist.github.com/mathloureiro/4c74d60f051ed59650cc76d1da0d32da
e como ser chato no mensseger: https://gist.github.com/mathloureiro/d3f91d19cf148838217e42a0c6df5ed8
*/
@jadsonbr
jadsonbr / angular-nativescript-course-setup.sh
Created November 20, 2017 13:15 — forked from berardo/angular-nativescript-course-setup.sh
Script to install all good tools on a fresh new macOS machine. Some command are commented out because the main reason for this file is to be used on my online course: https://udemy.com/angular-native
#!/bin/sh
# Allow locate commands
# sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
# xcode command line - Select: "Get xcode" and go get a coffee (preferably far from your desk :)
xcode-select --install
# home-brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@jadsonbr
jadsonbr / ath10k
Created June 21, 2017 17:47 — forked from MichelLacerda/ath10k
ath10k debian
http://askubuntu.com/questions/708061/qualcomm-atheros-device-168c0042-rev-30-wi-fi-driver-installation
Ubuntu 16.04 users should just need to
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.157.5_all.deb
sudo dpkg -i linux-firmware_1.157.5_all.deb
Reboot
@jadsonbr
jadsonbr / sqlserver-linux-backup.py
Created March 1, 2017 23:39 — forked from jniltinho/sqlserver-linux-backup.py
SQL Server command line Backup Linux
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## SQL Server command line backup Linux
## On OpenSUSE 42.2 64Bits
## Author: Nilton OS -- www.linuxpro.com.br
## http://stackoverflow.com/questions/880487/sql-server-command-line-backup-statement
## https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-sqlpackage
## Version: 0.2
### BACKUP SCRIPT SQLSERVER CLI
@jadsonbr
jadsonbr / docker-composer-install.sh
Last active January 27, 2017 18:00 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi