Skip to content

Instantly share code, notes, and snippets.

View DyegoAV's full-sized avatar

Dyego de Andrade Vieira DyegoAV

View GitHub Profile
CREATE FUNCTION [dbo].[NExtenso_Extenso](@Num INTEGER)
RETURNS VARCHAR(50)
AS
BEGIN
-- Por Ycaro Afonso 03/12/2011
-- V 0.1
RETURN CASE @Num
WHEN 1000 THEN 'Mil' WHEN 1000000 THEN 'Milhões' WHEN 1000000000 THEN 'Bilhões'
WHEN 100 THEN 'Cento' WHEN 200 THEN 'Duzentos' WHEN 300 THEN 'Trezentos' WHEN 400 THEN 'Quatrocentos' WHEN 500 THEN 'Quinhentos' WHEN 600 THEN 'Seiscentos' WHEN 700 THEN 'Setecentos' WHEN 800 THEN 'Oitocentos' WHEN 900 THEN 'Novecentos'
WHEN 10 THEN 'Dez' WHEN 11 THEN 'Onze' WHEN 12 THEN 'Doze' WHEN 13 THEN 'Treze' WHEN 14 THEN 'Quartorze' WHEN 15 THEN 'Quinze' WHEN 16 THEN 'Dezesseis' WHEN 17 THEN 'Dezesete' WHEN 18 THEN 'Dezoito' WHEN 19 THEN 'Dezenove'
@DyegoAV
DyegoAV / git_bible.md
Created December 17, 2017 10:56 — forked from dmglab/git_bible.md
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@DyegoAV
DyegoAV / tmux-cheatsheet.markdown
Last active May 12, 2017 18:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@DyegoAV
DyegoAV / qp_proximo.py
Last active July 17, 2016 05:22
Quadrado Perfeito Mais Próximo do Valor Informado
import math;
def qp_prox_de_(num):
raiz = math.sqrt(float(num))
anterior = int(raiz)
proximo = anterior + 1
if num-anterior*anterior < proximo*proximo-num:
mais_prox = anterior*anterior
else:
mais_prox = proximo*proximo
if mais_prox == num: