Skip to content

Instantly share code, notes, and snippets.

@khanlou
khanlou / SKSerialInputStream.h
Last active November 10, 2022 11:41
Partially adapted from AFMultipartBodyStream
//
// SKSerialInputStream.h
// inputstream
//
// Created by Soroush Khanlou on 11/4/18.
// Copyright © 2018 Soroush Khanlou. All rights reserved.
//
#import <Foundation/Foundation.h>
@ccstone
ccstone / Raw_AppleScript_Event_Codes_2006.tsv
Last active May 10, 2024 15:46
Raw AppleScript Event Codes (2006)
Code Terminology Kind Usage Line
$scr scripting additions folder Property of class: domain System Events : Disk-Folder-File Suite 1
%doc music folder Property of class: user domain object System Events : Disk-Folder-File Suite 2
µdoc music folder Enumeration Standard Additions : File Commands 3
ƒhlp help Enumeration Standard Additions : File Commands 4
ƒhlp help folder Enumeration Standard Additions : File Commands 5
ƒlib shared libraries Enumeration Standard Additions : File Commands 6
ƒlib shared libraries folder Enumeration Standard Additions : File Commands 7
ƒmod modem scripts Enumeration Standard Additions : File Commands 8
ƒmod modem scripts folder Enumeration Standard Additions : File Commands 9
@nathan-fiscaletti
nathan-fiscaletti / symbolicate.sh
Last active September 24, 2023 21:44
A tool for symbolicating iOS crash reports.
#!/bin/bash
CRASH=$1
APP=$2
ARCH=$3
OUTPUT=$4
# This script will fully symbolicate an iOS Crash Report
# Usage: ./symbolicate.sh mycrash.crash MyApp.app arch64 output.crash
#
@coin8086
coin8086 / using-proxy-for-git-or-github.md
Last active April 7, 2024 07:40
Use Proxy for Git/GitHub

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
@miguelmota
miguelmota / process_names.txt
Last active March 4, 2024 22:20
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"
@huilapman
huilapman / mac_osx_packet_filter.md
Created April 28, 2018 06:02
Mac OSX Packet Filter

Mac OSX 內建防火牆 PF 使用筆記]

你知道 Mac 本身也有內建防火牆嗎?
我指的不是 System Preferences 裡面有的防火牆(那個屬於 Application Firewall 指定程式進出的),而是可以像 linux iptables 可以設定規則的防火牆。

它叫做 Packet filter 簡稱 PF,因為 Mac OSX 屬於 BSD 系列的系統
自從 10.7 (Lion) 之後就有內建 PF(在這之前是 IPFW),只是預設是關閉的。

官方文件寫的非常少,大部分要參考 FreeBSD 的文件或者 OpenBSD 的文件,
大部分這二者看到的文件跟語法大多都支援。

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 24, 2024 11:23
crack activate Office on mac with license file
@danisfermi
danisfermi / setupdb.md
Created December 15, 2017 23:00
Setup gdb on Mac OS Sierra/High Sierra

Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra. Run brew install gdb. On starting gdb, you will get the following error:

Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

To fix this error, follow the following steps:

@fulldecent
fulldecent / travis-local.md
Created November 29, 2017 02:33
Run Travis build locally

travis-local.md

Preconditions:

  1. POSIX or Windows system
  2. Install Docker
  3. A GitHub repo that already builds on Travis

Postcondition:

@pedramamini
pedramamini / XProtect.yara
Created October 19, 2017 20:18
Apple OSX built in file defense is powered by YARA: /System/Library/CoreServices/XProtect.bundle/Contents/Resources
import "hash"
private rule Macho
{
meta:
description = "private rule to match Mach-O binaries"
condition:
uint32(0) == 0xfeedface or uint32(0) == 0xcefaedfe or uint32(0) == 0xfeedfacf or uint32(0) == 0xcffaedfe or uint32(0) == 0xcafebabe or uint32(0) == 0xbebafeca
}