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
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
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
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
Raw angular app: | |
Make sure karma is installed | |
>> npm install -g karma | |
Clone bare angular app from angular tutorial | |
>> git clone git://github.com/angular/angular-phonecat.git | |
>> git checkout -f step-0 | |
Run the server: |
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
How to install node on Ubuntu | |
>> git clone https://github.com/joyent/node.git | |
>> cd node/ | |
>> ./configure | |
>> make | |
>> sudo make install | |
Install NPM |
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 tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
var cell: UITableViewCell? | |
cell = tableView.dequeueReusableCellWithIdentifier(UITableViewCell.wta_reuseableIdentifier()) | |
if cell == nil { | |
cell = UITableViewCell(style: .Value1, reuseIdentifier: UITableViewCell.wta_reuseableIdentifier()) | |
} | |
if let result = viewModel?.results.value[indexPath.row] { |
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
ai::Agent::Action * Chan::Program(const ai::Agent::Percept * percept) | |
{ | |
ai::CCheckers::Action *action = new ai::CCheckers::Action; | |
ai::CCheckers::MoveData move; | |
std::string board_str = percept->GetAtom("BASIC_BOARD").GetValue(); | |
ai::CCheckers::BasicBoard board(board_str); | |
int player = atoi(percept->GetAtom("PLAYER_NUMBER").GetValue().c_str()); |
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
// | |
// UIImage+Blurs.swift | |
// | |
// Created by Nate Armstrong on 12/2/15. | |
// Copyright © 2015 Nate Armstrong. All rights reserved. | |
// | |
// | |
// Compression uses RBResizer: https://gist.github.com/hcatlin/180e81cd961573e3c54d | |
import Foundation |
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
DISPLAY=192.168.0.2:0 # replace `192.168.0.2` with the host machine's local ip |