Skip to content

Instantly share code, notes, and snippets.

View germanf's full-sized avatar
🚀

Germán germanf

🚀
View GitHub Profile
@germanf
germanf / omnicore-regtest-tokenverse.py
Last active April 18, 2025 04:18
A fully-automated simulation of a vibrant token economy on a local OmniLayer blockchain
#!/usr/bin/env python3
import subprocess
import random
import string
import time
DEBUG_MODE = True #False
ADJECTIVES = ["Fusion", "Quantum", "Nova", "Terra", "Meta", "Cyber", "Lumen", "Solar", "Dream", "Warp"]
NOUNS = ["Core", "Verse", "Nexus", "Chain", "Field", "Engine", "Sphere", "System", "Beam", "Node"]
@germanf
germanf / system_stats.sh
Created January 3, 2025 20:15
Script Bash para mostrar estadísticas del sistema: memoria, CPU, procesos, discos, y más (opcionalmente con detalle completo).
#!/bin/bash
# Mostrar la versión de Linux y del kernel
echo -e "Versión de Linux y Kernel:"
if [[ -f /etc/os-release ]]; then
echo -e " Distribución: $(cat /etc/os-release | grep -i 'PRETTY_NAME' | cut -d '=' -f2 | tr -d '"')"
else
echo -e " No se pudo obtener la versión de la distribución (archivo /etc/os-release no encontrado)"
fi
@germanf
germanf / Dokerfile
Last active May 15, 2024 13:19
Debian slim Docker container
# Usa una imagen base de Debian
FROM debian:stable-slim
# Instala wget, sudo, jq, bash-completion, git, iputils-ping, cat, less, y bc
RUN apt-get update && \
apt-get install -y wget sudo jq bash-completion git iputils-ping coreutils less procps bc && \
rm -rf /var/lib/apt/lists/*
# Agrega el usuario satoshi y con permisos de sudo
RUN useradd -ms /bin/bash satoshi && \
@germanf
germanf / letter_freq.py
Created August 8, 2019 18:47
data visualization of letter frequencies
import matplotlib.pyplot as plt
alphabet = "abcdefghijklmnopqrstuvwxyz"
code = """
paste the text here
"""
letter_counts = [code.count(l) for l in alphabet]
letter_colors = plt.cm.hsv([0.8*i/max(letter_counts) for i in letter_counts])
@germanf
germanf / README.md
Created March 16, 2019 18:56 — forked from mosampaio/README.md
Gmail Api OAuth Using Node.js Express - part 2

How to Run?

  • Make sure there is a mongodb instance running locally.

  • First export the environment variables.

export CLIENT_ID=your-client-id
export CLIENT_SECRET=your-client-secret
export DOMAIN_URL=your-domain-url
@germanf
germanf / git-commit-log-stats.md
Created March 8, 2018 00:28 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@germanf
germanf / gist:3d6ab7c14c332c88a687340d9bb9bdf1
Created March 1, 2018 22:17
Convert current ML page prices to argento's peso
// bookmark any site, edit it and paste the below code in the URL input
javascript: (function($) {
var factor = localStorage.getItem('factor') || 1.01;
factor = prompt('Enter the currency factor (ie. 0.824 for $MX to $ARG)', factor);
localStorage.setItem('factor', factor);
$('span.price__fraction').each(function(idx, elem) {
var ee = $(elem)
, pesos = parseInt(ee.text().replace('$', '').trim().replace(',', '').replace(/\./g, '')) / factor;
ee.text(pesos.toFixed(2));
});
@germanf
germanf / commenting-system.html
Created December 31, 2016 13:36
Commenting System Layout (HTML+CSS)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Commenting System</title>
<meta name="viewport" content="width=device-width">
<link rel="icon" type="image/png" href="http://www.favicon.cc/logo3d/430212.png"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<style type="text/css">
.dialogdemoBasicUsage #popupContainer {
position: relative; }
.dialogdemoBasicUsage .footer {
width: 100%;
text-align: center;
margin-left: 20px; }
.dialogdemoBasicUsage .footer, .dialogdemoBasicUsage .footer > code {
@germanf
germanf / enable_mongo.sh
Created August 12, 2016 19:46 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]