Skip to content

Instantly share code, notes, and snippets.

<begin python script>
# test.py
def chunks(l, n):
"""Yield successive n-sized chunks from l."""
for i in range(0, len(l), n):
yield l[i:i + n]
all_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
chunked_list_ids=chunks(all_ids,5)
@ridingintraffic
ridingintraffic / 01 - hidden.ovpn
Last active January 13, 2019 02:55
openvpn as a systemd service with PS1 alerting
.....
.....
auth-user-pass /home/linuxuser/pass.txt
ap42:secrets user$ cat test
USERNAME=zerocool
PASSWORD=crash_override
ap42:secrets user$ ./secret.sh test
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
ap42:secrets user$ ls
secret.sh test.enc
Python:
import os
print(os.environ['USERNAME'])
print(os.environ['PASSWORD'])
Docker:
docker run --env USERNAME=$USERNAME --env PASSWORD=$PASSWORD -- name docker-nginx -p 8080:80 -d nginx
#!/bin/sh
# NOTE: This script uses tabs for indentation
errcho() {
echo "$@" >&2
}
USAGE="Usage: $0 [keyboard[:keymap[:target]]]"
# Check preconditions
#!/usr/bin/env bash
# crypto lock your own files with no way of recovering them but leaves the encrypted file behind.
# to give you 'hope'
# the file is sequentially encrypted 10 times with a different 100 length hexcode every time
# the original file is then overwritten 20 times
help() {
echo "$0:"
echo " usage:"
echo " $0 /path/to/the/file/to-make-go-away.txt"
echo " $0 "