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 / 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 September 9, 2023 16:58
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 17
# By Daniel "Nerun" Rodrigues
# August 1st, 2023
# 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 December 20, 2023 20:19
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 February 17, 2023 21:36 — forked from Sciancisco/groff.lang
Gedit groff syntax highlight
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2020 - Sciancisco
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@nerun
nerun / PythonDiceRoller.py
Last active April 23, 2024 18:40
A dice roller with gaussian distribution calculator. Written in Python 3.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# PYTHON DICE ROLLER v1.8 - 23 abr. 2024
# By Daniel "Nerun" Rodrigues
# This source code is released under the license
# Creative Commons CC0 1.0 Universal Public Domain Dedication
# <https://creativecommons.org/publicdomain/zero/1.0>
import os, random, sys, re # for re, see terminal()
from itertools import product # for product, see gauss()
@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 November 10, 2023 14:19
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
@nerun
nerun / example.po
Last active June 28, 2023 01:03
Example of .po file
msgid ""
msgstr ""
"Project-Id-Version: Exemplo\n"
"Report-Msgid-Bugs-To: danieldiasr@gmail.com\n"
"POT-Creation-Date: 2021-08-05 14:45-0300\n"
"PO-Revision-Date: 2023-06-27 22:02-0300\n"
"Last-Translator: Daniel Dias Rodrigues <danieldiasr@gmail."
"com>\n"
"Language-Team: \n"
"Language: pt_BR\n"