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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
NSString *tweetText = [_tweet valueForKey:@"text"]; | |
NSString *userName = [_tweet valueForKeyPath:@"user.name"]; | |
NSString *userDescription = [_tweet valueForKeyPath:@"user.description"]; | |
NSNumber *friends = [_tweet valueForKeyPath:@"user.friends_count"]; | |
NSNumber *followers = [_tweet valueForKeyPath:@"user.followers_count"]; |
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
- (id)initWithCoder:(NSCoder *)aDecoder | |
{ | |
if ((self = [super initWithCoder:aDecoder])) { | |
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; | |
// Load the data | |
NSOperationQueue *queue = [[NSOperationQueue alloc] init]; | |
NSOperationQueue *main = [NSOperationQueue mainQueue]; | |
NSBlockOperation *fetchStreamOperation = [[NSBlockOperation alloc] init]; | |
[fetchStreamOperation addExecutionBlock:^{ | |
NSLog(@"Getting data"); |
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
// Rounds all the corners of a box | |
@mixin border-radius($radius, $clip: padding-box) | |
-webkit-border-radius: $radius | |
-moz-border-radius: $radius | |
-o-border-radius: $radius | |
border-radius: $radius | |
-webkit-background-clip: $clip | |
-mox-background-clip: $clip | |
-o-background-clip: $clip | |
background-clip: $clip |
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
<?php | |
/** | |
* @file | |
* Setup site aliases for local sites. | |
* | |
* Expects the following setup: | |
* SITES_DIR/ | |
* site.local/public_html | |
* site2.local/public_html | |
* |
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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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
#!/bin/bash | |
SITES_DOMAIN="simme" | |
# # # # # # # # # # # # # # # # # # # # # # # | |
E_BADARGS=65 | |
if [ ! -n "$1" ] | |
then | |
echo "Usage: `basename $0` sitename" |
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
var ModuleName = (function ($) { | |
// Constructor | |
var module = function () { | |
// to stuff when "new" is called on us | |
}; | |
// Say hello | |
module.prototype.say = function (name) { | |
alert('Hello ' + name); | |
}; |
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
var ModuleName = (function ($) { | |
// Constructor | |
var module = function () { | |
// to stuff when "new" is called on us | |
}; | |
// Say hello | |
module.prototype.say = function (name) { | |
alert('Hello ' + name); | |
}; |
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
<?php | |
/** | |
* Display point award report. | |
* | |
* Generates a list of awarded points. | |
* | |
* @return array $content | |
*/ | |
function game_report_page_points() { | |
// For some mysterious reason only parts of the db_select API is chainable. |
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
" use <leader>df to find all TODO's in custom Drupal modules | |
noremap <leader>df :noautocmd vimgrep /TODO/j sites/all/modules/custom/**/*.{php,inc,install,module,js,sass,scss,css,coffee}<CR>:cw<CR> |