Skip to content

Instantly share code, notes, and snippets.

Shilo Shilo

Block or report user

Report or block Shilo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Shilo
Shilo / Merge_Forked_Repo.sh
Created Apr 9, 2014
Terminal git commands to merge github original repo into forked repo.
View Merge_Forked_Repo.sh
git clone git@github.com:<your-gh-name>/<repo-name>.git <local-directory-path>
cd <local-directory-path>
git remote add upstream https://github.com/<original-gh-name>/<repo-name>.git
git pull upstream master
git push
@Shilo
Shilo / TimerMacros.m
Last active Aug 29, 2015
Objective-C macros for timing processes.
View TimerMacros.m
#define TIMER_START() CFAbsoluteTime timer_startTime = CFAbsoluteTimeGetCurrent();
#define TIMER_STOP() (CFAbsoluteTimeGetCurrent() - timer_startTime);
#define TIMER_STOP_AND_LOG(prefixString) CFAbsoluteTime timer_endTime = TIMER_STOP(); NSLog(@"%@%f", ((prefixString)?prefixString:@""), timer_endTime);
@Shilo
Shilo / main.m
Created Apr 14, 2014
Objective-C code to run a blank app delegate on Test.
View main.m
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import "TestAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool
{
BOOL runningTests = (NSClassFromString(@"XCTestCase") != nil);
return UIApplicationMain(argc, argv, nil, NSStringFromClass((!runningTests?[AppDelegate class]:[TestAppDelegate class])));
@Shilo
Shilo / Instructions.md
Last active Aug 29, 2015 — forked from shpakovski/Instructions.md
AppleScript to hide iOS Simulator when you run Xcode Tests.
View Instructions.md
  1. Save Tests.scpt to the folder ~/.Xcode/
  2. Open the folder ~/.Xcode/ in Terminal.app
  3. Perform the command chmod +x ./Tests.scpt in Terminal.app
  4. Open Xcode ➭ Behaviors ➭ Testing Succeeds
  5. Choose ~/.Xcode/Tests.scpt in the Run popup
  6. Open Xcode ➭ Behaviors ➭ Testing Fails and repeat
@Shilo
Shilo / Trace_System_Log.sh
Created Jun 5, 2014
Terminal command to print system logs
View Trace_System_Log.sh
tail -f /var/log/system.log
@Shilo
Shilo / Website_Editable.js
Created Jun 6, 2014
Javascript to make any website editable.
View Website_Editable.js
javascript: document.body.contentEditable='true'; document.designMode='on'; void 0;
@Shilo
Shilo / Disable_App_Nap.sh
Created Jun 6, 2014
Terminal command to disable OS X Mavericks (10.9) "App Nap" feature for a specific application.
View Disable_App_Nap.sh
defaults write <app domain name> NSAppSleepDisabled -bool YES
@Shilo
Shilo / Terminal_Disable_App_Nap.sh
Created Jun 6, 2014
Terminal command to disable OS X Mavericks (10.9) "App Nap" feature for a specific application.
View Terminal_Disable_App_Nap.sh
defaults write com.apple.Terminal NSAppSleepDisabled -bool YES
@Shilo
Shilo / Disable_Key_Accent_Menu.sh
Created Jun 6, 2014
Terminal command to disable keyboard character accent menu on key press and hold event.
View Disable_Key_Accent_Menu.sh
defaults write -g ApplePressAndHoldEnabled -bool false
@Shilo
Shilo / Hide_Desktop_Icons.sh
Created Jun 6, 2014
Terminal command to hide all desktop icons on wallpaper only.
View Hide_Desktop_Icons.sh
defaults write com.apple.finder CreateDesktop -bool false
killall Finder
You can’t perform that action at this time.