Skip to content

Instantly share code, notes, and snippets.

View wakinchan's full-sized avatar
👻
working

Yusuke KUROIWA wakinchan

👻
working
View GitHub Profile
@wakinchan
wakinchan / generate-target-dependencies.sh
Last active February 29, 2024 13:14
Generate Target Dependencies for Package.swift
#!/usr/bin/env sh
# usage: sh ./generate-target-dependencies.sh | dot -Tsvg -o target-graph.svg
packages=`swift package describe --type json`
targets=`echo $packages | jq '.targets'`
target_names=`echo $targets | jq -r '.[] | .name'`
body=""
template=`cat <<EOF
digraph DependenciesGraph {
@wakinchan
wakinchan / tampermonkey-split-horizontally-for-mermaid.js
Last active January 28, 2022 03:56
Tampermonkey script: Split the Mermaid preview horizontally for notion
// ==UserScript==
// @name Split horizontally for Mermaid
// @namespace https://twitter.com/wa_kinchan
// @version 0.2
// @description Split horizontally when editing Mermaid
// @author @wa_kinchan
// @match https://www.notion.so/*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=notion.so
// @grant none
// ==/UserScript==
@wakinchan
wakinchan / gist:8617153
Created January 25, 2014 14:24
Transparent Icon Selection
#define PreferencesFilePath [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Preferences/com.kindadev.transparenticonselection.plist"]
@interface SBApplicationIcon
- (id)applicationBundleID;
@end
@interface SBUserInstalledApplicationIcon : SBApplicationIcon
@end
%hook SBIconImageView
@wakinchan
wakinchan / Social.framework (Facebook)
Created July 1, 2013 14:20
Social.framework (Facebook)
<UIWindow: 0x1e159b80; frame = (0 0; 320 480); opaque = NO; layer = <UIWindowLayer: 0x1e159c80>>
| <UILayoutContainerView: 0x1e0b8110; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x1e0b8180>>
| | <UINavigationTransitionView: 0x1e0ba1e0; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x1e0baa50>; layer = <CALayer: 0x1e0ba2b0>>
| | | <UIViewControllerWrapperView: 0x1fb87e90; frame = (0 64; 320 372); layer = <CALayer: 0x1fb68020>>
| | | | <BrowserView: 0x1fb75cc0; baseClass = UIWebView; frame = (0 0; 320 372); layer = <CALayer: 0x1fb5b810>>
| | | | | <_UIWebViewScrollView: 0x1fb67dd0; frame = (0 0; 320 372); clipsToBounds = YES; autoresize = H; gestureRecognizers = <NSArray: 0x1fb8e210>; layer = <CALayer: 0x1fb68050>; contentOffset: {0, 1652}>
| | | | | | <UIImageView: 0x1fb53f30; frame = (0 0; 54 54); transform = [-1, 0, -0, -1, 0, 0]; alpha = 0; opaque = NO; userInteractionEnabled = NO;
@wakinchan
wakinchan / Social.framework (Twitter)
Created July 1, 2013 14:17
Social.framework (Twitter)
<UIWindow: 0x1e159b80; frame = (0 0; 320 480); opaque = NO; layer = <UIWindowLayer: 0x1e159c80>>
| <UILayoutContainerView: 0x1e0b8110; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x1e0b8180>>
| | <UINavigationTransitionView: 0x1e0ba1e0; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x1e0baa50>; layer = <CALayer: 0x1e0ba2b0>>
| | | <UIViewControllerWrapperView: 0x1fb87e90; frame = (0 64; 320 372); layer = <CALayer: 0x1fb68020>>
| | | | <BrowserView: 0x1fb75cc0; baseClass = UIWebView; frame = (0 0; 320 372); layer = <CALayer: 0x1fb5b810>>
| | | | | <_UIWebViewScrollView: 0x1fb67dd0; frame = (0 0; 320 372); clipsToBounds = YES; autoresize = H; gestureRecognizers = <NSArray: 0x1fb8e210>; layer = <CALayer: 0x1fb68050>; contentOffset: {0, 1652}>
| | | | | | <UIImageView: 0x1fb53f30; frame = (0 0; 54 54); transform = [-1, 0, -0, -1, 0, 0]; alpha = 0; opaque = NO; userInteractionEnabled = NO;
@wakinchan
wakinchan / libcleverdumphelper
Created June 16, 2013 10:19
assist to libcreverdump
#!/bin/bash
function dump {
if [ ! -e /usr/bin/class-dump ]; then
echo
echo "Cannot find Class Dump install it to use this option"
echo
exit 1
fi
echo
#!/bin/bash
THEOS_INSTALL_DIR="/opt"
THEOS=${THEOS_INSTALL_DIR}/theos
BIGBOSS_REPO="http://apt.thebigboss.org/repofiles/cydia"
SUBSTRATE_REPO="http://apt.saurik.com"
# initial theos install directory check
if [ ! -d "$THEOS_INSTALL_DIR" ]; then
echo "making $THEOS_INSTALL_DIR"
@wakinchan
wakinchan / gist:5271977
Last active December 15, 2015 14:08
Gunosy Enahncer Makefile
ARCHS = armv7
THEOS_INSTALL_KILL = gunosy
THEOS_DEVICE_IP = iphone.local
include theos/makefiles/common.mk
TWEAK_NAME = GunosyEnhancer
GunosyEnhancer_FILES = PocketAPI/PocketAPI.m PocketAPI/PocketAPIOperation.m PocketAPI/SFHFKeychainUtils.m
GunosyEnhancer_OBJCC_FILES = Tweak.xm
GunosyEnhancer_FRAMEWORKS = UIKit Security Foundation CoreGraphics
@wakinchan
wakinchan / gist:5212033
Last active December 15, 2015 05:49
Sublime Text 2 options. cf. https://gist.github.com/orta/1490994 Don't operate smoothly...
{
// Delay in ms until autocompletion pops up after . or :: or ->
// Set to 0 to disable
"popup_delay": 100,
// Delay in ms until recompiling the file after the buffer is modified
// Set to 0 to disable
"recompile_delay": 1000,
// Whether or not to hide the clang output panel when it's empty
#!/bin/bash
# class-dump class-dump-z
# - main.h
# CDStructures.h main-Structs.h
# xxx-Protocol.h xxx.h
usage ()
{
echo "Usage: $0 executable target_directory"