Skip to content

Instantly share code, notes, and snippets.

View wtfiwtz's full-sized avatar

Nigel Sheridan-Smith wtfiwtz

View GitHub Profile
@dmattera
dmattera / launchctl_man_pages.md
Last active December 13, 2024 20:39
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.
@KoryNunn
KoryNunn / handshake-airdrop.md
Last active March 12, 2024 07:03
Handshake airdrop for github users.

Had 15 github followers in 2019? You can get about $4kAUD of crypto for minimal effort.

Explain this scam

That's legitimately a good default position to hold, however, in this case, the free money is a function of time, and not only charity.

In February 2020, in order to promote Handshake (HNS) to developers, an airdrop was offered to any Github user with more than 15 followers. The Airdrop would give you 4246HNS, at the time worth around at $0.08USD per coin, for a total of $339.68USD, pretty generous!

Today, 4246HNS is worth around $4000 dollarydoos, and there are plenty of github users who haven't claimed theirs.

@LeZuse
LeZuse / 00_README.md
Last active February 11, 2025 03:08
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@progrium
progrium / README.md
Last active April 1, 2025 13:12
Setting up M1 Macs for x86 development with Homebrew

Key Points

  • In general, binaries built just for x86 architecture will automatically be run in x86 mode
  • You can force apps in Rosetta 2 / x86 mode by right-clicking app, click Get Info, check "Open using Rosetta"
  • You can force command-line apps by prefixing with arch -x86_64, for example arch -x86_64 go
  • Running a shell in this mode means you don't have to prefix commands: arch -x86_64 zsh then go or whatever
  • Don't just immediately install Homebrew as usual. It should most likely be installed in x86 mode.

Homebrew

Not all toolchains and libraries properly support M1 arm64 chips just yet. Although

@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active April 20, 2025 20:43
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@pavankjadda
pavankjadda / Serve Custom static resource locations in Spring Boot.md
Last active November 16, 2021 00:13
Serve Custom static resource locations in Spring Boot

Configure Spring Boot Application to serve Custom Static Resource locations

Static resources can be configured using two approaches in Spring Boot

  • Add custom path in application.properties/application.yaml
  • Implement WebMvcConfigurer addResourceHandlers() method

First configure your SpringSecurity class to accept requests to this resources

@Override
public void configure(WebSecurity web)
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 24, 2025 20:06
set -e, -u, -o, -x pipefail explanation
@devasat
devasat / aws-cli.sh
Last active June 9, 2024 04:18
AWS CLI Examples
# ********** EC2 ***********
# describe ec2 instances
aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].[InstanceId,Tags[?Key==`Name`].Value|[0],State.Name,
PrivateIpAddress,PublicIpAddress]' \
--output table
# stopped instances
@codeBelt
codeBelt / docs.md
Last active October 13, 2023 13:13
Firestore rules function examples
@pat
pat / Rakefile
Created July 25, 2018 03:29
Using ActiveRecord in a Rake-based application
require "bundler/setup"
load "active_record/railties/databases.rake"
task :environment do
require "./config/application"
require "my_app"
end