Skip to content

Instantly share code, notes, and snippets.

View luisangelorjr's full-sized avatar
🖖
Focusing

Luís Ângelo Rodrigues Jr. luisangelorjr

🖖
Focusing
View GitHub Profile
@luisangelorjr
luisangelorjr / change-kernel-performance.sh
Last active December 22, 2022 12:55
change kernel for performance
#!/bin/bash
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
## Sometimes, use sudo su for this
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
## Credits for @willianpaixaoo
## https://twitter.com/willianpaixaoo/status/1518674186608254978?s=20&t=tbi9MuDC_w5AcpI9n37XwA
@luisangelorjr
luisangelorjr / mongo-hack.yml
Created April 20, 2022 14:05
Criado rapidamente para teste de sessão
# Use root/example as user/password credentials
version: '3.1'
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
@luisangelorjr
luisangelorjr / README.md
Created March 24, 2022 18:59 — forked from phillipgreenii/README.md
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm

@luisangelorjr
luisangelorjr / post.md
Created June 30, 2021 20:15 — forked from vinicius73/post.md
["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

#["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

Se preparem que o texto é longo.

Várias vezes chegam novatos aqui perguntando como começar, e a galera diz "estuda lógica primeiro, depois vai pra linguagem X". Vivo dizendo que é bobagem. Ontem, em particular, falei isso, e vieram várias pessoas por inbox me perguntar porquê (e uma pra me xingar, achando que falei por arrogância).

Pra facilitar, eu vou escrever uma boa explicação de porquê "lógica de programação" é furada, doa a quem doer, e postar na APDA e no fórum da EnergyLabs (para futuras referências, porque esse assunto vai voltar, ctz).

{
"author": "Luís Ângelo Rodrigues Jr."
}
@luisangelorjr
luisangelorjr / .vimrc
Created July 29, 2020 14:01
.vimrc utilizado por mim em projetos pessoais e trabalho
set number
set history=500
filetype plugin on
filetype indent on
set autoread
au FocusGained,BufEnter * checktime
set wildmenu
hostname elliot-01
echo elliot-01 > /etc/hostname
bash
curl -fsSL https://get.docker.com | bash
docker version
docker ps
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
apt-get update
apt-get install kubelet kubectl kubeadm
@luisangelorjr
luisangelorjr / gist:35b98a92f1e6ec056dccaf06dba161a9
Created March 22, 2019 19:47 — forked from yano3/gist:1378948
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@luisangelorjr
luisangelorjr / Dockerfile
Created March 19, 2019 20:32 — forked from deepak/Dockerfile
Dockerfile for installing ruby using rbenv
# DOCKER-VERSION 0.4.8
# am facing issue
# https://github.com/dotcloud/docker/issues/1123
FROM ubuntu:12.04
MAINTAINER Deepak Kannan "deepak@codemancers.com"
RUN apt-get -y install python-software-properties
@luisangelorjr
luisangelorjr / Post-RubyRails.md
Last active June 13, 2018 17:16 — forked from lucasnogueira/Post-RubyRails.md
Para aprender Ruby e Rails

É difícil falar de Ruby sem mencionar seu framework web mais famoso, Ruby on Rails. Mas não adianta muito encarar o framework sem um prévio estudo da linguagem (o que de fato já observei acontecer inúmeras vezes). Esse post tem como intuito auxiliar na aprendizagem tanto da linguagem como do framework, para evitar que erros comuns como esse tornem a utilização de ambos um desastre.

Ruby

Ruby é uma linguagem de programação que apareceu para o mundo em 1995, criada por Yukihiro "Matz" Matsumoto. Tem como características o fato de ser uma linguagem de uso geral, com tipagem dinâmica e forte, orientada a objetos e que incorpora diversos paradigmas de programação, como o funcional e o imperativo.

Iniciantes

  • Ruby in Twenty Minutes - É o que o nome diz: um pequeno tutorial que promete não tomar mais do que 20 minutos do seu tempo. Se encarrega de mostrar como baixar e instalar o Ruby. Faz grande uso da IRB (Int