Skip to content

Instantly share code, notes, and snippets.

@segrax
segrax / Windows 7 Manual Installation
Last active June 9, 2016 21:28
Windows 7 manual installation
Overview
--------
Windows Setup has an issue when its booted from a Kingston USB3, setup refuses to allow installing to the hard drive
Instructions for installing Windows7
------------------------------------
Boot windows installation from USB drive
Press Shift+F10
If MF_NEW_LEG is not set, then do nothing at all
If MF_TURN is not set, then just walk one step
If MF_TURN is set
we have reached a walk target (may not be the users requested destination)
If MF_IN_LEG is set, we have reached our final destination/target. Stop Actor Moving completely
If MF_IN_NOT is not set, we have reached the current target
Check the walk box number, is it the final destination walk box
Yes: Set the next walk destination to the X/Y the user clicked, set MF_IN_LEG… do calcMovementFactor
No: Get the next walkbox, check its flags, calculate the point we should walk to inside this box (towards the final destination), do calcMovementFactor
@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
#!/usr/bin/env bash
DIR="./etc/"
DOMAIN="localhost"
PASSPHRASE=""
SUBJ="
C=DE
ST=
O=
localityName=
commonName=$DOMAIN
# Find Hidden Snapshots (failed zfs recv)
zdb -d <zpool> | grep %
# Free up ARC
sysctl vfs.zfs.arc_free_target=200000
@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:

@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 / 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 / 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 / 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