Skip to content

Instantly share code, notes, and snippets.

View matheussilvasantos's full-sized avatar
🐧

MΛTHЄUS SILVΛ matheussilvasantos

🐧
View GitHub Profile
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active April 16, 2024 14:18
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@HelioCampos
HelioCampos / database_migration_best_practices.md
Created September 28, 2017 14:00
Database migration best practices for Rails

Database migration best practices for Rails

Never ever change data on schema changes! [1]

Use rake tasks to change the data! [1]

This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:

  1. Run it in one of the ways bellow: a. Add this rake task the deployment script or;
@smithclay
smithclay / weird-lambda-binaries-recipe.md
Created July 28, 2017 02:59
Recipe for Getting Strange Binaries Running in AWS Lambda

Recipe for running strange binaries in AWS Lambda

In general, the command ldd and the environment variable LD_LINKER_PATH is your best friend when running new, untested binaries in Lambda. My process (which I want to get around to automating one day, maybe using Packer), goes like this:

  1. Run an EC2 instance with the official AWS Lambda AMI.
  2. Get binary you want to run in AWS Lambda running on the instance (either by installing from a package manager or compiling). 
  3. Run ldd -v ./the-binary. Note all of the shared libraries it requires. You’ll need to remember these.
  4. Copy the binary to your local machine. Upload the binary with your AWS Lambda function code that runs the ldd command inside the handler function using the process execution library from your language of choice. In node, this works just fine: console.log(require('child_process').execSync('ldd -v ./the-binary'))
  5. Note any shared libraries that are missing in the function output. Copy those over from the EC2 instance to a direct
@EthraZa
EthraZa / cfop.sql
Created February 29, 2016 15:55
Tabela (MySQL) de Código Fiscal de Operações e Prestações - CFOP
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
CREATE TABLE `cfop` (
`id` char(4) COLLATE utf8_unicode_ci NOT NULL,
`descricao` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
`aplicacao` varchar(530) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
@brianburridge
brianburridge / gist:8d2755a73dd5b4f0332b
Created December 10, 2014 19:47
Export local db to JSON
namespace :json do
desc "Export all data to JSON files"
task :export => :environment do
Rails.application.eager_load!
ActiveRecord::Base.descendants.each do |model|
file = File.open(File.join(Rails.root, "db", "export", "#{model.table_name}.json"), 'w')
file.write model.all.to_json
file.close
end
@tinogomes
tinogomes / gist:7ca162a0110be69a4a64
Last active July 14, 2023 22:12
Frases - Porta dos Fundos - Mundo dos Negócios

https://www.youtube.com/watch?v=cPbl26Fw-dk

  • Quer brincar de Eike Bastista nessa porra!
  • Matar um leão por dia.
  • Faca nos dentes
  • Sangue no olho
  • É matar ou morrer
  • Dando muque em macaco de gaveta
  • É largar mato na caçamba
  • Jogar terra na boca de carrapato
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 06:50
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@digitaljhelms
digitaljhelms / gist:4287848
Last active April 23, 2024 21:43
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a