Skip to content

Instantly share code, notes, and snippets.

View sirgatez's full-sized avatar

Joshua Briefman sirgatez

  • ByteDance
  • San Jose, CA
  • 08:32 (UTC -07:00)
View GitHub Profile
@xtrasmal
xtrasmal / create_icns.sh
Last active March 28, 2025 23:55
Create a .icns file and/or png placeholders. Uses imagick to create the placeholders.
#!/bin/bash
# Icons and names
ICONS=(
"icon_16x16.png:16x16"
"[email protected]:32x32"
"icon_32x32.png:32x32"
"[email protected]:64x64"
"icon_128x128.png:128x128"
"[email protected]:256x256"
@ansarizafar
ansarizafar / macos-app-icon.md
Created October 16, 2023 04:04 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon

Installing the Broadcom wireless drivers on a Mac in Ubuntu, Debian, and Debian derivatives

#linux #mac #broadcom #hardware


⚠️ Although this procedure has been tested on a MacBook Air 6,2, it may vary depending on your hardware. If you have a different device or if your process differs from the instructions below, please leave a comment so that I can update this guide accordingly.

Before following the instructions below, make sure your machine is connected to a network. If your machine doesn't have an Ethernet adapter, you can use your phone's hotspot via USB.

@dduan
dduan / bird.swift
Created November 14, 2020 22:16
Flappy bird as a CLI app written in Swift.
// This is the code for the Flappy Bird game running in a Unix terminal.
// Demo: https://twitter.com/daniel_duan/status/1327735679657250816?s=21
// To run it, simply do "swift bird.swift" in a Unix command line.
#if canImport(Darwin)
import Darwin
#else
import Glibc
#endif
enum RawModeError: Error {
@dduan
dduan / runInRawMode.swift
Last active May 28, 2024 17:29
Put terminal in raw mode, clear the screen, run some code. Reset the terminal to original mode when the code finish running.
#if canImport(Darwin)
import Darwin
#else
import Glibc
#endif
enum RawModeError: Error {
case notATerminal
case failedToGetTerminalSetting
case failedToSetTerminalSetting
@pjobson
pjobson / apple_install_dates.md
Last active June 16, 2025 20:34
OSX Install Dates

Various Versions of macOS/OSX will fail on install for various reasons. You can fix them by disconnecting from your wifi or network or resetting your NVRAM. Booting from your USB stick, opening terminal and doing: date ########## where the # nubers are below. Format is: MMDDhhmmYY

10.16 - 0.5 Leopard   - date 0101010121 <- Currently not needed
10.15 - Catalina      - date 0101010120 <- Currently not needed
10.14 - Mojave        - date 0101010119 <- Currently not needed
10.13 - High Sierra   - date 0101010118

10.12 - Sierra - date 0101010117

@argp
argp / sandbox_i6s_13.3.1_profiles_vs_sandbox_iX_12.4_profiles.txt
Created February 7, 2020 16:43
iOS 13.3.1 vs iOS 12.4 sandbox profiles
$ diff -q sandbox_i6s_13.3.1_profiles/ sandbox_iX_12.4_profiles/ | /bin/grep Only
Only in sandbox_i6s_13.3.1_profiles/: adservicesd.sb
Only in sandbox_i6s_13.3.1_profiles/: akd.sb
Only in sandbox_i6s_13.3.1_profiles/: appsso.sb
Only in sandbox_i6s_13.3.1_profiles/: ArchiveService.sb
Only in sandbox_i6s_13.3.1_profiles/: asd.sb
Only in sandbox_iX_12.4_profiles/: assertiond.sb
Only in sandbox_i6s_13.3.1_profiles/: businesschatd.sb
Only in sandbox_i6s_13.3.1_profiles/: callservicesd.sb
Only in sandbox_i6s_13.3.1_profiles/: cfprefsd.sb
@qskwood
qskwood / wget-warc-generator
Last active May 1, 2024 17:21
This script uses wget to generate a WARC that can be read by a player like OpenWayback and places it into a directory. It also handles creation and use of CDX indexes for de-duplication.
#!/bin/bash
if [[ $# -ne 2 ]]; then
echo "Must only have two arguments, the URL and the collection" >&2
exit 1
fi
if [[ ! -d "/var/spool/openwayback/files2/${2}" ]]; then
mkdir "/var/spool/openwayback/files2/${2}"
fi
@bored-engineer
bored-engineer / 0_usage.md
Last active February 13, 2019 14:34
A jq script to generate strongly typed golang structures based on results from a GraphQL introspection query

Usage (using get-graphql-schema to fetch the schema):

get-graphql-schema https://hackerone.com/graphql --json | jq -rf graphql.jq

Supports Union types, Enum types, Interfaces, Input Objects and regular Objects.

See bored-engineer/hackeroni-ql for an example library generated with this script.

@haccks
haccks / postfix_mail_macosx.md
Last active January 9, 2025 00:23
Send mail from local host using postfix on MacOS High Sierra.

Setting up postfix on MacOS High Sierra

MacOS Sierra High comes with preinstalled postfix. Follow these steps to configure it on a local system:

1. Create a sasl_passwd file

sudo nano /etc/postfix/sasl_passwd
  • Add this to the file