Skip to content

Instantly share code, notes, and snippets.

View lucasmoreiradev's full-sized avatar
🎯
Focusing

Lucas Moreira lucasmoreiradev

🎯
Focusing
View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 7, 2024 07:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@letanure
letanure / estados-cidades.json
Last active July 5, 2024 18:16
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",
@nickleefly
nickleefly / forever.md
Last active December 13, 2016 10:26
forever your node app

Install Forever:

npm install forever -g

now your can run forever

forever --help
forever start app.js
@Bamco
Bamco / permutations.ml
Created August 4, 2013 21:08
Ocaml list permutations
(* interleave 1 [2;3] = [ [1;2;3]; [2;1;3]; [2;3;1] ] *)
let rec interleave x lst =
match lst with
| [] -> [[x]]
| hd::tl -> (x::lst) :: (List.map (fun y -> hd::y) (interleave x tl))
(*permutations [1; 2; 3] = [[1; 2; 3]; [2; 1; 3]; [2; 3; 1]; [1; 3; 2]; [3; 1; 2]; [3; 2; 1]] *)
let rec permutations lst =
match lst with
| hd::tl -> List.concat (List.map (interleave hd) (permutations tl))
@sergiosvieira
sergiosvieira / fluxo-trabalho-git.md
Last active January 31, 2024 01:13
Fluxo de Trabalho Utilizando Git para Pequenas Equipes

Fluxo de Trabalho do Git para Pequenas Equipes

  1. Primeiro, crie um branch de desenvolvimento no seu repositório local:
$ git checkout --track origin/development
  1. Trabalhe em sua tarefa normalmente. Lembre-se de fazer commits frequentes para manter o rastro do seu progresso.
@leehsueh
leehsueh / api_service.js
Last active June 23, 2016 10:54
Generic Angular API Service with $http
'use strict';
//////////////////////////////////////////////
// Service object to interact with some API //
//////////////////////////////////////////////
angular.module('myApp.services')
.factory('someApi', ['$q', '$http', function($q, $http) {
var endPointUrl = "[some api end point]";
return {
@ygotthilf
ygotthilf / authInterceptorConfig.config.js
Last active August 13, 2020 19:25
AngularJS 1.x : send JWT and expired refresh token
// module is your angular module
module.config(authInterceptorConfig);
/* @ngInject*/
function authInterceptorConfig($httpProvider) {
$httpProvider.interceptors.push('authInterceptor');
}
module.factory('authInterceptor', authInterceptor);
@JamesMGreene
JamesMGreene / .editorconfig
Created November 16, 2015 12:04
Example EditorConfig file
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
@rcaneppele
rcaneppele / comandos.sh
Last active November 18, 2015 00:23
Comandos JVM GC
# Parallel
time java -verbose:gc -XX:+UseParallelOldGC EstressaGC
# CMS:
time java -verbose:gc -XX:+UseConcMarkSweepGC EstressaGC
# G1:
time java -verbose:gc -XX:+UseG1GC EstressaGC
@suissa
suissa / remodelagem-para-mongodb.md
Last active June 21, 2020 19:58
Um aluno do Be MEAN postou essa modelagem relacional a qual ele estava com dificuldades para passar para o MongoDB, então vou ensinar aqui como faz

Remodelagem do Relacional para o MongoDb

Um aluno do Be MEAN postou essa modelagem relacional a qual ele estava com dificuldades para passar para o MongoDB, então vou ensinar aqui como faz

Vamos inicialmente separar pelas COLEÇÕES que achamos que devemos ter:

  • Usuario;
  • Escola;