Skip to content

Instantly share code, notes, and snippets.

@digilist
digilist / self_signed_ssl.sh
Created March 18, 2013 18:21
This script automatically generates a self-signed ssl certificate and removes its passphrase.
#!/bin/bash
ssl_dir="./ssl"
mkdir -p $ssl_dir
pass=`pwgen -n 100 -1`
openssl genrsa -des3 -out $ssl_dir/server.key -passout pass:$pass 2048
openssl req -new -key $ssl_dir/server.key -out $ssl_dir/server.csr -passin pass:$pass
cp $ssl_dir/server.key $ssl_dir/server.key.org
openssl rsa -in $ssl_dir/server.key.org -out $ssl_dir/server.key -passin pass:$pass
@digilist
digilist / delay.sh
Created June 2, 2015 14:29
Delaying network traffic to a specific IP
#!/bin/bash
interface=lo
ip=10.0.0.1
delay=100ms
tc qdisc add dev $interface root handle 1: prio
tc filter add dev $interface parent 1:0 protocol ip prio 1 u32 match ip dst $ip flowid 2:1
tc qdisc add dev $interface parent 1:1 handle 2: netem delay $delay
-- http://www.numbers2words.com/learn_more.php/?selected=dk
bigNnumbers :: Int -> (String, String)
bigNnumbers 1 = ("et tusind", "tusinde")
bigNnumbers 2 = ("en million", "millioner")
bigNnumbers 3 = ("en milliard", "milliarder")
bigNnumbers 4 = ("en billion", "billioner")
bigNnumbers 5 = ("en billiard", "billiarder")
pronounceNumber :: Int -> String
<?php
namespace App\Form\Extension;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\Translation\TranslatorInterface;

Keybase proof

I hereby claim:

  • I am digilist on github.
  • I am digilist (https://keybase.io/digilist) on keybase.
  • I have a public key ASCbVDREN2zkPzNbm5In4KV_ATE8l9BPm1x9qyZWh4kKKgo

To claim this, I am signing this object:

@digilist
digilist / script.bash
Created August 9, 2022 17:37
Yarn Berry Licenses Export as CSV
yarn info --manifest --json --all --recursive | \
jq -s -c -r '["package", "version", "license"], (.[] | [(.value|sub("@npm.*"; "")), .children.Version, .children.Manifest.License]) | @tsv' \
> licenses.csv