Skip to content

Instantly share code, notes, and snippets.

View rogerioadris's full-sized avatar
:octocat:
Github 👍

Rogério Adriano rogerioadris

:octocat:
Github 👍
View GitHub Profile
@paulofreitas
paulofreitas / bd_ibge.php
Last active December 20, 2015 04:08
Gerador de schema SQL para tabelas de estados e cidades diretamente do site do IBGE
<?php
header('Content-Type: text/plain; charset=utf-8');
$schema = <<<SQL
--
-- Tabela 'Estado'
--
CREATE TABLE Estado (
codEstado INT(1) NOT NULL AUTO_INCREMENT,
@henriquemoody
henriquemoody / br-cities.php
Last active June 1, 2020 12:50
Lista de cidades brasileiras com base nos dados o IBGE
<?php
return [
// http://www.cidades.ibge.gov.br/download/mapa_e_municipios.php?uf=ac (Thu May 14 16:30:15 BRT 2015)
'AC' => [
1200013 => 'Acrelândia',
1200054 => 'Assis Brasil',
1200104 => 'Brasiléia',
1200138 => 'Bujari',
1200179 => 'Capixaba',
@adriano
adriano / Contract Killer 3.md
Last active June 1, 2020 12:57 — forked from malarkey/Contract Killer 3.md
Portuguese translation of original text written by Andy Clarke. / Tradução para português do texto original escrito por Andy Clarke.

Contrato Arrasador 3

Atualizado em: 11/07/2012

Entre nós [nome da empresa] e você [nome do cliente]

Sumário:

Nós faremos o melhor para satisfazer suas necessidades e atender suas expectativas, mas é importante registrar tudo por escrito para que todos conheçam suas responsabilidades (quem faz o quê) e saibam o que acontece quando algo dá errado. Neste contrato você não encontrará termos jurídicos complicados ou textos longos e incompreensíveis. Nós não temos interesse em fazê-lo assinar algo que poderá se arrepender depois. O que nós queremos é o melhor para os dois lados, agora e no futuro.

@fdaciuk
fdaciuk / 01 - Sublime Configurations.md
Last active March 11, 2021 00:56
Sublime Configurations
@cagartner
cagartner / URL Amigável
Created June 28, 2013 18:44
Função para criar url amigável PHP
static function urlAmigavel($nom_tag,$slug="-") {
$string = strtolower($nom_tag);
// Código ASCII das vogais
$ascii['a'] = range(224, 230);
$ascii['e'] = range(232, 235);
$ascii['i'] = range(236, 239);
$ascii['o'] = array_merge(range(242, 246), array(240, 248));
$ascii['u'] = range(249, 252);
@yetanotherchris
yetanotherchris / .gitlab-ci.yml
Created February 1, 2017 21:52
.NET Core continous integration with Docker, Kubernetes, Gitlab and Google Cloud
# http://docs.gitlab.com/ce/ci/docker/using_docker_build.html#using-the-gitlab-container-registry
# The docker tag is the first 6 letters of the Git commit id
job_build_dotnet:
stage: build
image: microsoft/dotnet:latest
script:
- dotnet restore
- dotnet publish src/MyProject.Web -c Release
artifacts:
@marioluan
marioluan / remover-acentos.js
Created October 10, 2013 18:27
Funcao marota para remover acentos de strings. Foi utilizado expressao regular em cima de caracteres representados na base hexadecimal.
/**
* Remove acentos de caracteres
* @param {String} stringComAcento [string que contem os acentos]
* @return {String} [string sem acentos]
*/
function removerAcentos( newStringComAcento ) {
var string = newStringComAcento;
var mapaAcentosHex = {
a : /[\xE0-\xE6]/g,
e : /[\xE8-\xEB]/g,
@navix
navix / text-to-speech.ts
Created July 17, 2020 16:58
google text-to-speech
import { existsSync, mkdirSync } from 'fs';
import { resolve } from 'path';
import { config } from '../config';
export async function processTextToSpeech(ssml: string, filename: string) {
// Check media dir
const dirPath = resolve(config.main.storePath);
if (!existsSync(dirPath)) {
mkdirSync(dirPath);
}
@navix
navix / readme.md
Last active February 4, 2023 18:40
Typescript advanced built-in types
@navix
navix / readme.md
Created February 11, 2019 11:18
Docker image with Angular application

Docker image with Angular application

How to build a Docker image that serves Angular application (without Universal).

Build your application to the dist/app directory, then copy it into an image.

Dockerfile

FROM nginx:latest