This is outdated. See this guide.
##Create an alias to MAMP's PHP installation
To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.
Within the terminal, run:
nano ~/.bash_profile
This will open nano with the contents, at the top in a blank line add the following line:
This is my first .mk files to get theos work and compile tweaks through Cygwin, |
static BOOL tweakEnBOOL; | |
#define SETTINGSFILENEW "com.imokhles.Prefs" | |
#define PREFERENCES_CHANGED_NOTIFICATION "com.imokhles.Prefs.preferences-changed" | |
// non ARC | |
static void iMoLoadPreferences() { | |
CFPreferencesAppSynchronize(CFSTR(SETTINGSFILENEW)); | |
tweakEnBOOL = !CFPreferencesCopyAppValue(CFSTR("Enabled"), CFSTR(SETTINGSFILENEW)) ? YES : [(id)CFBridgingRelease(CFPreferencesCopyAppValue(CFSTR("Enabled"), CFSTR(SETTINGSFILENEW))) boolValue]; | |
} |
static BOOL tweakEnabled = NO; | |
static void PreferencesChangedCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) { | |
system("killall WhatsApp"); // kill app to apply changes ;) | |
NSDictionary *preferences = [[NSDictionary alloc] initWithContentsOfFile:@"TWEAK_PREFS_PATH"]; | |
tweakEnabled = [preferences[@"tweakEnabled"] boolValue]; | |
} | |
%ctor { | |
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidFinishLaunchingNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *block) { |
// | |
// UIViewExtensions.swift | |
// Singles | |
// | |
// Created by Cory D. Wiles on 2/19/15. | |
// Copyright (c) 2015 Cory WIles. All rights reserved. | |
// | |
import UIKit |
/* | |
// | |
// How to open iOS application using WatchKit | |
// | |
// Created by Mokhlas Hussein on 09/04/15. | |
// Copyright (c) 2015 iMokhles (Mokhlas Hussein). All rights reserved. | |
// | |
*/ | |
/******* Within the App Watch Extension *******/ |
#import <Foundation/Foundation.h> | |
#import <AddressBook/AddressBook.h> | |
@class SBApplication, CKConversation; | |
__attribute__((visibility("hidden"))) | |
@interface BioLockdownController : NSObject | |
+ (BioLockdownController *)sharedController; |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
#!/bin/bash | |
PLATFORM=iPhoneOS # iPhoneSimulator # iPhoneOS | |
HOST=arm-apple-darwin # i386-apple-darwin10 # arm-apple-darwin10 | |
ARCH=arm64 # i386 # armv7s #armv7 | |
SDK_VERSION=13.0 | |
XCODE_ROOT=`xcode-select -print-path` | |
PLATFORM_PATH=$XCODE_ROOT/Platforms/$PLATFORM.platform/Developer | |
SDK_PATH=$PLATFORM_PATH/SDKs/$PLATFORM$SDK_VERSION.sdk |