Skip to content

Instantly share code, notes, and snippets.

View rodrigocorreaecastro's full-sized avatar
💻
Working from home

Rodrigo Correa e Castro rodrigocorreaecastro

💻
Working from home
View GitHub Profile
@rodrigocorreaecastro
rodrigocorreaecastro / como-fazer-os-commits-da-forma-correta.md
Last active November 6, 2025 20:59
Como fazer os commits da forma correta

Conventional Commits

O que é?

O Conventional Commits é uma convenção simples de mensagens de commit, que segue um conjunto de regras e que ajuda os projetos a terem um histórico de commit explícito e bem estruturado.

Como utilizar

As regras são muito simples, como demonstrado abaixo temos um tipo de commit (type), o escopo/contexto do commit (scope) e o assunto/mensagem do commit (subject).

@gaearon
gaearon / minification.md
Last active January 28, 2025 19:19
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

@klodshanz
klodshanz / multi-git.md
Created January 19, 2018 07:35 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@ozzpy
ozzpy / Invizzo_Bematech.php
Created January 18, 2018 15:05
EXEMPLO PHP - Bematech 4200 TH - NAO FISCAL - USB - octoBema - MP2032.DLL - WINDOWS - pt_BR
<?php
class Invizzo_Bematech
{
private $_registro = "310DBDAC-85FF-4008-82A8-E22A09F9460B";
private $_impressora = 7;
private $_porta = "USB";
private $_texto;
private $_texto_barcode;
@md5
md5 / Dockerfile
Last active August 1, 2023 14:41
Testing docker-php-ext-install sockets
FROM php
RUN docker-php-ext-install sockets
COPY test.php /
CMD ["php", "/test.php"]
@wwwbruno
wwwbruno / site_helper.php
Last active June 18, 2023 19:26
Helper com funções úteis para o Codeigniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Site Helper
| -------------------------------------------------------------------------
| Desenvolvido por Bruno Almeida
|
*/
@jbonney
jbonney / rotated-header.css
Created July 18, 2013 20:29
Rotate HTML header in table
.table-header-rotated th.row-header{
width: auto;
}
.table-header-rotated td{
width: 40px;
border-top: 1px solid #dddddd;
border-left: 1px solid #dddddd;
border-right: 1px solid #dddddd;
vertical-align: middle;
@audente
audente / GMail.py
Created April 18, 2013 16:17
Python functions to send mail using GMail. Usage: from GMail import GMailServer, SendMail with GMailServer('username', 'password') as server: SendMail(server, 'fromaddr', 'toaddrs', 'subject', 'body')
# --------------------------------------------------
import smtplib
class GMailServer:
def __init__(self, username, password):
self.server = smtplib.SMTP('smtp.gmail.com:587')
self.server.starttls()
self.server.login(username,password)
def __enter__(self):
@grisha87
grisha87 / purge.php
Last active July 27, 2022 12:16
PHP.Kryptik.AB removal script
<?php
/**
* PHP.Kryptik.AB Cleanup script
*
* Usage: place the script in same directory that contains files / directories
* to be scanned. Then run `php [script_name].php` and wait a bit
*
* @link http://blog.twelvecode.com
* @author Grzegorz Godlewski <grisha87@gmail.com>