Skip to content

Instantly share code, notes, and snippets.

View micalevisk's full-sized avatar
🇧🇷
HTTP 499 ~ Adding bugs to programs.‏‏‎

Micael Levi L. Cavalcante micalevisk

🇧🇷
HTTP 499 ~ Adding bugs to programs.‏‏‎
View GitHub Profile
@micalevisk
micalevisk / 0respostas.md
Last active May 8, 2019 20:37
[PW 2018/1] Lista de revisão para a primeira prova
@micalevisk
micalevisk / arrow_key_detect_approaches.sh
Last active December 9, 2018 23:56
Duas abordagens para detecção de setas em Shell Script
#!/bin/bash
## solution1: $ sh arrow_key.sh
## solution2: $ sh arrow_key.sh 2 [-v]
: '
a d e f m o u ASCII
61 64 65 66 6D 6F 75 HEX
HEX ASCII
0a \n or \s
1b 5b 41 \033[A # Up arrow
@micalevisk
micalevisk / list_channels.sh
Last active December 9, 2018 23:31
Simple Shell Script to list all channels in which a Twitch TV (API v5) user is on chat
#!/bin/bash
#
# List all channels in which a Twitch TV user is on chat.
#
# USAGE:
# ./list_channels.sh <user_id> <username>
#
# Created by Micael Levi on 22/01/2018
# Copyright (c) 2018 <[email protected]> All rights reserved
#
@micalevisk
micalevisk / from_hex_to_256.bash
Last active December 26, 2021 17:44
Minimal bash script to convert RGB to 256 terminal color wisely.
#!/bin/bash
## convert RGB to 256 terminal color
rgb="${1//[!0-9,]/}" # 0..255,0..255,0..255
echo -n "\e[0;38;2;${rgb//,/;}m"