Skip to content

Instantly share code, notes, and snippets.

View nerun's full-sized avatar
💾
Fight on!

Daniel Dias Rodrigues nerun

💾
Fight on!
View GitHub Profile
@nerun
nerun / indices.sh
Last active September 28, 2024 14:21
Imprime índices econômicos direto no terminal.
#!/bin/zsh
#
# indices.sh - version 1.2 - 28/09/2024
# Copyright (c) 2024 Daniel Dias Rodrigues <danieldiasr@gmail.com>. No rights
# reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the Creative Commons Zero 1.0 Universal (CC0 1.0) Public
# Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/).
#
@nerun
nerun / gerador-aventuras.py
Last active January 24, 2024 19:51
Geradores Diversos de RPG baseados em artigos de Diogo Nogueira para o blog "Pontos de Experiência" <http://www.pontosdeexperiencia.com.br>.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, sys, random
# VARIÁVEIS
# Gerador de Aventuras de Espada e Feitiçaria
# ===========================================
objetivo = { 'Atacar / Matar / Destruir' : [ 'Uma pessoa importante',
@nerun
nerun / cuneicrypt.py
Last active January 16, 2024 13:16
CUNEICRYPT encrypts or decrypts a text file to stdout. It's a keyless cipher that replaces each printable character in a text file with a character in the cuneiform unicode block. It is written in Python for study and entertainment purposes only. This is a very weak encryption, do not use it to protect your data.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
args = sys.argv
def color(code, txt):
# 1 Red 3 Yellow 5 Purple 7 Light Gray
# 2 Green 4 Blue 6 Cyan (Light Blue) 8 Black
return '\033[3' + str(code) + 'm' + str(txt) + '\033[00m'
@nerun
nerun / paragrapher.sh
Last active June 20, 2024 02:28
The purpose of this script is to analyze plain text files (with or without the ".txt" extension) looking for broken paragraphs, i.e., paragraphs splited in more than one line, and join them in a single very long line. It's markdown friendly.
#!/usr/bin/env zsh
################################################################################
# PARAGRAPHER revision 19
# By Daniel "Nerun" Rodrigues
# June 19, 2024
# https://gist.github.com/nerun/8318924aa35f3f27231f86468804cc8c
#
# The purpose of this script is to analyze plain text files (with or without the
# ".txt" extension) looking for broken paragraphs, i.e., paragraphs splited in
# more than one line, and join them in a single very long line.
@nerun
nerun / Oblivion.json
Last active July 25, 2024 18:14
Ghostwriter theme based upon Oblivion for Gedit / Pluma / Xed. Copy to yours ~/.config/ghostwriter/themes.
{
"dark": {
"accent": "#ac7e9a",
"background": "#2e3436",
"block": "#bdc3c7",
"cursor": "#3daee9",
"emphasis": "#8ae234",
"error": "#da4453",
"foreground": "#d3d3a9",
"heading": "#ca6b0d",
@nerun
nerun / diario
Last active January 10, 2024 19:52
A daily log of experiences (daybook, journal), a personal organizer or an appointment diary to be run in a linux terminal. Totally written in shell script. Support AES-256 symmetric encryption through 7-Zip.
#!/usr/bin/env zsh
##############################################################################
# DIÁRIO NUM TERMINAL
#
# Copyright (C) 2023, 2024 Daniel Dias Rodrigues
#
# Source code is available at:
# https://gist.github.com/nerun/25bad2359b873351a65c40b1d425766f
#
# This program is free software; you can redistribute it and/or modify it
@nerun
nerun / groff.lang
Last active September 27, 2024 13:52 — forked from Sciancisco/groff.lang
Gedit groff syntax highlight
<?xml version="1.0" encoding="UTF-8"?>
<!--
COPYRIGHT:
==========
Gedit groff syntax highlight. A definition of the groff syntax for
GtkSourceView.
Copyright (C) 2022 - Daniel Dias Rodrigues. All rights reserved.
Copyright (C) 2020 - Sciancisco. All rights reserved.
@nerun
nerun / PyDice.py
Last active July 9, 2024 14:56
A dice roller with a gaussian distribution calculator. Written in Python 3.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# PyDice.py - version 2.0 - 08 july 2024
# Copyright (c) 2024 Daniel Dias Rodrigues <danieldiasr@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the Creative Commons Zero 1.0 Universal (CC0 1.0) Public
# Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/).
#
@nerun
nerun / bitwarden-to-chrome-csv
Created March 14, 2022 18:24
Convert a CSV created by Bitwarden Password Manager to Chrome CSV format.
#!/bin/bash
# First, make a copy of the original CSV file. We gonna work with the copy.
cp $1 $2
# If no name is given for the output file, use a default.
if [ -z $2 ]; then
output='passwords_output.csv'
else
output=$2
fi
@nerun
nerun / zap
Last active August 28, 2024 16:39
Universal Compressor (Archiver) and Decompressor (Extractor) for Linux shell.
#!/usr/bin/env zsh
###########################
# ZAP
# By Daniel Dias Rodrigues
###########################
# Se o parâmetro for -c, compactar
if [[ $1 == "-c" || $1 == "c" ]]; then
local args=("$@") # array de argumentos