Skip to content

Instantly share code, notes, and snippets.

View nosilex's full-sized avatar

Éℓisøn Gømes nosilex

View GitHub Profile
@nosilex
nosilex / bitmask.go
Created May 10, 2023 13:10
Bits operations with GO
package main
import (
"fmt"
)
type Bits uint8
const (
F0 Bits = 1 << iota
@nosilex
nosilex / capitalize.php
Created June 30, 2018 15:02
Capitalize an string to correct format
<?php
/**
* Capitalize an string|array
* Ex: Fred El BRAVO => Fred el Bravo
* Empresa Xpto s/a => Empresa Xpto S/A
*
* @param string|array $input
* @param array $exclude {If passed an array, exclude any element}
*
@nosilex
nosilex / mysqlLimit2SqlServer.php
Last active August 29, 2015 14:09
Convert MySQL query with LIMIT to work in MS SQL Server
/**
* Convert MySQL query with LIMIT to work in MS SQL Server
* Author: Elison Gomes
*
* @param string $query
* @return string
*
* Ex: convertLimit("select id, name from person limit 0, 10");
*/