You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
command script import ~/.lldbscripts/break_unsatisfiable.py |
// When you are in the diff page of a GitHub PR | |
// And want to hide all the Pods/* files in that diff page, use this: | |
// Paste that in your Web Inspector's console | |
var nodes = document.evaluate("//div[@class='file-header' and starts-with(@data-path,'Pods/')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ); | |
for(i=0; i<nodes.snapshotLength; ++i) { | |
nodes.snapshotItem(i).parentNode.hidden = true | |
} | |
// Or even better, create a bookmark with this code for easy quick access: |
You need to have SketchTool installed somewhere in your path.
Add this in your ~/.gitconfig
file (for some reason, it won't work in a local .gitconfig file):
osascript -e 'tell application "iOS Simulator" to quit' | |
osascript -e 'tell application "Simulator" to quit' | |
xcrun simctl erase all |
The following line omitted the text in bold:
button.enabled = [string length]
> 0;
As a result, the string's length, a value of type NSUInteger, or unsigned long on 64-bit, was stuffed into a BOOL, which is actually a typedef for signed char. Comparisons of this frankenbool against NO yield the right result, but only for values below 255. Anything above might truncate and yield an erroneous NO. Comparing against YES, meanwhile, only returns the right result for the value 1. By setting the button's enabled state to an unsigned integer, the code was effectively disabling the button for all strings shorter or longer than one character.
#!/bin/sh | |
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/Info.plist" |
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint"> | |
<BreakpointContent | |
shouldBeEnabled = "Yes" | |
ignoreCount = "0" |
- (void)loadOrResizeOrSometing { | |
/* | |
* After creating the text view or resizing the font, set the quoteWidth and contentInset. | |
*/ | |
WPTextContainer *textContainer = (WPTextContainer*)paragraphView.textContainer; | |
textContainer.spaceWidth = [self widthForCharacter:@" "]; | |
textContainer.charWidths = @{ | |
@(8220) : @([self widthForCharacter:@"“"]), | |
@(8216) : @([self widthForCharacter:@"‘"]), | |
@('"') : @([self widthForCharacter:@"\""]), |
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
#!/usr/bin/ruby | |
# encoding: utf-8 | |
# | |
# Updated 2017-10-25: | |
# - Defaults to large size (512) | |
# - If ImageMagick is installed: | |
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb) | |
# - replace original with rounded version, converting to png if necessary | |
# | |
# Retrieve an iOS app icon at the highest available resolution |