Skip to content

Instantly share code, notes, and snippets.

View dlong500's full-sized avatar

Davison Long dlong500

  • Next Generation Technologies
  • Richmond, VA
View GitHub Profile
@dlong500
dlong500 / intercept-stdout.js
Created September 7, 2023 20:06 — forked from benbuckman/intercept-stdout.js
Hooking into Node.js stdout, pipe stdout to telnet
var _ = require('underscore'),
util = require('util');
// intercept stdout, passes thru callback
// also pass console.error thru stdout so it goes to callback too
// (stdout.write and stderr.write are both refs to the same stream.write function)
// returns an unhook() function, call when done intercepting
module.exports = function interceptStdout(callback) {
var old_stdout_write = process.stdout.write,
old_console_error = console.error;
@dlong500
dlong500 / ffmpeg.md
Created March 19, 2023 21:43 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
/*
* add-profile.c ... paste an ICC profile into a JPG file, without
* decompress/recompress.
*
* Adapted from wrjpgcom.c
*
* compile with:
*
* gcc -g -Wall add-profile.c `pkg-config glib-2.0 --cflags --libs`
*/
@dlong500
dlong500 / copy-from-time-machine.sh
Created June 27, 2022 16:45 — forked from magicoli/copy-from-time-machine.sh
Copy data from a Time Machine volume mounted on a Linux box.
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#
@dlong500
dlong500 / shell-setup.ps1
Created June 23, 2022 00:34 — forked from mikepruett3/shell-setup.ps1
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.