Skip to content

Instantly share code, notes, and snippets.

View rodrigooler's full-sized avatar
💜
I would love to change the world, but they did not give me the source code.

Rodrigo Oler rodrigooler

💜
I would love to change the world, but they did not give me the source code.
View GitHub Profile
@rodrigooler
rodrigooler / estados-cidades.json
Created July 22, 2024 20:39 — forked from letanure/estados-cidades.json
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",
//Para Jogar de o comando no terminal:
//cargo new arrumeacasa
//Editar o cargo.toml e colocar abaixo de [dependencies]:
//rand = "0.3.14"
//Copiar o codigo abaixo no src/main.rs
//Salvar e dar cargo run
extern crate rand;
use rand::Rng;
@rodrigooler
rodrigooler / android-apk-release.sh
Last active October 28, 2022 22:12
Build Android
rimraf ./android/app/src/main/res/drawable-*
yarn react-native bundle --platform android --dev false \
--entry-file index.js \
--bundle-output android/app/src/main/assets/index.android.bundle \
--assets-dest android/app/build/intermediates/res/merged/release/
cd android && ./gradlew assembleRelease
cd ..

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

Looking for npm scripts for AWS ECS? Go here!

Watch the video: Do More With Less JavaScript

Docker Containers for Static or Angular/React/Vue/etc SPA Websites

@rodrigooler
rodrigooler / prepack-gentle-intro-1.md
Created May 8, 2018 20:27 — forked from gaearon/prepack-gentle-intro-1.md
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
const path = require('path');
module.exports = {
entry: './path/to/my/entry/file.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'my-first-webpack.bundle.js'
}
};
def find_coupons(
_parent,
%{
city: city,
company_category_id: company_category_id,
coupon_category_id: coupon_category_id
},
_resolution
) do
{:ok,
@rodrigooler
rodrigooler / get_schema.js
Created February 15, 2018 16:12 — forked from ssomnoremac/get_schema.js
get your graphql schema
var fetch = require('node-fetch');
var fs = require('fs');
const {
buildClientSchema,
introspectionQuery,
printSchema,
} = require('graphql/utilities');
console.log(introspectionQuery);
package com.luizalabs.repository;
import com.luizalabs.entity.Product;
import com.luizalabs.entity.ProductGroup;
import info.debatty.java.stringsimilarity.Levenshtein;
import org.springframework.stereotype.Repository;
import java.util.*;
import java.util.stream.Collectors;
final List<Movie> movies = Arrays.asList(
new Movie(1, "Exterminador do Futuro"),
new Movie(2, "Exterminador do Futuro 2"),
new Movie(3, "Exterminador do Futuro 3"));
final Map<String, List<Movie>> movies = movies.stream().collect(Collectors.groupingBy(m -> m.getTitle()));