Last tested using Mac OS X 10.8 Mountain Lion
- Backup .ssh folder to avoid having to regenerate codes for services such as Heroku and Github.
| // NSString_stripHtml.h | |
| // Copyright 2011 Leigh McCulloch. Released under the MIT license. | |
| #import <Foundation/Foundation.h> | |
| @interface NSString (stripHtml) | |
| - (NSString*)stripHtml; | |
| @end |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
| <? | |
| /* | |
| This is part of the Reprise framework, not yet released publicly. | |
| Copyright 2013 Marco Arment. All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: | |
| * Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #import <Foundation/Foundation.h> | |
| #include <dlfcn.h> | |
| NSDictionary *FCPrivateBatteryStatus() | |
| { | |
| static mach_port_t *s_kIOMasterPortDefault; | |
| static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
| static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
| static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
| // List all fonts on iPhone | |
| NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
| NSArray *fontNames; | |
| NSInteger indFamily, indFont; | |
| for (indFamily=0; indFamily < familyNames.count; ++indFamily) | |
| { | |
| NSLog(@"Family name: %@", familyNames[indFamily]); | |
| fontNames = [[NSArray alloc] initWithArray: | |
| [UIFont fontNamesForFamilyName:familyNames[indFamily]]]; |
| - Copy the delivered ipa into a directory to work in. | |
| - export PlistBuddy="/usr/libexec/PlistBuddy" to get the PlistBuddy tool to your shell. If it is not added, all references to PlistBuddy | |
| will need to be written as the full path. | |
| - Take the delivered App.ipa and unzip it using the unzip command. This should produce a Payload directory containing the app and its | |
| resources. | |
| - Enter the command "codesign -d --entitlements :enterprise.plist Payload/PathToApp.app/" This pulls the entitlements out of the app, and | |
| prints them to a plist, without a leading "blob" of data. Pay particular attention to the colon before the enterprise.plist file name. |
| import Foundation | |
| public class Storage { | |
| fileprivate init() { } | |
| enum Directory { | |
| // Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud. | |
| case documents | |
| // | |
| // UIView+RSKeyboardLayoutGuide.swift | |
| // RSTouchUIKit | |
| // | |
| // Created by Daniel Jalkut on 12/23/18. | |
| // | |
| import UIKit | |
| // Extends UIView to expose a keyboardLayoutGuide property that can be used to tie a view controller's content |