Skip to content

Instantly share code, notes, and snippets.

Barwon River Floods Geelong
https://www.youtube.com/watch?v=KG4xiJG8B3I
@segrax
segrax / dopus_setmetadata_vbscript
Created January 3, 2021 22:13
setting metadata via vbscript in directory opus
Set folderEnum = DOpus.FSUtil.ReadDir("d:\teststuff", False)
Do While (Not folderEnum.complete)
Set folderItem = folderEnum.Next
If (Not folderItem.is_dir) Then
Set cmd = DOpus.NewCommand()
strFileName = Mid(folderItem, InStrRev(folderItem, "\") + 1)
strDate = mid(strFileName, 1, InStr(strFileName, ".") - 1)
@segrax
segrax / ffmpeg
Created May 3, 2020 20:55
Useful FFMPEG commands
# Cut a video from 23 seconds in, for 7 seconds duration
ffmpeg -ss 00:00:23 -i videoplayback.mp4 -t 00:07 out.mp4
#transpose
# 0 = 90CounterCLockwise and Vertical Flip (default)
# 1 = 90Clockwise
# 2 = 90CounterClockwise
@segrax
segrax / Maniac.Mansion.C64.Disk.Info
Last active April 18, 2020 23:13
Maniac Mansion C64 Disk Layout Information
Table Offset:
0x102: Room Disk Number
0x139: Room Track / Sector (0x6E, 110 bytes)
Demo:
0x1F2: Script Room Numbers (0x37, 55 bytes)
0x292: Script Offsets (0x6E, 110 bytes)
@segrax
segrax / del_pending_posts.js
Last active April 14, 2020 11:42
Delete all pending posts in a Facebook group
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,
@segrax
segrax / ArchiveResume.sh
Created December 1, 2019 22:09
Check a remote server for a zfs send resume token, and resume transfer if found
#!/bin/sh
#
# ZFS Archive Resume Script
# Robert Crossfield
#
# Check for a zfs send resume token, and resume the transfer if found
# 26-05-2019
#
@segrax
segrax / keybase.md
Last active September 11, 2019 04:15

Keybase proof

I hereby claim:

  • I am segrax on github.
  • I am segra (https://keybase.io/segra) on keybase.
  • I have a public key ASA9pKIH1CrmtvUUNW2uu-nDF7DIfAAHrXMvvOXTSfiJLgo

To claim this, I am signing this object:

# Find Hidden Snapshots (failed zfs recv)
zdb -d <zpool> | grep %
# Free up ARC
sysctl vfs.zfs.arc_free_target=200000
#!/usr/bin/env bash
DIR="./etc/"
DOMAIN="localhost"
PASSPHRASE=""
SUBJ="
C=DE
ST=
O=
localityName=
commonName=$DOMAIN
@segrax
segrax / asm_notes.txt
Last active March 21, 2016 23:23
Assembly Notes
------------------------
CDECL calling convention 32 BIT
------------------------
void test_CDECL( int a, int b, int c, int d );
Four parameters to be pushed in right-to-left order
push 4 ; param d :esp -= 4
push 3 ; param c :esp -= 4
push 2 ; param b :esp -= 4