Skip to content

Instantly share code, notes, and snippets.

View hansdg1's full-sized avatar

Hans Guthrie hansdg1

View GitHub Profile
@pascalpoitras
pascalpoitras / 1.md
Last active August 17, 2025 13:22
My WeeChat configuration

This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.

@dotwaffle
dotwaffle / sort.sh
Created December 4, 2013 15:49
I'd done the following in weechat: /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" I was looking for a way of moving my old logs into this new format -- some of them were huge, and it was a pain backing them up. Having been asked on more than one occasion for a copy of the script I wrote to do this for me, I decided to publish it here. Tada.
#!/bin/bash
# place in .weechat/logs and run it.
for file in *.weechatlog
do
while read line
do
if [[ ! -d ${line:0:4}/${line:5:2} ]]
then
@lisamelton
lisamelton / transcode-video.sh
Last active April 29, 2025 20:17
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@tommybutler
tommybutler / smartcheck.sh
Last active February 21, 2025 08:28
Script to quickly scan the S.M.A.R.T. health status of all your hard drive devices in Linux (at least all the ones from /dev/sda to /dev/sdzz). You need smartctl installed on your system for this script to work, and your hard drives need to have S.M.A.R.T. capabilities (they probably do).
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
if sudo true
then
true
else
echo 'Root privileges required'
@hofmannsven
hofmannsven / README.md
Last active July 30, 2025 13:50
Git CLI Cheatsheet
@terrywang
terrywang / jdk.sh
Last active March 27, 2019 05:33
Oracle JDK Download Script, the magic cookie comes from oab-java6 ;-) It **ONLY** works for latest Oracle JDK 7 and 8 update releases.
#!/bin/bash
# --------------------------------------
#
# Title: Oracle JDK Download Script
# Author: Terry Wang
# Email: i (at) terry (dot) im
# Homepage: http://terry.im
# File: jdk.sh
# Created: 28 August, 2013
#
@lisamelton
lisamelton / encode.sh
Last active May 23, 2025 12:46
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
git clone git://github.com/sivel/speedtest-cli.git speedtest-cli
#!/usr/bin/env python2
#
# Find and replace tracker urls in a Deluge torrents.state
import os
import sys
import platform
import shutil
import cPickle
@robby1066
robby1066 / deal-with-me-google-apps-script.js
Last active March 20, 2021 22:14
A short Google Apps script that will label any starred items in your inbox that are older than 14 days with a "DEAL WITH ME" label. Go to https://developers.google.com/apps-script/reference/gmail/ for documentation.
/**
* Get the "DEAL WITH ME" label, or create it if it doesn't exist
* This is called by the other two functions, you shouldn't need to call it directly
*/
function _getNaggingLabel() {
/**
* If you'd like your label to say something different, modify it here
*/
var nagging_label_text = "DEAL WITH ME";