Skip to content

Instantly share code, notes, and snippets.

nic 1
prompt TARGET "BulletinBoard Provider Display Identifier" "com.apple.mobilesafari"
dir BulletinBoard
dir layout
dir layout/Library
dir layout/Library/WeeLoader
dir layout/Library/WeeLoader/BulletinBoardPlugins
dir layout/Library/WeeLoader/BulletinBoardPlugins/@@PROJECTNAME@@.bundle
file 366 BulletinBoard/BulletinBoard.h
#import <Foundation/Foundation.h>
- (void)fillProfile
{
RevMobAds *revmob = [RevMobAds session];
[[FBRequest requestForGraphPath:@"me?fields=id,gender,age_range,birthday"] startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (error == nil) {
NSString *gender = [result objectForKey:@"gender"];
if (gender != nil)
revmob.userGender = [gender isEqualToString:@"male"] ? RevMobUserGenderMale : RevMobUserGenderFemale;
NSNumber *minAge = [[result objectForKey:@"age_range"] objectForKey:@"min"];
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@interface TGScoreLabel : CCLabelTTF {
double curScore_; // the current score value of the label
BOOL updating_; // if we currently have an update running
double interval_; // how long we wait between updates
int score; // the target score
NSString * formatString; // the string that we format
#!/bin/bash
export THEOS=/opt/theos
# clone theos.git
cd /opt
git clone git://github.com/DHowett/theos.git
# clone iphoneheaders.git
cd $THEOS
mv include include.bak

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

@eni9889
eni9889 / catchredir.m
Created February 26, 2017 05:18 — forked from joswr1ght/catchredir.m
Demonstration code to detect runtime method swizzling with Cydia Substrate/Cycript.
// Compile with:
// clang catchredir.m -o catchredir -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -miphoneos-version-min=7 -framework Foundation
#import <Foundation/Foundation.h>
#import <stdio.h>
#import <objc/runtime.h>
@interface UrlConnection : NSObject
@property (strong) NSString *url;
- (void)connect;
@end
@eni9889
eni9889 / install.sh
Created December 28, 2017 22:00 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@eni9889
eni9889 / task_for_pid.c
Created January 2, 2018 04:20 — forked from attilathedud/task_for_pid.c
Mac OS X El Capitan (10.11) and task_for_pid()
/*
Full explanation is available here: http://attilathedud.me/mac-os-x-el-capitan-10-11-and-task_for_pid/
*/
/*
To compile, create a file called Info.plist with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@eni9889
eni9889 / hello.h
Created February 12, 2018 21:04 — forked from ddrccw/hello.h
detect jailbreak
//
// Created by ddrccw on 14-1-10.
// Copyright (c) 2014年 ddrccw. All rights reserved.
// refer to http://danqingdani.blog.163.com/blog/static/1860941952012102122847478/
#import <sys/stat.h>
#import <mach-o/dyld.h>
//#import <stdlib.h>
//#import <string.h>
@eni9889
eni9889 / generate_namespace_header.sh
Created March 12, 2018 03:10
Generate Namespace Headers
# This script is a modified version of this: https://github.com/jverkoey/nimbus/blob/master/scripts/generate_namespace_header
header=$SRCROOT/ext/NamespacedDependencies.h
prefix="YOUR_PREFIX_HERE"
echo "Generating $header from $CODESIGNING_FOLDER_PATH..."
echo "// Namespaced Header
#ifndef __NS_SYMBOL