This file contains hidden or 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
--- Install Ruby --- | |
rvm install ruby-1.9.3-p194 | |
--- Install Passenger --- | |
gem install passenger | |
--- Install Apache Dependencies --- | |
* To install Apache 2: | |
sudo apt-get install apache2-mpm-prefork |
This file contains hidden or 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
netstat –lp --inet |
This file contains hidden or 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
If you have a ~/.virtualhost.sh.conf file with: | |
PROMPT_FOR_LOGS="no" | |
ALWAYS_CREATE_LOGS="no" | |
The virtualhost definition will not have any log files defined, and will default to the global access_log and error_log (in /var/log/apache2 by default on Mac OS X). |
This file contains hidden or 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
rake RAILS_ENV=production db:migrate |
This file contains hidden or 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
//--- PPColor.m --- | |
@implementation PPColor | |
+ (UIColor *)grayColor { | |
return [UIColor colorWithRed:0.35 green:0.35 blue:0.35 alpha:1.0]; | |
} | |
+ (UIColor *)darkGrayColor { | |
return [UIColor colorWithRed:0.13 green:0.13 blue:0.13 alpha:1.0]; |
This file contains hidden or 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
Pull with rebase instead of merge | |
$ git pull --rebase | |
# e.g. if on branch "master": performs a `git fetch origin`, | |
# then `git rebase origin/master` | |
Because branch merges in git are recorded with a merge commit, they are supposed to be meaningful—for example, to indicate when a feature has been merged to a release branch. However, during a regular daily workflow where several team members sync a single branch often, the timeline gets polluted with unnecessary micro-merges on regular git pull. Rebasing ensures that the commits are always re-applied so that the history stays linear. | |
You can configure certain branches to always do this without the --rebase flag: |
This file contains hidden or 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
# Get a JavaScript runtime for Rails | |
sudo apt-get install nodejs |
This file contains hidden or 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
// Customize the appearance of table view cells. | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if (cell == nil) { | |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; | |
} | |
This file contains hidden or 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
<script type="text/javascript"> | |
document.documentElement.style.webkitTapHighlightColor = "rgba(0,0,0,0)"; | |
</script> |
This file contains hidden or 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
//Send data to webView in Titanium | |
var timeGraph = Ti.UI.createWebView({ url:'graphs/timeGraph.html', touchEnabled:true }); | |
timeGraph.addEventListener('load', function(){ | |
Ti.App.fireEvent('graphCareer', series); | |
}); | |
<!-- Receive data in webView --> | |
<script type="text/javascript"> |