Skip to content

Instantly share code, notes, and snippets.

View alexxroche's full-sized avatar
💭
🦀 Rust

Alexx Roche alexxroche

💭
🦀 Rust
View GitHub Profile
@alexxroche
alexxroche / list-fftabs.py
Last active August 15, 2023 10:28 — forked from tmonjalo/list-fftabs.py
List all Firefox tabs with title and URL
#! /usr/bin/env python3
"""
List all Firefox tabs with title and URL
Supported input: json or jsonlz4 recovery files
Default output: title (URL)
Output format can be specified as argument
"""
@alexxroche
alexxroche / docker_wordpress.md
Created April 5, 2019 22:38 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@alexxroche
alexxroche / totp.py
Last active September 30, 2018 22:38 — forked from acoster/totp.py
TOTP module for Python.
#!/usr/bin/env python2
""" Implementation of RFC 4226: HMAC-Based One-Time Password Algorithm (HTOP),
and RFC 6238: Time-Based One-Time Password Algorithm (TOTP).
"""
__author__ = 'acoster'
__copyright__ = 'Copyright 2012, Alexandre Coster'
__fixed__ = 'ver 20181001003525 alexx'
import hmac, time, base64, struct, hashlib, sys
/ipv6 firewall filter
add action=accept chain=input comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=input comment="Allow related connections" connection-state=related disabled=no
add action=accept chain=input comment="Allow limited ICMP" disabled=no limit=50/5s,5:packet protocol=icmpv6
add action=accept chain=input comment="Allow UDP" disabled=no protocol=udp
add action=drop chain=input comment="" disabled=no
add action=accept chain=forward comment="Allow any to internet" disabled=no out-interface=ether1
add action=accept chain=forward comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=forward comment="Allow related connections" connection-state=related disabled=no
add action=drop chain=forward comment="" disabled=no
@alexxroche
alexxroche / collatz.pl
Last active December 12, 2016 19:25
Collatz Conjecture perl
#!/usr/bin/env perl
# sudo yum install -y perl-Math-BigInt-GMP || sudo apt-get install -y libmath-bigint-gmp-perl
use strict;
use Math::BigInt lib => 'GMP';
my $in = $ARGV[0] || &help;
$in=~s/,//g;
$in = Math::BigInt->new($in);
sub help{print "What number?\n"; exit;}