This script should be placed in the directory that has the easy-rsa directory.
Example output:
# ./list-revoked
Revoked certificates:
=====================
757605D0E1B900FEBEBD0DB92B7CBCD7: C - someuser1
This script should be placed in the directory that has the easy-rsa directory.
Example output:
# ./list-revoked
Revoked certificates:
=====================
757605D0E1B900FEBEBD0DB92B7CBCD7: C - someuser1
function evaluate_jenv() { | |
if [ ! -v JENV_LOADED ]; then | |
setopt local_options nullglob | |
[ -f pom.xml -o -f build.gradle.kts -o -f build.sbt -o -f build.xml -o -f .java-version -o -f .deps.edn -o -f project.clj -o -f build.boot ] && files=1 | |
if [ ! -v files ]; then | |
extensions=(*.java, *.class, *.gradle, *.jar, *.cljs, *.cljc) | |
if [ -z "$extensions" ]; then | |
return | |
fi | |
fi |
Generate random passwords using 4 different charsets. Configurable length and count(Default 32 len, 30 count).
Usage:
./genpass
Usage: ./genpass [length(32)] [passwords_count(30)]
20973143392597200522372078343494 9gdds8ihw2niigs3f4gzddv9rtfmv8kx dlaoEefHJJxN6oqglazb5RgstmD9z144 ,i-UIZVNd|~9$Z'5=J@=RVt{nIV+J{a&
45656053506377489597126894570217 up34vlejddl3vnj5n7m38733myv8dkx1 9wJLm8nCwN0AhHznsod2VyX7S5Yhd0ah ^#y-@GBRTX&BTi @oJZO9f8K:9tUVTbU
This scripts shows all fingerprints of SSH authorized keys for the root user.
This is usefull when you are checking which key has been accepted in the /var/log/auth.log.
Like:
Mar 9 10:13:08 hnm sshd[1595179]: Accepted publickey for root from 192.168.1.1 port 56726 ssh2: ED25519 SHA256:OLcfsyZasQWbXze7TVirQd42O09YB704i1N8pKOuve5u
# | |
# Authors: | |
# Tercio Gaudencio Filho <terciofilho@gmail.com> | |
# | |
# Ex: | |
# USERNAME@HOSTNAME [TIME] [/FULL/PATH] ✘ $ | |
function prompt_0x3333_2_setup { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS |
This is a simple example on how to interface with a TLC5973
IC to dim LEDs in Raspberry Pi.
It uses SPI to generate a pulse train with precise timing.
In Raspberry Pi, the SPI may have some inter-byte delay, which makes this useless. More here: https://www.raspberrypi.org/forums/viewtopic.php?t=211152
I'm using go-rpio
to manage the SPI device.
The idea to use SPI came from this repo: https://github.com/mik4el/cc1350-swim-thermo/blob/b2fdb54a940e18911959a5e1778ca7fc06915a11/software/tlc5973_spimaster_CC1350_SWIMTHERMO_tirtos_ccs/spimaster.c
server { | |
listen 80; | |
server_name docker.yourdomain.com; | |
return 301 https://$server_name$request_uri; | |
} | |
upstream registry { | |
server 192.168.3.10:5000; |
#!/bin/sh | |
#FreeDNS updater script | |
UPDATEURL="https://freedns.afraid.org/dynamic/update.php?_YOUR_KEY_HERE_" | |
DOMAIN="_YOUR_DOMAIN_HERE_" | |
registered=$(nslookup $DOMAIN|tail -n2|grep A|sed s/[^0-9.]//g) | |
current=$(dig +noall +answer @ns1.afraid.org $DOMAIN|sed 's/.*\t\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*$/\1/g') |
Para contas tipo SIP Trunk da DirectCall, não existe API(Existe mas é paga) para pegar o saldo atual da conta.
Criei este script para facilitar o acompanhamento do saldo, sem precisar entrar na interface web.
O script retorna 0 caso seja invocado sem argumentos ou caso o argumento seja maior que o saldo atual. Exemplo:
$ ./saldo.sh
312,64
$ echo $?
This is an alias to shells to display mount output in formatted columns.
Add this alias to your rc shell(.bashrc, .zshrc, or whatever):
alias mountc='mount | column -t | sort -V'
Example output: