Skip to content

Instantly share code, notes, and snippets.

View supermamon's full-sized avatar

Raymond Velasquez supermamon

View GitHub Profile
@kirb
kirb / .htaccess
Last active November 16, 2020 22:39
Self-hosted Cydia repo download counter
# Use the Apache rewrite engine to redirect downloads to our script.
RewriteEngine On
RewriteBase /
RewriteRule ^repo/((Packages|Release)(.*)?)$ /repo/counter.php?filename=$1 [L,QSA]
RewriteRule ^repo/downloads/(.*)\.deb$ /repo/counter.php?filename=$1 [L,QSA]
@Daniel15
Daniel15 / 1_README.md
Last active May 6, 2024 06:40
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@kirb
kirb / gist:6149827
Last active February 26, 2020 16:20
Doing a respring the right way

Respringing the "right way" allows SpringBoard to save usage data. Otherwise, your usage data is lost and the standby/usage times are reset to "–" until you fully charge again.

Tweaks that respring the right way

  • Activator
  • Auxo
  • Flipswitch
  • Springtomize

(There are probably a few more)

@roldershaw
roldershaw / imsg
Last active March 1, 2022 19:34
Send iMessages from the command line using Bash and AppleScript
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ] ; then
echo "Usage: imsg [address] [message]"
else
/usr/bin/osascript -e 'tell application "Messages"
send "'"$2"'" to buddy "'"$1"'" of service "E:you@icloud.com"
end tell'
echo "Sent"
fi
@CPDigitalDarkroom
CPDigitalDarkroom / disabledSayWhat?.txt
Created August 19, 2015 20:20
Get past disabled on iOS using cycript
cycript -p SpringBoard
//Not sure if this one was required but I did run it first so theres that
[choose(SBFDeviceLockController)[0] _clearUnblockTimer];
[choose(SBFDeviceLockController)[0] _clearBlockedState];

#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:

@MP0w
MP0w / Reveal Home Screen Quick Actions in Xcode 7 simulator
Created September 24, 2015 11:11
Xcode 7's simulator can't simulate 3D Touch, use cycript and this script to test your own app Raw
app = [[SBApplicationController sharedInstance] applicationWithBundleIdentifier:@"com.apple.mobilesafari"]
appIcon = [[SBApplicationIcon alloc] initWithApplication:app]
iconView = [[SBIconView alloc] init];
iconView.icon = appIcon;
iconController = choose(SBIconController)[0]
iconView.delegate = iconController
[iconController _revealMenuForIconView:iconView presentImmediately:1]
@n00neimp0rtant
n00neimp0rtant / gist:27829d87118d984232a4
Last active May 24, 2019 15:10
UIVisualEffectView blur radius manipulation (new for iOS 9)
// iOS 9 allows you to animate between visual effects, which gives you the
// ability to manipulate the blur radius. this can be useful for animating
// a backdrop for a custom modal, and with a few tricks, can even be set
// indirectly, allowing you to "scrub" between them back and forth with
// a gesture, just like when you pull down Spotlight.
// these are the two effects you want to transition between
UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view)
UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

#Simple Theos Setup Instructions

Add the following to ~/.bash_profile (create the file if it does not exist by typing touch ~/.bash_profile into terminal. The touch command simply creates a file if it does not exist):

export THEOS=/opt/theos
export PATH=$THEOS/bin:$PATH
export THEOS_DEVICE_IP=your_idevice_ip THEOS_DEVICE_PORT=22
@chrisfsampaio
chrisfsampaio / fullsim
Last active December 30, 2016 01:22
LLDB 'script' to enable full screen mode in the iOS Simulator
#!/usr/bin/env bash
codesign --remove-signature /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
lldb -n Simulator \
-o "expr ((NSWindow *)[(NSArray *)[[NSApplication sharedApplication] windows] setValue:@(1<<7|1<<8|1<<11) forKey:@\"collectionBehavior\"]);" \
-o "set set auto-confirm true" \
-o quit