Skip to content

Instantly share code, notes, and snippets.

@dong
dong / NSCSearchBar.h
Last active September 11, 2015 05:33 — forked from nscoding/NSCSearchBar.h
On iOS 7 UISearchBar the placeholder text is centred and I want to disable that and make it always stick to the left like it was before. There is a private method setCenterPlaceholder and calling this with a BOOL work will make the trick. I am wondering if there is any other, not "Hacked" that does the same thing.
@interface NSCodingSearchBar : UISearchBar
// Default by the system is YES.
// https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/UIKit.framework/UISearchBar.h
@property (nonatomic, assign, setter = setHasCentredPlaceholder:) BOOL hasCentredPlaceholder;
@end
@dong
dong / 00.howto_install_phantomjs.md
Last active August 29, 2015 14:25 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@dong
dong / FirstGist.md
Last active August 29, 2015 14:16
first gist

First Gist

print 'Hi, this is first gist.'