Skip to content

Instantly share code, notes, and snippets.

View iamlucianojr's full-sized avatar
👨‍💻
If you want to go fast, go alone. If you want to go far, go with others.

Luciano Jr iamlucianojr

👨‍💻
If you want to go fast, go alone. If you want to go far, go with others.
View GitHub Profile
@joelpalmer
joelpalmer / life-changing-aliases.zsh
Last active August 30, 2022 20:20
Life changing Zsh aliases
# Custom Aliases
alias -s txt=nvim
alias -s vim=nvim
alias -s zsh=nvim
alias -s zshrc=nvim
alias -s {c,h}=nvim
alias -s {js,json}=nvim
alias -s {md,MD}=nvim
alias -s {rs,toml}=nvim
alias -s {yml}=nvim
@jvahldick
jvahldick / image-loader.js
Last active September 27, 2019 15:39
Solving an issue with lazy load images or images that are been uploaded.
class ImageLoader {
DEFAULT_MAX_ATTEMPTS = 10;
DEFAULT_RELOAD_DELAY = 1000;
delay;
maxAttempts;
constructor(options) {
if (typeof options === 'undefined') {
options = {};
@jvahldick
jvahldick / git
Last active October 30, 2019 09:52
Place the script on /usr/local/bin/git to change the name and email before executing the git command
#!/usr/bin/env bash
GIT_SCRIPT=$(which -a git | sed -n 2p)
# Does the remote "origin" point to GitHub?
if ("$GIT_SCRIPT" remote -v 2>/dev/null |
grep '^origin\b.*github.com.*(push)$' >/dev/null 2>&1); then
# Yes. Set username and email that you use on GitHub.
export GIT_AUTHOR_NAME='*** username ***'
@ernsheong
ernsheong / ropc_kong.md
Last active August 25, 2021 07:37
Implementing OAuth2 Resource Owner Password Credentials Grant with Kong

Implementing OAuth2 Resource Owner Password Credentials Grant with Kong

The documentation is okay, but it has some holes, and I had to read it many many times and play with the API myself to "get it" in terms of implementation. So here is a guide that I hope will help someone along the way.

DISCLAIMER: This is by no means the canonical or the most secure way to do this. Below are my findings upon my reading of the docs and the spec. But I might be wrong, very wrong.

This gist is meant to complement the documentation in https://getkong.org/plugins/oauth2-authentication/.

The Resource Owner Password Credentials Grant makes sense if we want to authenticate users who are using our trusted 1st party applications of our own service. (However, you might not want to trust your JavaScript SPA with your refresh token, and maybe you need to store that refresh token in the server on behalf of the SPA if you are paranoid about security. Disclaimer: I am not a security expert)

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

@eminetto
eminetto / VagaBackendCoderockr.md
Last active May 15, 2017 17:27
Vaga desenvolvedor Backend Coderockr

Requisitos

  • Conhecimentos avançados em Orientação a Objetos
  • Conhecimentos avançados em linguagens de programação para backend como PHP, Python, Go
  • Conhecimentos em algum framework como Zend Framework, Zend Expressive, Silex, Django, Symfony ou similares
  • Conhecimentos em ORMs como Doctrine 2 (entidades, relacionamentos, consultas)
  • Conhecimentos avançados em testes unitários
  • Conhecimentos em banco de dados como MySQL e PostgreSQL
  • Conhecimentos em Git (branches, Pull Requests)
  • Inglês técnico, pelo menos para leitura
@gilbitron
gilbitron / .env.travis
Last active August 12, 2023 08:06
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@iamlucianojr
iamlucianojr / wakeup
Last active May 10, 2016 11:02
Wake up reading
SOLID:
- Single responsability principle
- Open/Closed principle
- Liskov substituition principle
- Interface segregation principle
- Dependence inversion principle
Object Calisthenics:
- Only One Level Of Indentation Per Method
- Don't Use The ELSE Keyword
@msurguy
msurguy / List.md
Last active November 17, 2024 16:29
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):