Skip to content

Instantly share code, notes, and snippets.

View jeancsanchez's full-sized avatar
🤓
I may be slow to respond.

Jean Carlos jeancsanchez

🤓
I may be slow to respond.
View GitHub Profile
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 23:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@graydon
graydon / country-bounding-boxes.py
Created April 23, 2014 00:03
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@miao1007
miao1007 / GradientTransformation.java
Last active October 7, 2023 05:10
Gradient Transformation For Picasso
/**
* Created by Miao1007 on 2/2/15.
*
* Original Code: https://gist.github.com/miao1007/3f7e9b5f011fc188eba6
*/
public class GradientTransformation implements Transformation {
int startColor = Color.argb(240,0,0,0);
int endColor = Color.TRANSPARENT;
@zulhfreelancer
zulhfreelancer / heroku_pg_db_reset.md
Last active January 29, 2024 10:09
How to reset PG Database on Heroku (for Rails app)?

It's important to note that running this reset will drop any existing data you have in the application

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

{
"UF": [
{"nome": "Acre", "sigla": "AC"},
{"nome": "Alagoas", "sigla": "AL"},
{"nome": "Amapá", "sigla": "AP"},
{"nome": "Amazonas", "sigla": "AM"},
{"nome": "Bahia", "sigla": "BA"},
{"nome": "Ceará", "sigla": "CE"},
{"nome": "Distrito Federal", "sigla": "DF"},
{"nome": "Espírito Santo", "sigla": "ES"},