Skip to content

Instantly share code, notes, and snippets.

View andersonbosa's full-sized avatar
🥑

Anderson Bosa andersonbosa

🥑
View GitHub Profile
@andersonbosa
andersonbosa / argparse_optional_argument.py
Created December 4, 2021 18:50 — forked from pknowledge/argparse_optional_argument.py
Python, argparse, and command line arguments example
import argparse
if __name__ == '__main__':
# Initialize the parser
parser = argparse.ArgumentParser(
description="my math script"
)
# Add the parameters positional/optional
parser.add_argument('-n','--num1', help="Number 1", type=float)
@andersonbosa
andersonbosa / gist:4666c8f73e02080e93af0fa342b90985
Created November 5, 2021 17:58 — forked from khakimov/gist:3558086
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@andersonbosa
andersonbosa / CK 62 Layers Fix (SmileY).ahk
Created September 10, 2021 23:49 — forked from SmileYzn/CK 62 Layers Fix (SmileY).ahk
Motospeed CK 62 Layers Fix by SmileY v0.5
;-----------------------------------------------------------------------
; Motospeed CK 62 Layers Fix by SmileY v0.5
;-----------------------------------------------------------------------
;-----------------------------------------------------------------------
; Inativar a tecla caps lock
;-----------------------------------------------------------------------
SetCapsLockState, AlwaysOff
;-----------------------------------------------------------------------
@andersonbosa
andersonbosa / neomuttrc
Last active July 27, 2021 20:31 — forked from VladimirPal/neomuttrc
Minimal neomutt config for gmail imap
set imap_user="$PRV_GMAIL_USER"
set imap_pass="$PRV_GMAIL_PASSWRD"
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster
function interceptNetworkRequests(ee) {
const open = XMLHttpRequest.prototype.open;
const send = XMLHttpRequest.prototype.send;
const isRegularXHR = open.toString().indexOf('native code') !== -1;
// don't hijack if already hijacked - this will mess up with frameworks like Angular with zones
// we work if we load first there which we can.
if (isRegularXHR) {