Skip to content

Instantly share code, notes, and snippets.

View lrstanley's full-sized avatar
👋
Busy. All the time.

Liam Stanley lrstanley

👋
Busy. All the time.
View GitHub Profile
@lrstanley
lrstanley / ddns.sh
Created December 10, 2018 05:31
Simple Cloudflare DDNS (Dynamic DNS) updating script in bash
#!/bin/bash
# Copyright (c) 2018 Liam Stanley <me@liamstanley.io>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@lrstanley
lrstanley / mysite.service
Created March 25, 2019 01:47
example simple systemd file (go sites?)
; can go in /etc/systemd/system/mysite.service
; make sure to:
; $ systemctl enable <app>
; $ systemctl start <app>
[Unit]
Description=mysite
Wants=network-online.target
After=network-online.target
[Service]
@lrstanley
lrstanley / sample-output.json
Created September 23, 2020 00:36
src-todo sample output
{
"results":{
"started_timestamp":"2020-09-22T20:35:44.0279098-04:00",
"completed_timestamp":"2020-09-22T20:35:44.4228067-04:00",
"clone_milliseconds":387,
"processing_milliseconds":6,
"log_output":"Enumerating objects: 33, done.\nCounting objects: 3% (1/33)\rCounting objects: 6% (2/33)\rCounting objects: 9% (3/33)\rCounting objects: 12% (4/33)\rCounting objects: 15% (5/33)\rCounting objects: 18% (6/33)\rCounting objects: 21% (7/33)\rCounting objects: 24% (8/33)\rCounting objects: 27% (9/33)\rCounting objects: 30% (10/33)\rCounting objects: 33% (11/33)\rCounting objects: 36% (12/33)\rCounting objects: 39% (13/33)\rCounting objects: 42% (14/33)\rCounting objects: 45% (15/33)\rCounting objects: 48% (16/33)\rCounting objects: 51% (17/33)\rCounting objects: 54% (18/33)\rCounting objects: 57% (19/33)\rCounting objects: 60% (20/33)\rCounting objects: 63% (21/33)\rCounting objects: 66% (22/33)\rCounting objects: 69% (23/33)\rCounting objects: 72%
@lrstanley
lrstanley / url_collector.ini
Last active February 28, 2021 00:27
mIRC URL collector/GUI viewer
on 1:TEXT:*http*//*:#:{
var %url = $wildtok($1-, http://*, 1, 32)
if (%url == $NULL) { return }
if ($read(banurls.txt,wn,* $+ %url $+ *) != $NULL) { return }
if ($read(urls.txt,wn,* $+ %url $+ *) == $NULL) {
write urls.txt - $fulldate - $chan ( $+ $nick $+ ): $1-
}
}
alias urlrec {
if ($dialog(UR.Main)) dialog -v UR.Main
@lrstanley
lrstanley / yt_disable_watchlater_autoplay.js
Last active February 2, 2022 00:24
Voilent/Tamper/Grease Monkey scripts for YouTube
// ==UserScript==
// @name YouTube Disable Watch Later Autoplay
// @namespace lrstanley
// @match https://www.youtube.com/*
// @grant none
// @version 1.0.4
// @downloadURL https://gist.githubusercontent.com/lrstanley/789622b4c196c33d4e122bdc5d01da39/raw/yt_disable_watchlater_autoplay.js
// @updateURL https://gist.githubusercontent.com/lrstanley/789622b4c196c33d4e122bdc5d01da39/raw/yt_disable_watchlater_autoplay.js
// @author Liam Stanley
// @description This script disables the auto-play functionality for "Watch later" playlists. Watch later playlists ignore the user-configured auto-play option, so there is no way to disable it by default.
@lrstanley
lrstanley / selfupdate_example.go
Created May 14, 2023 15:18
Example of self-updating from a nexus repository
package main
import (
"context"
"crypto/tls"
"fmt"
"io"
"net/http"
"os"
"regexp"
@lrstanley
lrstanley / tunnel_4to6.py
Last active July 12, 2023 22:27
How to use tunnelbroker tunnels on KVM/OpenVZ/etc. (Debian)
"""
HE-2-4 Copyright (C) 2014 Liam Stanley
License: Eiffel Forum License, version 2
- https://links.ml/FFa1
Website: https://liamstanley.io
NOTE: THIS IS FOR KVM BASED SERVERS ONLY.
I'M NOT ADDING CUSTOM CHECKS TO SEE IF
YOU'RE USING KVM.
"""
Copyright (c) Liam Stanley <liam@liam.sh>. All rights reserved. Use of
this source code is governed by the MIT license that can be found in
the LICENSE file.