##Create a new repository on the command line
REPO="REPO_NAME_HERE"
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"$REPO"}'
touch README.md
git init
/* | |
Runtime MemPatcher - by Arthur da Paz | |
Completely based on the famous writeData.h | |
created by Razzile & HackJack for iOSGods.com | |
Copyright 2016 Arthur da Paz, AP Security Inc | |
This code is licensed under the GTFC LICENSE, which means | |
██████╗ ██╗██╗ ██╗███████╗ ████████╗██╗ ██╗███████╗ |
#import "MemPatcher.h" | |
vm_object_offset_t calcAddress(vm_object_offset_t offset) | |
{ | |
const struct mach_header *mach; | |
mach = _dyld_get_image_header(0); | |
if (mach->flags & MH_PIE) | |
{ | |
vm_object_offset_t slide = _dyld_get_image_vmaddr_slide(0); |
#!/usr/bin/env bash | |
# Install Bash 5.0 (MacOS) | |
VERSION="5.0" | |
BASH_SHORT="bash-$VERSION" | |
BASH_SRC="$BASH_SHORT.tar.gz" | |
BASH_URL="https://ftp.gnu.org/gnu/bash" | |
BASH_PREFIX="/usr/local" | |
BASH_PATH="$BASH_PREFIX/bin/bash" |
#!/usr/bin/env bash | |
# Install Nano (www.nano-editor.org) with syntax highlighting (MacOS) | |
VERSION="4.1" | |
NANO_SHORT="nano-$VERSION" | |
NANO_SRC="$NANO_SHORT.tar.gz" | |
NANO_URL="https://www.nano-editor.org/dist/v4" | |
NANO_EXTRA="https://github.com/scopatz/nanorc" |
import UIKit | |
import AVFoundation | |
class ViewController: UIViewController { | |
// Duplicate players to handle optional cross-fading. | |
let playerQueue = [AVPlayer(), AVPlayer()] | |
var timeObserverToken: Any? |
#!/bin/zsh | |
############ | |
### zsh script to clear xcode caches and project | |
### | |
### Works from Xcode 9.3 to Xcode 11.6 | |
### | |
### last date I tested: (7/24/2020) | |
### | |
### Move this script to /usr/bin/local so this will be the default usage: | |
### cd myXcodeWorkspace/ |
#if DEBUG | |
import SwiftUI | |
protocol UIViewControllerRepresentableHelper: UIViewControllerRepresentable { | |
var configuration: (UIViewControllerType) -> () { get set } | |
} | |
extension UIViewControllerRepresentableHelper { | |
func makeUIViewController(context: Context) -> UIViewControllerType { UIViewControllerType() } | |
func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { configuration(uiViewController) } |
ObjC.import('stdlib') | |
ObjC.import('CoreGraphics'); | |
// Move mouse cursor to specified position | |
function moveMouse(x, y) { | |
var pos = $.CGPointMake(x, y); | |
var event = $.CGEventCreateMouseEvent(null, $.kCGEventMouseMoved, pos, $.kCGMouseButtonLeft); | |
$.CGEventPost($.kCGHIDEventTap, event); | |
} |
const FileManager = (()=>{ | |
function pwd() { | |
return $.NSFileManager.defaultManager.currentDirectoryPath.js | |
} | |
function cd(path='~') { | |
if (path==='') path = '.' | |
let p = $(path).stringByStandardizingPath | |
let r = $.NSFileManager.defaultManager |