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
#################### | |
# Existing | |
#################### | |
database_connection = mongodb://{{ db_host }}:{{ db_port }}/{{ db_name }} | |
################### | |
# Proposed | |
################### |
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
######################### | |
# Existing Method | |
######################## | |
class MongoDBContext(OSContextGenerator): | |
interfaces = ['mongodb'] | |
def __call__(self): | |
mongo_servers = [] | |
replset = None |
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
<?php | |
/** | |
* Ideally you would have two tables, one for questions with the following schema: | |
* | |
* id INT PrimaryKey | |
* question_text VARCHAR | |
* correct_answer_id INT | |
* | |
* and one for answers: |
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
<?php | |
require_once dirname(__FILE__) . '/config.php'; | |
use nzedb\libraries\Cache; | |
use nzedb\libraries\CacheException; | |
use nzedb\db\Settings; | |
/** | |
* Update this directive to reflect your chosen webserver. | |
* Currently we only support nginx or apache out of the box. |
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
class CheckoutView(View): | |
form_class = CheckoutForm | |
template = 'account/checkout.html' | |
email_template_name = 'account.checkout_success' | |
def create_sub(self, user, customer, plan, quantity): | |
subscription = customer.subscriptions.create(plan=plan, quantity=quantity) | |
user.stripe_subscription_id = subscription.id | |
user.save() |
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
-- This is all generated by Laravel via migrations I created. It is effectively what I would have done by hand, | |
-- though I generally don't leave 255 character fields laying around everywhere and I'm a bit better with my indexing :) | |
-- | |
-- Table structure for table `cities` | |
-- | |
DROP TABLE IF EXISTS `cities`; | |
CREATE TABLE `cities` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, |
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
<?php | |
/** | |
* Created by DavidDV <[email protected]> | |
* For project Spartz | |
* Created: 6/3/14 | |
* <http://[github|bitbucket].com/zetas> | |
*/ | |
class APIController extends BaseController { |
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
<?php | |
$db = new PDO('mysql:host=localhost;port=3306;dbname=homestead', 'homestead', 'secret'); | |
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); | |
#4980,Long Prairie,MN,verified,45.971955,-94.866789 | |
$lat = 45.971955; | |
$lon = -94.866789; |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
banner: '/*!\n' + | |
' * <%= pkg.name %> v<%= pkg.version %>\n' + | |
' * <%= pkg.description %>\n' + |
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
{ | |
"name": "Writerr", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "~0.4.2", | |
"grunt-contrib-jshint": "~0.6.3", | |
"grunt-contrib-nodeunit": "~0.2.0", | |
"grunt-contrib-uglify": "~0.2.2", | |
"grunt-contrib-coffee": "~0.10.1", | |
"grunt-contrib-compass": "~0.7.2", |