Skip to content

Instantly share code, notes, and snippets.

View dctucker's full-sized avatar
🎹
doing stuff using keyboards

Casey Tucker dctucker

🎹
doing stuff using keyboards
View GitHub Profile
@dctucker
dctucker / Apple_mobile_device_types.txt
Last active October 26, 2026 18:04 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@dctucker
dctucker / nautilus-super.patch
Created August 13, 2025 19:19
Patch for GNOME Files to use <Super> instead of <Control> for accelerators
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index d1649e5c7..c93d6779f 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -2620,7 +2620,7 @@ on_key_pressed (GtkEventControllerKey *controller,
if ((state & modifiers) == GDK_SHIFT_MASK)
open_flags = NAUTILUS_OPEN_FLAG_NEW_TAB;
- else if ((state & modifiers) == GDK_CONTROL_MASK)
+ else if ((state & modifiers) == GDK_SUPER_MASK)
event_time command_type convert(argument using utf8)
2023-10-19 22:58:12.825251 Connect github@::1 on github_enterprise using TCP/IP
2023-10-19 22:58:12.825472 Query select @@version_comment limit 1
2023-10-19 22:58:12.825619 Query SELECT 1 AS output
2023-10-19 22:58:12.825721 Quit
2023-10-19 22:58:13.054476 Connect github@::1 on github_enterprise using TCP/IP
2023-10-19 22:58:13.054772 Query select @@version_comment limit 1
2023-10-19 22:58:13.054956 Query SHOW TABLES LIKE 'schema_migrations'
2023-10-19 22:58:13.058011 Quit
2023-10-19 22:58:13.244884 Connect github@::1 on github_enterprise using TCP/IP
#!/bin/bash
declare -A object_counts=( [spokes_network]=0 [spokes_gist]=0 [pages]=0 [storage]=0 )
assoc2json() {
declare -n dict=$1
for key in "${!dict[@]}"; do
printf '%s\0%s\0' "$key" "${dict[$key]}"
done |
jq -Rs '
@dctucker
dctucker / FlashStorage-partial.h
Created June 23, 2023 06:11
flash storage settings struct
typedef struct {
uint8_t
firmwareVersion, // 0
reserved_0, // 1
ramSize, // 2
reserved_1[9]; // 3 .. 11
struct {
uint8_t
voltsPerOctave[2], // 12
transpose[2], // 14
@dctucker
dctucker / lint.sh
Created June 15, 2023 23:52
run clang-format in Docker for DelugeFirmware
#!/bin/bash
cd "$(dirname "$0")"
run_args=(
-it
-v $(pwd):/tree
--rm
--workdir /tree
)
@dctucker
dctucker / 70-ec2-nvme-devices.rules
Created February 14, 2019 22:59 — forked from jalaziz/70-ec2-nvme-devices.rules
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@dctucker
dctucker / mark_read.sh
Created April 19, 2018 23:13
This uses the GitHub API to mark notifications as read if they meet a certain criteria (closed/merged/OoO/Backport/etc)
#!/bin/bash
mark_read() {
id=$1
curl -H "$CURLH" -s -X PATCH $API/notifications/threads/$id
}
CURLH="Authorization: token $GITHUB_TOKEN"
API=https://api.github.com

Keybase proof

I hereby claim:

  • I am dctucker on github.
  • I am dctucker (https://keybase.io/dctucker) on keybase.
  • I have a public key ASBZfm2rC5JytgnqrPa0ulPQ6k1KTpIe0czQHL9TqX8Rqgo

To claim this, I am signing this object:

@dctucker
dctucker / open_github.vim
Created March 13, 2018 15:54
Vimscript for opening the current file in GitHub for Mac
function! OpenGithub()
" let l:pwd = expand("%:p:h:t")
let l:branch = systemlist("git -C " . expand("%:p:h") . " symbolic-ref --quiet --short HEAD || git rev-parse --short HEAD")[0]
let l:root = systemlist("git -C " . expand("%:p:h") . " rev-parse --show-toplevel")[0]
let l:repo = fnamemodify(l:root, ":t")
let l:fn = substitute(expand("%"), escape(l:root, "/"), "", "g")
exec "!open https://github.com/github/" . l:repo . "/blob/" . l:branch . l:fn
endfunction
command! -nargs=0 GH call OpenGithub()