Skip to content

Instantly share code, notes, and snippets.

View carlosm3011's full-sized avatar
💭
Mining Internet and RPKI routing data

Carlos Martinez-Cagnazzo carlosm3011

💭
Mining Internet and RPKI routing data
View GitHub Profile
@carlosm3011
carlosm3011 / timing_claves_dnssec.py
Created March 11, 2022 20:21
Pre-generar claves de DNSSEC usando dnssec-keygen
# -*- coding: utf-8 -*-
"""
DNSSEC Timing para pre-generación de claves
2022-03-11
"""
import datetime
import time
@carlosm3011
carlosm3011 / bash-friendlier-automoplete.sh
Last active October 19, 2019 06:03
Friendlier autocomplete for bash (mac, linux)
# set this parameter in .bashrc or .bash_profile
# Source: [See gist comments]
#bind 'set mark-symlinked-directories on'
# (Hopefully) For all readline-enabled processes
# If ~/.inputrc doesn't exist yet: First include the original /etc/inputrc
# so it won't get overriden
# if [ ! -a ~/.inputrc ]; then echo '$include /etc/inputrc' > ~/.inputrc; fi
@carlosm3011
carlosm3011 / install_powerline_fonts_mac.sh
Created June 29, 2019 18:28
Install PowerLine Fonts on Mac
#!/bin/sh
# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts
@carlosm3011
carlosm3011 / ripeval.service
Created July 4, 2017 15:05
RIPE-NCC RPKI Validator - systemd unit file
# cat /etc/systemd/system/ripeval.service
[Unit]
Description=RIPE-NCC RPKI Validator
After=network.target
[Service]
Type=forking
User=ripeval
WorkingDirectory=/home/ripeval
ExecStart=/home/ripeval/ripeval_latest/rpki-validator.sh start
@carlosm3011
carlosm3011 / install-docker-ce-DEBIAN.sh
Last active May 26, 2019 00:55
Installing DOCKER-CE on Ubuntu 16.04 (and possibly newer)
# instalacion para debian stretch
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
@carlosm3011
carlosm3011 / auto_repo.sh
Last active March 18, 2019 18:23
Automatically update and push git repositories found in a folder.
#!/bin/bash
###################################################################
# auto repository manager helper script
#
# Scans current directory for all folders ending in ".git", changes
# into those folders and either runs git pull or git push
#
# 2019-03-18
###################################################################
@carlosm3011
carlosm3011 / tracd.service
Created November 25, 2018 19:06
Using systemd to start the tracd standalone server
[Unit]
Description=Tracd Standalone Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/trac
# ExecStart=/usr/local/bin/tracd -d --pidfile /tmp/tracd.pid -p 80 -s /opt/trac/xt6
ExecStart=/usr/local/bin/tracd --pidfile /tmp/tracd.pid -p 80 -s /opt/trac/xt6
@carlosm3011
carlosm3011 / v6v4test_lacnic.sh
Created November 24, 2018 17:32
Simplistic IPv4/IPv6 relative performance test
# uncomment to use google's test objects
# logfile="v6v4test_google.csv"
# w4url="https://random8168-v6exp3.v4.metric.gstatic.com/v6exp3/6.gif"
# w6url="https://random2385-v6exp3.ds.metric.gstatic.com/v6exp3/6.gif"
# uncomment to use lacnic's objects
logfile="v6v4test_lacnic.csv"
#w4url="http://w4.labs.lacnic.net/v6v4test/1000kb.bin"
w4url="http://200.7.84.10/v6v4test/1000kb.bin"
#w6url="http://w6.labs.lacnic.net/v6v4test/1000kb.bin"
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@carlosm3011
carlosm3011 / ssh_config_osx_sierra
Last active June 20, 2018 19:59
ssh config tweaks for macOS Sierra
# macOS Sierra ssh config tweaks
# This file (or something similar) should go in $HOME/.ssh/config
# Permissions should be set to 0600
#
# Comments:
# UseKeychain: allow ssh-agent to read keys from macOS's keychain (avoiding the need to re-input passphrases all the time)
#
#
# PubKeyAccecptedKeyTypes: accept old pubkey types (needed for accesing older ssh implementations)
# KexAlgorithms: accept old style key exchanges