Skip to content

Instantly share code, notes, and snippets.

View norio-nomura's full-sized avatar

Norio Nomura norio-nomura

View GitHub Profile
@norio-nomura
norio-nomura / building-yams-using-xcodebuild-without-xcodeproj.sh-session
Last active August 3, 2023 10:56
[Xcode 11] Building Yams using `xcodebuild` without `.xcodeproj` with `-destination "name=iPhone 8"`
➜ 15:27:26 git clone https://github.com/jpsim/Yams.git
Cloning into 'Yams'...
remote: Enumerating objects: 111, done.
remote: Counting objects: 100% (111/111), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 3987 (delta 58), reused 71 (delta 31), pack-reused 3876
Receiving objects: 100% (3987/3987), 4.24 MiB | 1.85 MiB/s, done.
Resolving deltas: 100% (2313/2313), done.
➜ 15:27:43 cd Yams
➜ 15:27:46 git:(master) rm -rf Yams.xcodeproj
@norio-nomura
norio-nomura / gist:f4346e9cb9db0a411779
Last active May 28, 2023 06:06
Note: About injection mechanism of EasySIMBL extended from SIMBL-0.9.9

Note: About injection mechanism of EasySIMBL extended from SIMBL-0.9.9

Inject into processes launched before launching SIMBL Agent.app

Since EasySIMBL-1.0

Application resume on login happen before launching original SIMBL Agent.app. On launching, EasySIMBL's SIMBL Agent.app find target apps from already launched apps, and inject into it.

Inject into Background/Agent applications

@norio-nomura
norio-nomura / Setup transparent proxy with VMware Fusion.md
Last active April 3, 2023 06:59
Setup transparent proxy with VMware Fusion

Setup transparent proxy with VMware Fusion

  1. Add network (vmnet3) to VMware Fusion
    1. sudo vi /Library/Preferences/VMware\ Fusion/networking
       answer VNET_1_HOSTONLY_SUBNET 172.16.92.0
       answer VNET_1_VIRTUAL_ADAPTER yes
       answer VNET_1_VIRTUAL_ADAPTER_ADDR 172.16.92.1
      +answer VNET_3_DHCP yes
      +answer VNET_3_DHCP_PARAM_DNS_ADDR 172.16.12.1
      +answer VNET_3_DHCP_PARAM_ROUTERS 172.16.12.1
@norio-nomura
norio-nomura / AppDelegate.m
Created October 4, 2012 02:14
How to call objc_msgSendSuper()
//
// AppDelegate.m
// CallSuperMethod
//
#import <objc/objc-runtime.h>
#import "AppDelegate.h"
@interface Superclass : NSObject
- (NSString*)a;
@norio-nomura
norio-nomura / swift-demangle-filter.py
Last active April 27, 2022 04:17
`swiftc -emit-assembly`してシンボルを`swift-demangle`で変換する
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# usage: swift-demangle-filter.py [-h] [-o <outfile>] [<file> <options>]
#
# Read swift assembly, demangle Swift Symbol and output it.
#
# positional arguments:
# <file> <options> If <file> has .swift, compile it with <options>; or read
# (<file> or <stdin>) as assembly.
@norio-nomura
norio-nomura / setExcludedFromBackupToCaches.swift
Created November 20, 2014 12:31
指定したディレクトリ以下の名前がCachesなサブディレクトリにNSURLIsExcludedFromBackupKey属性を設定するスクリプト
#!/usr/bin/env xcrun swift
import Cocoa
extension NSURL {
var isDirectory: Bool {
return resourceValue(NSURLIsDirectoryKey)
}
var isExcludedFromBackup: Bool {
return resourceValue(NSURLIsExcludedFromBackupKey)
@norio-nomura
norio-nomura / How I stream from iPad to Twitch and Ustream.md
Last active November 20, 2020 18:18
How I stream from iPad to Twitch and Ustream.

How I stream from iPad to Twitch and Ustream.

I'm broadcasting my iPad game playing on Twitch.tv and Ustream.tv.

I'm using following hardwares.

  • Playing Game: iPad 3 w/ iOS 7.1.2
  • Broadcasting to Twitch: MacBook Air Mid 2011 w/ OS X 10.9

I'm using following softwares on Mac.

@norio-nomura
norio-nomura / config.console
Last active October 26, 2020 09:31
`git commit` 時に自動でPGP署名する設定
git config user.signingkey <secret key id>
git config gpg.program /path/to/gpg-batch-notty.sh
git config commit.gpgsign true
TruAnon Verification Key: 7atz5gnfvbms3dljtyokfguqha - I am using TruAnon to verify Github.
@norio-nomura
norio-nomura / ClassExistencial.asm
Created August 2, 2019 02:05
swiftc -emit-assembly ClassExistencial.swift|swift demangle>ClassExistencial.asm
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 10, 15 sdk_version 10, 15
.globl _main
.p2align 4, 0x90
_main:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp