Skip to content

Instantly share code, notes, and snippets.

View thiagosf's full-sized avatar
🏠
Always working at home

Thiago Silva Ferreira thiagosf

🏠
Always working at home
View GitHub Profile
@thiagosf
thiagosf / gist:eb2ba7d24968873e745c61d2ee72c0d8
Last active September 4, 2024 13:00
Export ERD (diagrams) from SequelPro

Export ERD (diagrams) from SequelPro

Install graphviz

sudo brew install graphviz

Open SequelPro, choose database and export dot file. Now, run the command:

@thiagosf
thiagosf / clean-azk.sh
Last active May 20, 2018 01:12
Remove disco VM do azk
rm -rf ~/.azk/data
rm -rf ~/VirtualBox VMs/azk-vm-dev.azk.io
@thiagosf
thiagosf / png-to-jpg.md
Last active May 19, 2018 22:36
Converte png para jpg com linha de comando no mac os

Convertendo com linha de comando

sips -s format jpeg -s formatOptions 80 image.png --out image.jpg

Criando service com automator

  1. Crie um novo arquivo no Automator do tipo Service
  2. Selecione em Library o tipo Run Shell Script
@thiagosf
thiagosf / vue-build-performance.md
Last active May 11, 2018 15:04
Melhorando performance para compilar vue.js

Melhorando performance para compilar vue.js

build/webpack.prod.conf.js

Desativar sourceMap:

new webpack.optimize.UglifyJsPlugin({
  compress: {
 warnings: false
@thiagosf
thiagosf / gist:f4e64d1c90dfdce9aee18b90d30dd1b2
Created April 24, 2018 17:13
Trace process log, change <PID> by pid number
sudo strace -p<PID> -s9999 -e write
@thiagosf
thiagosf / start.sql
Last active August 18, 2021 20:04
Criando database e usuário no MySQL
create database dbname character set utf8mb4 collate utf8mb4_general_ci;
create user 'username'@'localhost' identified by 'pass';
grant all privileges on dbname.* to 'username'@'localhost';
flush privileges;
@thiagosf
thiagosf / home-end-fix.md
Created January 28, 2018 18:21
How to fix home and end keys on Mac OS X

How to fix home and end keys on Mac OS X

Open a terminal:

$ cd ~/Library
$ mkdir KeyBindings
$ cd KeyBindings
$ vi DefaultKeyBinding.dict
@thiagosf
thiagosf / gist:f589cf8a6e7f7bfe244d7e5715ebd6a0
Created January 18, 2018 12:17
Finaliza múltiplos processos
kill -9 `ps -ef | grep search | grep -v grep | awk '{print $2}'`
@thiagosf
thiagosf / nginx.conf
Created December 9, 2017 20:13
Correção do problema com X-Frame-Options no NGINX
# Load denied by X-Frame-Options does not permit framing.
location ~ \.php$ {
add_header X-Frame-Options SAMEORIGIN;
# ...
}
@thiagosf
thiagosf / magento.conf
Last active November 18, 2017 22:53 — forked from jonathonbyrdziak/magento.conf
A configuration file for magento under nginx.
#####################################################
#
# Provided by the Magento Support Center
# http://magentosupport.help/knowledgebase/configuring-nginx-to-work-with-magento-advanced/
#
# Your Magento Tutorial specialists
#
server {
listen *:8080;
server_name fanatik.redrokk.com www.fanatikbike.com fanatikbike.com;