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
message_input.on('typeahead:selected', function(e) { | |
query = $(this).val(); | |
$(this).typeahead('setQuery', ''); | |
$(this).val(query + ', '); | |
}); |
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
brew update | |
brew uninstall ImageMagick | |
brew install ImageMagick | |
gem uninstall rmagick | |
gem install rmagick | |
cd /usr/local/Cellar/imagemagick/6.8.0-10/lib | |
ln -s libMagick++-Q16.7.dylib libMagick++.dylib | |
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib | |
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib | |
bundle |
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
NSURL *wiresUrl = [NSURL URLWithString:@"http://blahblah.com.192.168.1.100.xip.io/stuff.json"]; | |
NSData *jsonData = [NSData dataWithContentsOfURL:wiresUrl]; | |
NSError *error = nil; | |
NSDictionary *dataDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; |
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
Ultimately, this line did the trick: | |
$ CONFIGURE_OPTS="--without-tk" rbenv install 1.8.7-p370 | |
Additional info: | |
https://github.com/sstephenson/ruby-build/issues/207 | |
https://github.com/sstephenson/ruby-build/wiki#installing-187-on-os-x-108-mountain-lion |
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
// the following class inherits from UIViewController | |
@implementation MyCustomViewController | |
- (void)setup | |
{ | |
// initialization that can't wait until viewDidLoad | |
} | |
- (void)awakeFromNib |
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
@implementation MyCustomClass | |
- (id)init | |
{ | |
self = [super init]; | |
if (self) { | |
// custom initializations | |
// use underscore assignment (_date = [NSDate date]) instead of setters and getters |
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
mysql.server start |
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
class AddIndexOnCompanyIdInConcernsAndDepartmentsAndUsers < ActiveRecord::Migration | |
def change | |
add_index :departments, :company_id | |
add_index :concerns, :company_id | |
add_index :users, :company_id | |
end | |
end |
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
# XCode 5 hides these away: | |
export C_INCLUDE_PATH="$(xcrun --show-sdk-path)/usr/include" | |
export CPLUS_INCLUDE_PATH="$(xcrun --show-sdk-path)/usr/include" | |
export LIBRARY_PATH="$(xcrun --show-sdk-path)/usr/lib:$(xcrun --show-sdk-path)/usr/lib/system:$LIBRARY_PATH" | |
and then you can do rbenv install |
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
func testDeleteFolder() { | |
attempt { | |
let session = Session.nas | |
var response: JSONObject? | |
stub(session, "delete-folder") { expectation in | |
try! Folder.deleteFolder(session, folderID: "10396915") | |
.startWithCompletedExpectation(expectation) { value in | |
response = value | |
} |