Skip to content

Instantly share code, notes, and snippets.

View zchee's full-sized avatar
😩
want to Go knowledge...

Koichi Shiraishi zchee

😩
want to Go knowledge...
View GitHub Profile
## Where to find info and how to report on system extensions in macOS Catalina+
# Staged system extensions location in folder based on unique ID
/Library/SystemExtensions/
# Info on each
/Library/SystemExtensions/db.plist
Includes...
- state (enabled, activated, etc.)
- associated launchd plists
ARCH ?= arm64
VERSION ?= 20.10
SPIN ?= live-server
vftool ?= ./vftool/build/vftool
DATA ?= ./data
ISO := ubuntu-$(VERSION)-$(SPIN)-$(ARCH).iso
MOUNTPOINT := /Volumes/Ubuntu
CD := $(DATA)/$(ISO)
@zchee
zchee / parse_yaml.sh
Created January 26, 2021 15:37 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@zchee
zchee / install_jman.sh
Created December 16, 2020 19:28 — forked from ay65535/install_jman.sh
日本語manページをインストールするスクリプト (Mac用,というか自分用)
#!/usr/bin/env bash
# 参考サイト: http://tukaikta.blog135.fc2.com/blog-entry-224.html
# ================各種設定================
# ダウンロードするファイル (GNU 日本語man)
#
# http://linuxjm.sourceforge.jp/ からダウンロードするファイルを指定します。
#export GNUJMAN=man-pages-ja-20120915.tar.gz
#export GNUJMAN=man-pages-ja-20150315.tar.gz
@zchee
zchee / process_names.txt
Created December 10, 2020 10:08 — forked from miguelmota/process_names.txt
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@zchee
zchee / ANSI.md
Created February 13, 2020 03:31 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@zchee
zchee / Public_Time_Servers.md
Created May 24, 2020 08:27 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@zchee
zchee / fastaltmod.c
Created May 19, 2020 22:09 — forked from lemire/fastaltmod.c
fast alternative to the modulo reduction (code sample)
#include <iostream>
#include <cstdint>
using namespace std;
// we are going to generate random numbers using
// an xorshift generator
static uint32_t xorshift_y;
@zchee
zchee / build-xnu-6153.11.26.sh
Created April 27, 2020 11:31 — forked from knightsc/build-xnu-6153.11.26.sh
A script to build XNU version 6153.11.26 (macOS Catalina 10.15).
#! /bin/bash
#
# build-xnu-6153.11.26.sh
# Scott Knight
#
# Based on the script by Brandon Azad
# https://gist.github.com/bazad/654959120a423b226dc564073b435453
#
# A script showing how to build XNU version 6153.11.26 on macOS Catalina
# 10.15 with Xcode 11.13.1.
@zchee
zchee / EndpointSecurityDemo.m
Created April 3, 2020 16:32 — forked from Omar-Ikram/EndpointSecurityDemo.m
A demo of using Apple's new EndpointSecurity framework - tested on macOS Catalina 10.15 (19A583)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - Catalina 10.15 (19A583)
//
#import <Foundation/Foundation.h>