Skip to content

Instantly share code, notes, and snippets.

View ilessing's full-sized avatar

Ian Lessing ilessing

  • UCSB Library
  • SoCal
View GitHub Profile
@adamamyl
adamamyl / macos26-breaks-custom-dns.md
Last active March 23, 2026 22:03
Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Ah, the joys of waking up to find the Mac's done an overnight upgrade… and erm, suddenly things stop working. Thankfully, me and Claude managed to work out what the fuck is going on… I'm sharing here, as well as having raised in on https://feedbackassistant.apple.com/feedback/22280434 (that seems to need a login?).

Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Product: macOS 26.3.1 (Darwin 25.3.0, Build 25D771280a) Component: Networking → DNS / mDNSResponder Regression from: macOS 25.x 26.3.0 (working immediately prior to overnight update)


@bradtraversy
bradtraversy / myscript.sh
Last active February 22, 2026 04:29
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@eliotjordan
eliotjordan / marc.go
Last active July 2, 2019 19:47
Process MARC XML with golang
package main
import (
"encoding/xml"
"fmt"
"strings"
"time"
"io/ioutil"
"os"
)
@bladeSk
bladeSk / SQLite-PHP-quickstart.php
Last active March 6, 2026 08:04
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@iamluc
iamluc / symfony_docker-compose.yml
Last active December 10, 2022 13:25
Exemple of a simple docker-compose file for Symfony project with official images
#
# to execute a command in the container:
# docker exec -it XXX_web_1 su www-data -c "php app/console"
#
web:
# container_name: sf
image: php:apache
ports:
- 8888:80
@wholmgren
wholmgren / use-bbdiff
Last active August 11, 2024 22:18
set git difftool to bbdiff
git config --global diff.tool bbdiff
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global merge.tool bbdiff
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
Double check ~/.gitconfig

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@logicaroma
logicaroma / .aliases.md
Created August 14, 2013 23:17
alias shortcuts for osx and git terminal commands

Easier navigation: .., ..., ...., ....., ~ and -

alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias .....="cd ../../../.." alias ~="cd ~" # cd is probably faster to type though alias -- -="cd -"

Shortcuts

alias d="cd ~/Documents/Dropbox"

@willurd
willurd / web-servers.md
Last active March 23, 2026 11:18
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active June 15, 2025 17:57
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.