Skip to content

Instantly share code, notes, and snippets.


Dwight Spencer denzuko

View GitHub Profile
Gavinok / sqlval.troff
Last active Jan 29, 2021
demo tsql a troff preprocessor for using sqlite in troff
View sqlval.troff
.\" cat THISFILE | tsql | tbl | groff -Tpdf > THISFILE.pdf
Store info
.sqldb :memory:
create table Fam (
name text,
id integer
primary key
ustropo /
Created Mar 27, 2020
Exemplo de configuração de API usando Python Eve
from eve import Eve
from .sensor_manager import TempSensorManager
# API configuration
'sensors': {
'schema': {
'_id': {'type': 'string', 'unique': True},
from functools import lru_cache
from datetime import datetime
def fib_cache(n):
if n < 2:
return n
return fib_cache(n-1) + fib_cache(n-2)
def fib_no_cache(n):
View gist:d9f095d4617c1cd47317c702091112cd
Apus Agate Adjacent
Aquila Almandine Adjunct
Aries Amber Almuten
Bootes Amethyst Angular
Caelum Apatite Apside
Cancer Aquamarine Arcing
Canis Azurite Ascendant
Cepheus Beryl Aspecting
Cetus Carnelian Beheld
Corona Chalcedony Benefic
gmolveau /
Last active Jul 20, 2022
A quick tutorial / example / cheatsheet of recutils

recutils tutorial example

GNU Recutils is a set of tools and libraries to access human-editable, plain text databases called recfiles.

TO install on mac : brew install recutils

add this to a new file named books.rec

function dockershell() {
docker run --rm -i -t --entrypoint=/bin/bash "$@"
function dockershellsh() {
docker run --rm -i -t --entrypoint=/bin/sh "$@"
function dockershellhere() {
livingstonetech /
Created Apr 29, 2019
Reference code to calculate TOTP, given a base32 secret.
#!/usr/bin/env python3
Gist to calculate Time-based One Time Password (TOTP).
This function is designed to be used in two modes:
- Current Mode
No timestamp supplied, and the current timestamp is considered.
This mode gives the totp at the present moment in time.
- Historic Mode
Here an explicit timestamp is supplied. This is to calculate a TOTP
that had occured at a moment in history.
WindfallLabs / my_tweaks.zs
Last active Nov 12, 2019
ZenScript for MC Recipies
View my_tweaks.zs
///// Variables
///// Removals
///// Replacements/Alterations
import minetweaker.item.IIngredient;
// Variables
carlessanagustin /
Created Dec 7, 2018
Chronograf dashboard import/export tool - EXPERIMENTAL
#!/usr/bin/env bash
URL=$2 # http://localhost:8888
FILENAME=$3 # dashboard.json
if [ $1 == "export" ]; then
curl -i -X GET $URL/chronograf/v1/dashboards > $FILENAME
elif [ $1 == "import" ]; then
curl -i -X POST -H "Content-Type: application/json" $URL/chronograf/v1/dashboards -d @$FILENAME
View fbctf-bases.txt
PART I: python script
Become root.
1. $ sudo -i
Make fbctf directory in /opt
2. # cd /opt
3. # mkdir fbctf
Get my modified script
4. # wget