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
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
sleep(1000) |
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
.global _gm_pintarFranjas | |
@; Rutina para para pintar las franjas verticales correspondientes a un | |
@; conjunto de franjas consecutivas de memoria asignadas a un segmento | |
@; (de código o datos) del zócalo indicado por parámetro. | |
@;Parámetros: | |
@; R0: el número de zócalo que reserva la memoria (0 para borrar) | |
@; R1: el índice inicial de las franjas | |
@; R2: el número de franjas a pintar | |
@; R3: el tipo de segmento reservado (0 -> código, 1 -> datos) | |
_gm_pintarFranjas: |
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
+ verbose=on | |
+ shift | |
+ [[ -n '' ]] | |
+ [[ on != on ]] | |
+ get_simple --jp2a --source /home/aleixmt/.customizer/bin/opensshServer/logo.png -vv | |
+ [[ -n --jp2a ]] | |
++ type -t get_--jp2a | |
+ [[ '' == \f\u\n\c\t\i\o\n ]] | |
+ shift | |
+ [[ -n --source ]] |
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
/* | |
* Original code in https://www.a1k0n.net/2011/07/20/donut-math.html | |
* | |
* Credits to Andy Sloane (github.com/a1k0n) | |
* | |
* Extracted and refactored the code to be readable in order to study and comprehend it from the original 2016 | |
* I resolved warnings, added some missing type declarations, added reasonable newlines. | |
* Tested in Ubuntu 20.04 | |
* To compile it you need to link the C mathematical library with the -lm option. | |
* |
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
shopt -s nullglob | |
rev() | |
{ | |
copy=$1 | |
len=${#copy} | |
for((i=$len-1;i>=0;i--)); do rev="$rev${copy:$i:1}"; done | |
echo $rev | |
} |
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
emoji() { | |
if [ -z "$(echo "${EMOJIS[@]}")" ]; then | |
declare -Ar EMOJIS=( | |
[grinning_face]=😀 | |
[grinning_face_with_big_eyes]=😃 | |
[grinning_face_with_smiling_eyes]=😄 | |
[beaming_face_with_smiling_eyes]=😁 | |
[grinning_squinting_face]=😆 | |
[grinning_face_with_sweat]=😅 |
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
# Install dependencies | |
sudo apt-get install -y python3 python python-pip curl ffmpeg git | |
# Install PyTube | |
python -m pip install git+https://github.com/pytube/pytube | |
# Use command line to scratch audio from videos in a public YouTube playlist | |
# This will create the folder _Music which will contain all the downloaded audio in mp4 format. | |
pytube https://www.youtube.com/playlist?list=PLsS6gopj1BA1Pi-PlaYlIssTtt -a |
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 cmd in "$@"; do { | |
echo "Process \"$cmd\" started"; | |
$cmd & pid=$! | |
PID_LIST+=" $pid"; | |
} done | |
trap "kill $PID_LIST" SIGINT |