Skip to content

Instantly share code, notes, and snippets.

View alexandreramosdev's full-sized avatar
:shipit:
Working...

Alexandre Ramos alexandreramosdev

:shipit:
Working...
View GitHub Profile

Vs Code Configuration for PHP

Requisito:

  • Ter o composer instalado

1. Instalar as extensões

Recomendados:

  • PHP Intelephense
  • phpcs (Ioannis Kappas)
@Santiael
Santiael / AutoRedeemTwitchBonus.js
Last active December 5, 2021 14:20
Copy and paste this script into the console window of your favorite stream to automatically redeem Twitch bonus points.
function AutoRedeemTwitchBonus() {
try {
const reward = document.querySelector(".claimable-bonus__icon");
if(reward) {
reward.click();
console.log(
`Reward successfully redeemed at ${new Date().toTimeString().slice(0,8)}`
);
}
} catch (error) {
@alexandreramosdev
alexandreramosdev / token-generator.js
Created November 7, 2019 02:52 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@ThYpHo0n
ThYpHo0n / .zshrc
Last active April 11, 2024 19:00
WSL(2) bash profile helpers
# WSL?
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
# pip path if using --user
export PATH=$PATH:$HOME/.local/bin
# SSH
@alexandreramosdev
alexandreramosdev / dockerPostgres.sh
Created June 27, 2019 23:52
Docker script Postgres
docker run \
--name postgres \
-e POSTGRES_USER=alexandreramos \
-e POSTGRES_PASSWORD=minhasenhasecreta \
-e POSTGRES_DB=heroes \
-p 5432:5432 \
-d \
postgres
docker run \
@alexandreramosdev
alexandreramosdev / DockerMongodb.sh
Last active June 28, 2019 00:10
Docker script mongodb
docker run \
--name mongodb \
-p 27017:27017 \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD=senhaadmin \
-d \
mongo:4
docker run \
--name mongoclient \
@justsml
justsml / fetch-api-examples.md
Last active July 8, 2024 17:26
JavaScript Fetch API Examples
@ziluvatar
ziluvatar / token-generator.js
Last active July 16, 2024 14:46
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@parmentf
parmentf / GitCommitEmoji.md
Last active July 23, 2024 06:11
Git Commit message Emoji