Skip to content

Instantly share code, notes, and snippets.

View julianobarbosa's full-sized avatar
💭
I may be slow to respond.

Juliano Barbosa julianobarbosa

💭
I may be slow to respond.
View GitHub Profile
@julianobarbosa
julianobarbosa / import-gz.sh
Created July 7, 2019 14:38
Import sql.gz file to MySQL
zcat myfile.sql.gz | mysql -u root -ppassword mydb
@julianobarbosa
julianobarbosa / import-tar-gz.sh
Created July 7, 2019 14:35
Import a tar.gz file to MySQL
tar xzOf dump.sql.tar.gz | mysql -u $user -p $database

7zip 19.0 7zip.commandline 16.02.0.20170209 7zip.install 19.0 7zip.portable 19.0 ag 2.1.0.1 audacity 2.3.2 autohotkey 1.1.30.03 autohotkey.install 1.1.30.03 autohotkey.portable 1.1.30.03 autohotkey_l 1.1.14.20140119

@julianobarbosa
julianobarbosa / env_gen.py
Created June 26, 2019 13:46
contrib env_gen.py - Create environment variables to use with settings of Django
#!/usr/bin/env python
"""
Django SECRET_KEY generator.
"""
from django.utils.crypto import get_random_string
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
@julianobarbosa
julianobarbosa / profiles.json
Last active September 22, 2019 13:04
Microsoft Open Terminal
{
"globals" :
{
"alwaysShowTabs" : true,
"copyOnSelect" : false,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
./configure --with-features=huge \
--enable-multibyte \
--enable-python3interp=yes \
--with-python3-config-dir=/usr/bin/python3-config \
--enable-gui=gtk2 \
--enable-cscope \
--enable-fail-if-missing \
--prefix=/usr/local
@julianobarbosa
julianobarbosa / grafana-dashboard-exporter
Created January 22, 2019 18:26 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@julianobarbosa
julianobarbosa / how_to_install_tmux_on_centos
Created April 7, 2017 14:59 — forked from ekiara/how_to_install_tmux_on_centos
HOW TO: Install tmux on Centos release 6.5
# Install tmux on Centos release 6.5
# http://superuser.com/questions/738829/attempting-to-install-tmux-on-centos-6-4-or-centos-6-5-fails-with-error-evbuff
#
# READ THIS FIRST!!!
# MAKE SURE YOU HAVE BUILD TOOLS/COMPILERS TO BUILD STUFF FROM SOURCES
# yum groupinstall "Development Tools"
# CD TO TEMPORARY DIRECTORY
@julianobarbosa
julianobarbosa / update-dnsdynamic.sh
Created December 16, 2016 15:26 — forked from Mic92/update-dnsdynamic.sh
Update Public Ip on dnsdynamic.com
#!/bin/sh
# EDIT this
[email protected]
PASSWORD=yoursecret
DOMAIN=example.dnsd.me
IP=`curl --silent http://myip.dnsdynamic.com/`
curl --silent --user "$EMAIL:$PASSWORD" -k "https://www.dnsdynamic.org/api/?hostname=$DOMAIN&myip=$IP"