Skip to content

Instantly share code, notes, and snippets.

View cypnk's full-sized avatar
🤠
Out on a farm

Rustic Cyberpunk cypnk

🤠
Out on a farm
View GitHub Profile
@cypnk
cypnk / webpconvert.sh
Last active January 22, 2021 20:13
Convert .webp files to another image type (defaults to .png)
#!/bin/sh
# This snippet converts .webp images into another image format
# (.jpg, .png etc...)
#
# This assumes you already have libwebp installed
# The converted files are stored in the same folder unless another is given
#
# Usage:
# sh webpconvert.sh /path/to/files
@cypnk
cypnk / acme.sh
Created December 7, 2018 21:12
Domain certificate updater for acme-client for OpenBSD
#!/bin/bash
# Let's Encrypt ACME Client certificate auto-updater for OpenBSD
# This file can be added to /etc/daily.local to make it run each day
# Location of your ACME domains configuration for Let's Encrypt
CONF="/etc/acme-client.conf"
# Create a temporary file
$TMP=`mktemp -t domains.XXXXXXXXXX` || exit 1
@cypnk
cypnk / upgrade.sh
Created September 3, 2018 17:03
Generic upgrade script I use for my BunsenLabs (Debian) install
#!/bin/bash
apt-get update && apt-get dist-upgrade && sudo apt-get clean
exit
@cypnk
cypnk / spamhaus.sh
Last active February 1, 2018 23:04
Grab Spamhaus DROP list and create a pf compatible blocklist
#!/bin/sh
# This is an OpenBSD compatible shell script using the ftp utility
# to download the latest Spamhaus DROP list IP ranges and create a
# pf compatible IP list
# Files (make sure the PFDROP file actually exists)
PFDROP=/etc/blocklists/spamhaus
# Lists
@cypnk
cypnk / checkboxconf.html
Created January 6, 2018 16:59
Pure CSS checkbox confirmation (for deletions etc...)
<!DOCTYPE html>
<html>
<head>
<title>Delete confirmation</title>
<style>
body { font: 400 1em sans-serif; background: #f9f9ff; color: #444; }
label {
cursor: pointer;
}
@cypnk
cypnk / tint2
Created December 14, 2017 04:11
My Tint2 setup
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://bunsenlabs.org/topic/3232/my-tint2-config/
# Background definitions
@cypnk
cypnk / conkyrc
Created December 14, 2017 04:10
My Conky setup
# For commands above TEXT check:
# http://conky.sourceforge.net/config_settings.html
#
# For commands available below TEXT check:
# http://conky.sourceforge.net/variables.html
# Bunsen Labs Conky help threads
# http://crunchbang.org/forums/viewtopic.php?pid=371424#p371424
# beta tested by: smacz
@cypnk
cypnk / decrypt.sh
Last active October 17, 2017 00:02
Decrypt a file with a given private key (best for files encrypted with "encrypt.sh")
#!/bin/bash
# Decrypt a file using the specified private key
# Encrypted file
ENCF=$1
# Private key
PRVK=$2
# Decrypted file (defaults to the decrypted file name + ".decrypted")
@cypnk
cypnk / encrypt.sh
Created October 16, 2017 23:55
Encrypt a file with a given pubic key (to send to someone else)
#!/bin/bash
# Encrypt a file using the specified public key
# Source file
SRCF=$1
# Public key
PUBK=$2
# Encrypted file (defaults to the encrypted file name + ".encrypted")
@cypnk
cypnk / verify.sh
Created October 16, 2017 23:44
Verify a file with a given public key (best for files signed with "sign.sh")
#!/bin/bash
# Verify a signed file with the specified public key
# Signature file
SRCF=$1
# Public key location
PUBK=$2
# Signature algorithm (defaults to SHA-512)