View JwtToken.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace App\Services\Jwt; | |
use DateTimeImmutable; | |
use Lcobucci\JWT\Encoding\ChainedFormatter; | |
use Lcobucci\JWT\Encoding\JoseEncoder; | |
use Lcobucci\JWT\Signer\Key\InMemory; | |
use Lcobucci\JWT\Signer\Hmac\Sha256; | |
use Lcobucci\JWT\Token\Builder; |
View auth-log-ip-locate.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e "\nSTART: $(date "+%Y-%m-%d %H:%M:%S")\n\n" | |
logs="/root/logs/auth-log-ip-locate" | |
if [ ! -d "$logs" ]; then | |
install -d "$logs" | |
fi |
View all.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt install php8.2 php8.2-amqp php8.2-apcu php8.2-ast php8.2-bcmath php8.2-bz2 php8.2-cgi php8.2-cli php8.2-common php8.2-curl php8.2-dba php8.2-decimal php8.2-dev php8.2-ds php8.2-enchant php8.2-excimer php8.2-fpm php8.2-gd php8.2-gmp php8.2-gnupg php8.2-grpc php8.2-http php8.2-igbinary php8.2-imagick php8.2-imap php8.2-inotify php8.2-interbase php8.2-intl php8.2-ldap php8.2-libvirt-php php8.2-lz4 php8.2-mailparse php8.2-maxminddb php8.2-mbstring php8.2-memcache php8.2-memcached php8.2-mongodb php8.2-msgpack php8.2-mysql php8.2-oauth php8.2-odbc php8.2-opcache php8.2-pcov php8.2-pgsql php8.2-phpdbg php8.2-pinba php8.2-protobuf php8.2-ps php8.2-pspell php8.2-psr php8.2-raphf php8.2-rdkafka php8.2-readline php8.2-redis php8.2-rrd php8.2-smbclient php8.2-snmp php8.2-soap php8.2-sqlite3 php8.2-ssh2 php8.2-stomp php8.2-swoole php8.2-sybase php8.2-tideways php8.2-tidy php8.2-uopz php8.2-uuid php8.2-vips php8.2-xdebug php8.2-xhprof php8.2-xml php8.2-xmlrpc php8.2-xsl php8.2-yaml php8.2-zip php8.2-zmq php8.2-zstd |
View custom-keyring-batch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for KEY in $(apt-key --keyring /etc/apt/trusted.gpg list | grep -E "(([ ]{1,2}(([0-9A-F]{4}))){10})" | tr -d " " | grep -E "([0-9A-F]){8}\b" ); do K=${KEY:(-8)}; apt-key export $K | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/imported-from-trusted-gpg-$K.gpg; done |
View arrayMapRecursive.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
/** | |
* @param array $array | |
* @param callable $callback | |
* @param bool $values_only = true | |
* | |
* @return array | |
*/ | |
public function arrayMapRecursive(array $array, callable $callback, bool $values_only = true): array |
View github-ssh.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install: | |
# wget https://gist.githubusercontent.com/eusonlito/39f15118cfa7a3fcab88cc80b4ef7ca8/raw/github-ssh.sh -O /usr/local/bin/github-ssh | |
# chmod 755 /usr/local/bin/github-ssh | |
# Usage: | |
# github-ssh "https://github.com/eusonlito/Password-Manager" | |
url="$1" |
View oppo-coloros-bloatware-disable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pm disable-user --user 0 com.caf.fmradio | |
pm disable-user --user 0 com.coloros.activation | |
pm disable-user --user 0 com.coloros.activation.overlay.common | |
pm disable-user --user 0 com.coloros.alarmclock | |
pm disable-user --user 0 com.coloros.appmanager | |
pm disable-user --user 0 com.coloros.assistantscreen | |
pm disable-user --user 0 com.coloros.athena | |
pm disable-user --user 0 com.coloros.avastofferwall | |
pm disable-user --user 0 com.coloros.backuprestore | |
pm disable-user --user 0 com.coloros.backuprestore.remoteservice |
View randomize-numbers-html.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('body *').forEach(function (e) { | |
const html = e.innerHTML; | |
if (!html || !html.match(/^[0-9\-\.\,\s]+$/)) { | |
return; | |
} | |
const chars = html.split(''); | |
for (i = 0; i < chars.length; i++) { |
View svg2png.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for svg in */*.svg; do | |
width=$(grep -m 1 -o -h 'width="[0-9]\+"' $svg | sed 's/[^0-9]//g') | |
height=$(grep -m 1 -o -h 'height="[0-9]\+"' $svg | sed 's/[^0-9]//g') | |
png=$(echo $svg | sed 's/svg/png/') | |
echo "Converting $svg to $png with size ${width}x${height}" | |
inkscape -w "$width" -h "$height" $svg -o $png 2>/dev/null |
View factorial-attendance.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function(){ | |
const endpointShifts = 'https://api.factorialhr.com/attendance/shifts'; | |
const endpointPeriods = 'https://api.factorialhr.com/attendance/periods'; | |
const year = new Date().getFullYear(); | |
const month = new Date().getMonth() + 1; | |
const times = [[ '08:00', '14:00' ], [ '15:30', '17:30' ]]; | |
const allowFuture = true; |
NewerOlder