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
leftSideBounds = [leftSideOfSplitView bounds]; | |
tableScrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, leftSideBounds.size.width, leftSideBounds.size.height)]; | |
[tableScrollView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; | |
[tableScrollView setAutohidesScrollers:YES]; | |
[leftSideOfSplitView addSubview:tableScrollView]; | |
scrollBounds = [tableScrollView bounds]; | |
tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, scrollBounds.size.width, scrollBounds.size.height)]; | |
[tableView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; |
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 SITE = { | |
URL: 'http://google.com', | |
init: function() { | |
//bring "this" (SITE object) into scope for the anonymous function passed to the click method. | |
var self = this; | |
$('#link').click(function() { |
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
//standard databases connection information | |
$db['expressionengine']['hostname'] = "localhost"; | |
$db['expressionengine']['username'] = "db_username"; | |
$db['expressionengine']['password'] = "db_password"; | |
$db['expressionengine']['database'] = "db_name"; | |
$db['expressionengine']['dbdriver'] = "mysql"; | |
$db['expressionengine']['dbprefix'] = "exp_"; | |
$db['expressionengine']['pconnect'] = FALSE; | |
$db['expressionengine']['swap_pre'] = "exp_"; | |
$db['expressionengine']['db_debug'] = TRUE; |
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
$this->EE = get_instance(); | |
//get entries form main EE db | |
$entries = $this->EE->db->from('channel_titles')->get(); | |
/* | |
Things to note: | |
1. We are using the secondary index we specified in the database.php file | |
2. And we are passing TRUE as the second parameter | |
3. Lastly we are assigning the new database connection to the variable $secondary_db |
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
$ -> | |
App.start() | |
App = | |
start: -> | |
console.log('test') | |
window.App = 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
<?php | |
class Toolbox_Template_Form { | |
protected $form_html = NULL; | |
protected $tagdata = ''; | |
protected $options = array(); |
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 templateRetrieved = this.getTemplate(); | |
jQuery.when(templateRetrieved).then(jQuery.proxy(function(template){ | |
var html = this.renderTemplate(template, data); | |
this.$el.html(html); | |
}, this)); |
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 collider = function(string) { | |
var arr = [], | |
parts = string.split('['); | |
for (index in parts) { | |
arr.push(parts[index].replace(']', '')) | |
} | |
return arr; |
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
source "http://rubygems.org" | |
gem 'anemone' |
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
# I created a generic Rails like ApplicationController so that you can just | |
# run this code via a command line prompt without the need for Rails | |
module Recorder | |
def self.included(base) | |
base.send(:before_filter, :some_method) | |
base.send(:after_filter, :another_method) | |
end |
OlderNewer