Skip to content

Instantly share code, notes, and snippets.

View lucenarenato's full-sized avatar
🐘
Remoto

Renato Lucena lucenarenato

🐘
Remoto
View GitHub Profile
@lucenarenato
lucenarenato / signatureverification.php
Created July 28, 2022 01:42 — forked from ritou/signatureverification.php
ID Token Verification using JWK URL and x509 URL
# preparation
## OpenID Connect library(use only http client)
$ pear install openpear/Akita_OpenIDConnect-alpha
## RSA Crypt and X.509 handling library
$ pear channel-discover phpseclib.sourceforge.net
$ pear install phpseclib/Crypt_RSA
$ pear install phpseclib/File_X509
# PHP Source
$ cat signatureverification.php
@lucenarenato
lucenarenato / unique-token.php
Created July 27, 2022 23:12 — forked from barbietunnie/unique-token.php
Creating unique tokens in PHP
<?php
// bin2hex(random_bytes($length))
$token = bin2hex(random_bytes(64));
/*
Examples:
39e9289a5b8328ecc4286da11076748716c41ec7fb94839a689f7dac5cdf5ba8bdc9a9acdc95b95245f80a00d58c9575c203ceb541507cce40dd5a96e9399f4a
1c46538c712e9b5bf0fe43d692147004f617b494d004e29daaf33e4528f253db5d911a690856f0b77cfa98103c8231bffff869f179125d17d28e52bfadb9f205
...
@lucenarenato
lucenarenato / postman-deb.sh
Created June 7, 2022 12:21 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
curlExists=$(command -v curl)
echo "Testing Postman version"
targetName=""
if [ -z $curlExists ]; then
targetName=$(wget -S --spider "https://dl.pstmn.io/download/latest/linux64" 2>&1 | grep "Content-Disposition" | awk -F '=' '{ print $2 }')
else
@lucenarenato
lucenarenato / script.js
Created April 6, 2022 02:17 — forked from ATofighi/script.js
Grafana alert RocketChat webhook script
class Script {
/**
* @params {object} request
*/
process_incoming_request({ request }) {
let color = "#00FF00"; // green
switch(request.content.state) {
case 'ok':
color = '#00FF00';
break;
#!/bin/bash
### Variáveis
PROGRAMAS_APT=(
git
git-flow
google-chrome-stable
deepin-terminal
deepin-screen-recorder
gnome-tweak-tool
@lucenarenato
lucenarenato / Install_robo3t_Ubuntu.md
Created January 14, 2022 04:03 — forked from abdallahokasha/Install_robo3t_Ubuntu.md
Install Robo3t on Ubuntu18.04 and make a desktop icon for it

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
Extract here using

tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz

@lucenarenato
lucenarenato / sublime-base.json
Created September 21, 2021 13:26 — forked from barelyhuman/sublime-base.json
Base config for a decent looking sublime text
{
"color_scheme": "Packages/Materialize/schemes/Material Seti.tmTheme",
"font_face": "Ubuntu Mono Ligaturized",
"font_size": 14,
"ignored_packages":
[
"Vintage"
],
"theme": "Material Seti.sublime-theme",
"line_padding_top":4,
@lucenarenato
lucenarenato / git_filter_branch.sh
Created August 20, 2021 13:08 — forked from vluzrmos/git_filter_branch.sh
Remove file from all commits on all branches
# Remove file from all commits on all branches
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch FILENAMEHERE" --prune-empty --tag-name-filter cat -- --all
# After
git push --all --force
@lucenarenato
lucenarenato / remote-ssh-write.sh
Created August 20, 2021 13:02 — forked from vluzrmos/remote-ssh-write.sh
Write into a SSH Remote File
#!/bin/bash
echo 'Some Text' | ssh user@remotehost -T "cat > /remotefile.txt"
# The -T disables pseudo-terminal allocation and stops you from getting the message,
# Pseudo-terminal will not be allocated because stdin is not a terminal.
# @see https://superuser.com/a/400720/341320
@lucenarenato
lucenarenato / docker-compose.yml
Created August 20, 2021 13:01 — forked from vluzrmos/docker-compose.yml
Docker-compose replace command
# ...
services:
# ...
service-name:
# ...
command: >
bash -c "
php artisan cache:clear &&
php artisan config:clear &&