Skip to content

Instantly share code, notes, and snippets.

View taufikobet's full-sized avatar

Taufik Obet taufikobet

View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@slimsag
slimsag / ramblings.md
Last active December 13, 2023 08:02
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@pydevops
pydevops / gke-gce-cloud-armor-lb.sh
Created December 7, 2021 23:42 — forked from mikesparr/gke-gce-cloud-armor-lb.sh
Example Cloud Armor policies protecting Google HTTPS Global Load Balancer in front of GCE instance group and GKE cluster
#!/usr/bin/env bash
# REF: https://cloud.google.com/armor/docs/integrating-cloud-armor#with_ingress
# REF: https://cloud.google.com/armor/docs/configure-security-policies
# REF: https://cloud.google.com/iap/docs/load-balancer-howto
# REF: https://cloud.google.com/sdk/gcloud/reference/compute/url-maps/add-path-matcher
# REF: https://cloud.google.com/load-balancing/docs/https/setting-up-url-rewrite
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_USER=$(gcloud config get-value core/account) # set current user
@jrockway
jrockway / jsondiff.go
Created February 27, 2021 06:57
Diff JSON files
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"github.com/google/go-cmp/cmp"
)
@skeeto
skeeto / README.md
Last active December 20, 2021 14:00
AI driving simulation
@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 {
@RhetTbull
RhetTbull / vision.py
Last active April 26, 2024 13:58
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@gatopeich
gatopeich / Wii from SD card in 2020.md
Created July 12, 2020 12:34
Run Wii games from SD card in quick, safe and easy steps (2020 mini guide)

After spending days following some obsolete or incomplete or just too long and specific guides, here is my take on setting up a Wii in the year 2020

  1. Format SD card with 1 partition of 32kb clusters: sudo mkdosfs /dev/sdXX -s 128 -F 32. Up to 32GB SD-HC should work fine, despite what was said in old forums
  2. Install BootMii + HBC with LetterBomb: https://wiibrew.org/wiki/LetterBomb
  3. BACKUP your NAND with BootMii to be safe from bricking: https://sites.google.com/site/completesg/how-to-use/bootmii This is mostly for peace of mind though
  4. Install cIOS 249 base 56 v10 beta52 on slot 249 and base 57 on slot 250. This is the most complex step, be careful to follow the instructions here: https://sites.google.com/site/completesg/backup-launchers/installation
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers