Skip to content

Instantly share code, notes, and snippets.

View josenicomaia's full-sized avatar

José Nicodemos Maia Neto josenicomaia

  • NicoMaia
  • São José dos Campos
View GitHub Profile
@rponte
rponte / using-uuid-as-pk.md
Last active January 19, 2026 17:56
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
@bermanboris
bermanboris / phantomjs-example.ts
Last active July 2, 2020 03:50
PhantomJS usage in TypeScript ( Node.js )
// Usage:
//
// npm install phantom @types/phantom --save
// tsc --target "es6" ./phantomjs-example.ts
// node phantomjs-example.js
//
import * as phantom from "phantom";
async function getPageContent(url: string) {
@dunossauro
dunossauro / get_data.py
Created December 5, 2016 01:35
Script que gera cpfs aleatórios e traz dados do SUS
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from random import randint
from requests import get
from json import loads
url = 'http://dabsistemas.saude.gov.br/sistemas/sadab/js/buscar_cpf_dbpessoa.json.php?cpf='
saida = 'N: {5}\nNome: {0}\nMãe: {1}\nSexo: {2}\nNacimento: {3}\nCPF: {4}'
@jh00nbr
jh00nbr / cpf_consulta_api_sus.py
Last active May 17, 2023 17:36
Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests,json,sys
# Script simples para consulta de dados na base dados nacional do SUS utilizando o CPF.
# Jhonathan Davi A.K.A jh00nbr / Insightl4b lab.insightsecurity.com.br
# jh00nbr: http://jhonathandavi.com.br
# Blog: lab.insightsecurity.com.br
# Github: github.com/jh00nbr
# Twitter @jh00nbr
@JDFagan
JDFagan / aws-ebs-volume-resize.md
Last active April 13, 2023 06:06
Amazon EBS (Elastic Block Store) storage is not easy to lower volume sizes. They seem to be easy to expand though. This is especially problematic when the EBS volume is mounted on root. This gist describes steps one can take to re-size an EBS volume on an instance whether its to lower or raise the volume size.

Warning - Steps to lower Root EBS Volume still a work in progress and being tested

Steps to Lower Root EBS Volume Size on an Instance

  1. Create new Ubuntu Micro instance (e.g., Name = Tools)
  2. Stop instance you want to lower EBS volume.
  3. Create AMI image as backup of your instance.
  4. Create an empty X GB Amazon EBS volume in the same availability zone where X is smaller size you desire.
  5. Detach the volume you wish to resize from the stopped instance from step 2 above.
  6. Attach the original volume to the Tools instance (e.g., as /dev/xvdf)
  7. Attach new downsized volume to the Tools instance (e.g., as /dev/xvdg)
@avafloww
avafloww / PhpJava.java
Last active August 12, 2025 13:33
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@guiwoda
guiwoda / AR_Cache_Repository.php
Last active February 25, 2023 21:11
AR (Eloquent) vs DM (Doctrine) gist
<?php
namespace App\ActiveRecord;
class PostRepository
{
private $cache;
public function __construct(Cache $cache)
{
// Any set() / get() cache implementation.
@gvsrepins
gvsrepins / Envoy.blade.php
Last active November 4, 2024 15:32
A Laravel envoy script for deployment
@servers(['production' => 'productionserver', 'local'=> 'vagrant@127.0.0.1 -p 2222'])
{{-- Configuration section --}}
@setup
/*
|--------------------------------------------------------------------------
| Git Config
|--------------------------------------------------------------------------
|
@reinaldomendes
reinaldomendes / usar bitbucket na locaweb
Last active December 22, 2015 03:22
Truques de servidores
##################################
# ~/.ssh/config
##################################
Host bitbucket.org
Hostname altssh.bitbucket.org
Port 443