Skip to content

Instantly share code, notes, and snippets.

View rickyhewitt's full-sized avatar

Ricky Hewitt rickyhewitt

View GitHub Profile
@rickyhewitt
rickyhewitt / xfce-appentry-optimize
Created February 22, 2012 14:50
xfce-appentry-optimize
#!/usr/bin/env python
## appentry-optimize [0.3.1]
##
## A program to optimize .desktop files in freedesktop.org compliant
## desktops.
##
## Requires: Python 2.x
##
## Licensed under the GNU GPL
## Programming by Ricky Hewitt [kahrn]
@rickyhewitt
rickyhewitt / dd.py
Last active October 18, 2021 22:03
dd.py -- A frontend for dd.
#!/usr/bin/env python
"""
dd.py
dd.py provides a wrapper around the standard
dd command. Provides status updates through
the use of the -USR1 signal.
Updated for Python 3 04/01/16
#!/bin/bash
#
# Install/Uninstall Froxlor for RPi/Raspbian
#
# http://rasptorial.com/server/froxlor-webserver
# Courier screen select 'no' to web directories.
# Postfix screen select 'internet site'. 'mail name' should be the server's domain.
# Proftpd screen, select 'standalone'.
# MySQL screen, enter a password.
#
@rickyhewitt
rickyhewitt / install-logwatch.sh
Created February 3, 2016 11:45
Logwatch install example.
#!/usr/bin/env bash
#
# Setup logwatch
# Make sure you already have logwatch (apt-get install logwatch)
#
# <[email protected]>
echo "[ Configuring logwatch... ]"
# Writing main config
@rickyhewitt
rickyhewitt / createswap.sh
Last active September 27, 2019 10:54
Quick and easy script to setup swap
#!/bin/sh
# createswap.sh
# creates swap file.
# Optionally specify size (e.g. 1024M)
# If no size is specified, default to physical memory / 4
#
# <[email protected]>
if [ $1 ]; then
SWAP_SIZE=$1
@rickyhewitt
rickyhewitt / openvpn-status.py
Created March 15, 2019 14:52 — forked from gregarmer/openvpn-status.py
Simple OpenVPN Status
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# OpenVPNStatus class adapted from
# https://gist.github.com/gregarmer/5a6c096be858580da889
# Gregory Armer (https://sigterm.sh/)
#
class OpenVPNStatus:
def __init__(self):
@rickyhewitt
rickyhewitt / nginx-pagespeed-autoinstall-ubuntu-bionic.sh
Created March 17, 2019 00:32
Nginx with pagespeed build/install/config script for Ubuntu Bionic (18.04)
#!/bin/bash
# custom nginx install script
#
set -e
NGINX_STRING="nginx-1.14.2"
PAGESPEED_STRING="1.13.35.2-stable"
PSOL_STRING="1.13.35.2-x64"
@rickyhewitt
rickyhewitt / do-dyndns.sh
Last active December 2, 2021 19:00
dyndns script for digitalocean, with ipv6 support
#!/bin/bash
# Original script by https://salvatorelab.com/2020/10/how-to-point-a-domain-to-your-dynamic-home-ip-address/
# IPv6 additions by rickyh.me
# To obtain RECORD_IDs:
# curl GET -H "Content-Type: application/json" \
# -H "Authorization: Bearer TOKEN" \
# https://api.digitalocean.com/v2/domains/yourdomain.info/records | json_pp
#################### CHANGE THE FOLLOWING VARIABLES ####################
@rickyhewitt
rickyhewitt / kevin-image.html
Last active June 11, 2023 02:27
kevin-image-css
<div style="margin-right: 180px; margin-bottom: 135px; height: 1px; width: 1px; box-shadow: #7099d1 0 0,#7099d1 0 1px,#739cd4 0 2px,#7da2d6 0 3px,#8babda 0 4px,#9cb4e0 0 5px,#a7bee0 0 6px,#b1c5e6 0 7px,#aec5e6 0 8px,#a2b8df 0 9px,#bbceeb 0 10px,#c2d4ec 0 11px,#c4d6ee 0 12px,#c7d7ee 0 13px,#c8d7ee 0 14px,#c9d8ef 0 15px,#ccdbf2 0 16px,#cbdaf1 0 17px,#cddcf3 0 18px,#cfdef3 0 19px,#d8e3f5 0 20px,#dde9f9 0 21px,#dde9f9 0 22px,#dce7f9 0 23px,#d8e5f8 0 24px,#d1dff4 0 25px,#c9d9f2 0 26px,#c3d4f0 0 27px,#b4c9e8 0 28px,#b2c7e6 0 29px,#c0d1ea 0 30px,#c9d8ef 0 31px,#cad9ee 0 32px,#cbdaef 0 33px,#c6d6ed 0 34px,#c4d5ee 0 35px,#bbcfea 0 36px,#b1cae9 0 37px,#a7c4e8 0 38px,#9abbe6 0 39px,#87afe2 0 40px,#91b6e3 0 41px,#9cbbe7 0 42px,#98b7e3 0 43px,#97b9e6 0 44px,#95b7e4 0 45px,#93b7e4 0 46px,#8fb5e6 0 47px,#8ab2e5 0 48px,#87b2e3 0 49px,#8eb4e5 0 50px,#87b1e3 0 51px,#8ab2e3 0 52px,#88b2e4 0 53px,#87b1e3 0 54px,#87b1e3 0 55px,#88b2e4 0 56px,#88b2e4 0 57px,#89b3e5 0 58px,#8bb3e4 0 59px,#8bb3e4 0 60px,#8bb3e4 0 61px,#8db5e6 0 62px