Skip to content

Instantly share code, notes, and snippets.

View macleod-ee's full-sized avatar
🤖
Replicant? More likely than you would think.

Macleod Sawyer macleod-ee

🤖
Replicant? More likely than you would think.
View GitHub Profile
@supercheetah
supercheetah / Get-SwitchMACInfo.ps1
Last active October 9, 2024 02:56
A PowerShell script to get the MAC address tables from Cisco routers/switches
<#
.SYNOPSIS
This script gets MAC address tables from Cisco routers/switches running IOS using the SSH protocol.
.DESCRIPTION
There's a newer version of this here: https://github.com/supercheetah/winsysadmintools
The script uses the Plink (command line version of PuTTY, http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
to get the output of the command "show mac address-table" and put into a object array (i.e. table) that is outputted to
Out-GridView, and can optionally be saved to a CSV file.
@misterburton
misterburton / tumblr-delete-all-posts.js
Last active July 1, 2025 05:40
How to Delete All Tumblr Posts via JavaScript & the Browser Console
/*
Navitage to your mass post editor:
https://www.tumblr.com/mega-editor/[blog-name]
Open your browser's JavaScript Console and paste either of the following code snippets
*/
// delete 100 tumblr posts at a time (h/t Louis Lee: http://louisrli.github.io/blog/2013/05/11/how-to-delete-all-tumblr-posts/)
javascript:$('.overlay').slice(0, 100).click(); // you must now manually hit the 'delete' button at the top-right of the page
// delete all tumblr posts (h/t Hendry Sadrak [@hendrysadrak] a commenter on Li's above-linked post)
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active August 22, 2025 04:17
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@SeanSobey
SeanSobey / .gitattributes
Last active November 4, 2022 08:57
Git to diff zip (or any compressed) files. See this (https://tante.cc/2010/06/23/managing-zip-based-file-formats-in-git/) article.
*.[7z,xz,bzip2,gzip,tar,zip,wim,ar,arj,cab,chm,cpio,cramfs,dmg,ext,fat,gpt,hfs,ihex,iso,lzh,lzma,mbr,.msi,nsis,ntfs,qcow2,rar,rpm,squashfs,udf,uefi,vdi,vhd,vmdk,wim,xar,z] diff=archive
@jesstelford
jesstelford / 01-shape-up-to-kindle.md
Last active May 20, 2025 16:22
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@imclint21
imclint21 / RustSpa.rs
Created August 2, 2019 15:21
Making an SPA Application In Rust with Rocket
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
use std::io;
use std::path::{Path, PathBuf};
use rocket::response::NamedFile;
@john-doherty
john-doherty / cordova-file-storage.js
Last active August 2, 2023 10:32
An easy way to read/write files in Cordova
var fileStorage = {
/**
* Saves a file on the device
* @param {string} name - filename (can include sub folders)
* @param {string} data - file contents
* @param {boolean} useSandbox - uses protected sandbox if true, otherwise external (default false)
* @returns {Promise} executes .then with saved file path as first param
*/
write: function (name, data, useSandbox) {

D web development package

These are some recommended D web development packages from Dub you may need. These following are choosing because I've either personally used them or they have good documentation.

Any recommendation? Please let me know in the comments.

Web frameworks

  • vibe-d (its like Express.js from Node.js/Javascript)
  • hunt-framework (its like Laravel from PHP)

Json parsing and serialization

@COFFEETALES
COFFEETALES / EdgeChromium.ps1
Last active June 24, 2025 20:08
PowerShell, Winforms and WebView 2, the getting started app
Param ( [String]$URL = 'https://coffeetales.net', [String]$Mode = 'Default' )
If ( 'Default' -ieq $Mode ) {
#[String]$WindowsPowershellPath =
# [IO.Path]::Combine(
# ([String[]]@( [Environment]::SystemDirectory, 'WindowsPowerShell', 'v1.0', 'powershell.exe' ))
# )
[String]$PowerShellPath = Get-Process -Id $PID | Select-Object -ExpandProperty Path
Start-Process `
@no-defun-allowed
no-defun-allowed / selling-lisp-by-the-pound.org
Last active April 17, 2024 06:10
Selling Lisp by the pound

Selling Lisp by the Pound

“Paper late!” cried a voice in the crowd,

“Old man dies!” The note he left was signed,

‘Old Kiczales’ - it seems he’s drowned!