Example splitting string on slash character in ZSH.
$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3
Example splitting string on slash character in ZSH.
$ str=part1/part2/part3
$ parts=(${(@s:/:)str})
$ echo $parts
part1 part2 part3
$ echo ${#parts[@]}
3
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
#!/bin/bash | |
# Before running this script: | |
# Find AC_CHECK_FILES([/proc/self/stat]) in configure.ac and comment it out | |
# cd into the fish source directory | |
FLAGS="-stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -target armv7-apple-darwin16 -miphoneos-version-min=8.0.0" | |
PREFIX=$(pwd)"/deb" | |
# Build fish |
void callEntryPointOfImage(char *path, int argc, char **argv) | |
{ | |
void *handle; | |
int (*binary_main)(int binary_argc, char **binary_argv); | |
char *error; | |
int err = 0; | |
printf("Loading %s…\n", path); | |
handle = dlopen (path, RTLD_LAZY); |
#Loading Tweaks in the Simulator
With the latest updates to the simulator, this turns out to be pretty simple:
You need to be using kirb/theos
In order not to require MobileSubstrate to be loaded and your tweak to be compiled for i386/x86_64, add
In your makefile:
#!/usr/bin/env python | |
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>" | |
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf" | |
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/" | |
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/" | |
import leveldb | |
import sys | |
import re |
tell application "Spotlight" to inject SIMBL into Snow Leopard
print "--" | |
print "Renaming Hooks for Current Procedure..." | |
print "Message from rpetrich: Please use this for good and not evil" | |
print "--" | |
doc = Document.getCurrentDocument() | |
def procedure_end(seg, proc): | |
addr = proc.getEntryPoint() | |
currentIndex = seg.getProcedureIndexAtAddress(addr) |
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.