Skip to content

Instantly share code, notes, and snippets.

View incanus's full-sized avatar

Justin R. Miller incanus

View GitHub Profile
@chockenberry
chockenberry / df.sh
Created March 4, 2024 18:51
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | cut -f 3 -w`

Pansharpening notes, mid-2021

First posted in August 2021. This is basically a snapshot of my thinking about pansharpening at that time; I’m not making any substantial updates. Last typo and clarity fixes in February 2023.

Preface

This is a collection of notes on how I’ve been approaching convolutional neural networks for pansharpening. It’s an edited version of an e-mail to a friend who had asked about this tweet, so it’s informal and somewhat silly; it’s not as polished as, say, a blog post would be. It’s basically the advice I would give to an image processing hobbyist before they started working on pansharpening.

If you want a more serious introduction, start with the literature review in Learning deep multiresolution representations for pansharpening. Most of the academic work I would recommend is mentioned there.

@ctsrc
ctsrc / README.md
Last active April 16, 2024 05:37 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@ziadoz
ziadoz / icloud_tabs_to_csv.sh
Last active May 26, 2020 20:07
Export iCloud Tabs/URLs to CSV
#!/usr/bin/env bash
alias icloud_tabs='sqlite3 -header -csv ~/Library/Safari/CloudTabs.db "select ctd.device_name, ct.title, ct.url from cloud_tabs as ct inner join cloud_tab_devices as ctd on ctd.device_uuid = ct.device_uuid order by device_name asc, position asc"'
# Output to CSV file:
icloud_tabs > icloud_tabs.csv
# Unique CSV:
sort -u icloud_tabs.csv -o icloud_tabs_unique.csv
# Merge CSVs:
import json
import sqlite3
import zlib
# ~/Library/Safari/CloudTabs.db
# Ref: https://www.reddit.com/r/mac/comments/89qx5n/iphone_safari_tabs_into_text_list_via_icloud/
db = sqlite3.connect('CloudTabs.db')
tabs = []
@fnky
fnky / ANSI.md
Last active April 23, 2024 22:45
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@alexxxdev
alexxxdev / gist:1dd024cadea091ca64154f9616d5739a
Created August 16, 2018 15:08
remote: fatal: pack exceeds maximum allowed size
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
@SeppPenner
SeppPenner / Installing Python 3.7.4 on Raspbian.rst
Last active January 8, 2024 12:33
Installing Python 3.7.4 on Raspbian

Installing Python 3.7.4 on Raspbian =================================

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).

/* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */
#define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand"
#define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs"
#define GET_HOSTNAME "sudo raspi-config nonint get_hostname"
#define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s"
#define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli"
#define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin"
#define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1"
#define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2"
#define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3"
@mems
mems / icloudtabs2md.js
Last active February 26, 2023 21:38
Generate a markdown links list from iCloud tabs
#!/usr/bin/env node
/*
Generate a markdown links list from iCloud tabs, on macOS
Usage:
./icloudtabs2md.js > icloudtabs.md
./icloudtabs2md.js | pbcopy
Require: