This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSString+XML.h | |
// Customizable string XML parser for NSString, NSMutableString, NSAttributedString, and NSMutableAttributedString. | |
// | |
// Created by Shilo White on 8/31/13. | |
// Copyright (c) 2013 XIDA Design & Technik. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shilo: Benjamin! Benjamin! Benjamin! Benjamin! Benjamin! Benjamin! Boss! Boss! Boss! Leader! Leader! Leader! Master! Master! Master! Ben! | |
Ben! Ben! Ben! Benni! Benni! Benni! Benni! Benji! Benji! Benj! Benj! Benj! | |
Benjamin: What!? | |
Shilo: Hi! (Giggling and running out of the room) | |
https://www.youtube.com/watch?v=aOLxQGLJouI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create dummy images | |
curl -L "http://dummyimage.com/600x400/000/fff&text=DummyImage%20[01-10]" -o image_#1.png | |
get page headers | |
curl --head http://google.com | |
send parameters to page | |
curl.exe -L -G "http://yoururl.com" --data-urlencode "text=DESIGN6 daily backup started" | |
send formdata & files to page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Disable app nap system-wide (Requires Restart) | |
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES | |
//Finder show hidden files | |
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder | |
//Desktop hide icons | |
defaults write com.apple.finder CreateDesktop false; killall Finder | |
//TextEdit open new document by default (Requires restart of TextEdit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *; do mv "$file" "${file%.*}@2x.${file##*.}"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) 2013 Jamz Tang <jamz@jamztang.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is furnished | |
to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf `find . -type d -name .svn` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn propset svn:ignore -RF .gitignore . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NSAttributedString { | |
func replaceHTMLTag(tag: String, withAttributes attributes: [String: AnyObject]) -> NSAttributedString { | |
let openTag = "<\(tag)>" | |
let closeTag = "</\(tag)>" | |
let resultingText: NSMutableAttributedString = self.mutableCopy() as NSMutableAttributedString | |
while true { | |
let plainString = resultingText.string as NSString | |
let openTagRange = plainString.rangeOfString(openTag) | |
if openTagRange.length == 0 { |
OlderNewer