This file contains hidden or 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 |
This file contains hidden or 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 |
This file contains hidden or 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" |
This file contains hidden or 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 |
This file contains hidden or 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++) { |
This file contains hidden or 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 |
This file contains hidden or 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 url = window.location.href.split('/'); | |
const month = url.pop(); | |
const year = url.pop(); | |
const times = [[ '08:00', '14:00' ], [ '15:30', '17:30' ]]; |
This file contains hidden or 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 | |
set -e | |
if [ "$1" == "" ] || [ ! -d "$1" ]; then | |
echo "Invalid Path $1" | |
exit 1 | |
fi | |
LC_NUMERIC="en_US.UTF-8" |
This file contains hidden or 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 | |
if (!function_exists('array_keys_whitelist')) { | |
function array_keys_whitelist(array $array, array $whitelist): array | |
{ | |
return array_intersect_key($array, array_flip($whitelist)); | |
} | |
} | |
if (!function_exists('array_keys_blacklist')) { |
This file contains hidden or 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
CREATE DATABASE `DB` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
CREATE USER "USR"@"localhost" IDENTIFIED BY "PWD"; | |
CREATE USER "USR"@"127.0.0.1" IDENTIFIED BY "PWD"; | |
GRANT ALL ON `DB`.* TO "USR"@"localhost"; | |
GRANT ALL ON `DB`.* TO "USR"@"127.0.0.1"; | |
FLUSH PRIVILEGES; |