Skip to content

Instantly share code, notes, and snippets.

@mariow
mariow / moshalias.pl
Last active August 31, 2023 11:13 — forked from lexande/moshalias.pl
#!/usr/bin/perl
my $ssh=`which ssh`;
my $mosh=`which mosh`;
chomp($ssh);
chomp($mosh);
my $host;
my $unsupported=0;
for (my $i=0; $i <= $#ARGV; $i++) {
@mariow
mariow / brave-0.56.12-PKGBUILD
Created November 10, 2018 20:32
PKGBUILD to update brave-bin on Arch/Manjaro to 0.56.12 kind-of-stable
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Jacob Mischka <jacob@mischka.me>
# Maintainer: Manuel Mazzuola <origin.of@gmail.com>
# https://aur.archlinux.org/packages/brave-bin/
pkgname=brave-bin
pkgver=0.56.12
pkgrel=1
pkgdesc='Web browser that blocks ads and trackers by default (binary release).'
arch=('x86_64')
Verifying my Blockstack ID is secured with the address 1NsWeGdo5ptXRh9TjyY1DV8pgzpMNXPPNi https://explorer.blockstack.org/address/1NsWeGdo5ptXRh9TjyY1DV8pgzpMNXPPNi
@mariow
mariow / ns1-deleteall.sh
Created March 16, 2017 13:36
In case you ever have the need to delete all zones from your account at NS1.net via a script: this will do the job.
#!/bin/bash
#
# WARNING: This script will delete all zones from an account at nsone.net via the API, USE WITH CARE
#
NSONEKEY="YOURKEYHERE"
curl -X GET -H "X-NSONE-Key: $NSONEKEY" https://api.nsone.net/v1/zones > zones.json
perl -ane 'while (/zone":"([^"]+?)"/g) { print $1."\n" }' < zones.json > zones-left.txt
wc -l zones-left.txt
@mariow
mariow / gist:e4b8559550fe60112bc2e47da79c43df
Created April 25, 2016 07:23
Onename Blockchain Verification
Verifying that +mariow is my blockchain ID. https://onename.com/mariow
@mariow
mariow / ssl123-elb.sh
Last active January 11, 2016 14:10
Setting up Thawte SSL123 on Amazon ELB
# Generate CSR
openssl req -out my.csr -new -newkey rsa:2048 -nodes -keyout my.key
# convert key to rsa
openssl rsa -in my.key -out my.rsa
# fetch secondary CA cert (https://forums.aws.amazon.com/thread.jspa?messageID=278399# )
wget https://search.thawte.com/library/VERISIGN/ALL_OTHER/thawte%20ca/SSL123_SecondaryCA.pem
# upload to Amazon
@mariow
mariow / json_pretty_alias.sh
Created June 20, 2013 10:00
json_pretty < ugly.json
alias json_pretty="json_xs -f json -t json-pretty"
@mariow
mariow / gist:5309959
Created April 4, 2013 12:28
Copy file contents to clipboard (OSX console)
cat file | pbcopy
@mariow
mariow / convert-m4a-mp3.sh
Created March 27, 2013 11:57
Convert m4a to mp3
ffmpeg -i input.m4a -acodec libmp3lame -ab 320k ouput.mp3
@mariow
mariow / secondsshd.sh
Created August 4, 2012 06:40
Start second sshd process
# remember to open port 223 in iptables!
/usr/sbin/sshd -Dd -p 223