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
$config['sess_cookie_name'] = 'ci_session'; | |
$config['sess_expiration'] = 7200; | |
$config['sess_expire_on_close'] = FALSE; | |
$config['sess_encrypt_cookie'] = FALSE; | |
$config['sess_use_database'] = FALSE; | |
$config['sess_table_name'] = 'ci_sessions'; | |
$config['sess_match_ip'] = FALSE; | |
$config['sess_match_useragent'] = TRUE; | |
$config['sess_time_to_update'] = 300; |
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
// Router | |
this.resource('notes', function() { | |
this.resource('notebook', { path: ':notebook_id' }, function() { | |
this.resource('note', { path: ':note_id' }); | |
}); | |
}); | |
// models/note.js | |
import DS from 'ember-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
\index.php | |
\wp-blog-header.php | |
\wp-load.php | |
\wp-config.php | |
\wp-settings.php | |
\wp-includes\load.php | |
\wp-includes\default-constants.php | |
\wp-includes\version.php | |
\wp-includes\compat.php | |
\wp-includes\random_compat\random.php |
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
getInitialData: -> | |
return $q (resolve, reject) => | |
if(@data.length > 0) | |
resolve @data | |
else | |
reject 'data not loaded' |
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
// api/models/Passport.js | |
var bcrypt = require('bcryptjs'); | |
/** | |
* Hash a passport password. | |
* | |
* @param {Object} password | |
* @param {Function} next | |
*/ | |
function hashPassword (passport, next) { |
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
# service | |
@app.factory 'CurrentUser', ($http) -> | |
$http({ | |
method: 'GET', | |
url: 'users/me' | |
}).then (user) => | |
# i want to return the user object | |
return # ... what? | |
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
// models/Project.js | |
module.exports = { | |
attributes: { | |
title: { | |
type: Sequelize.STRING | |
} | |
}, | |
associations: function() { | |
Project.belongsTo(Customer); | |
Project.hasMany(Contributor); |
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
module.exports = function(grunt) { | |
grunt.config.set('ts', { | |
assets: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'assets/js/', | |
src: [ | |
'**/*.ts' | |
], |
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
// config.xml | |
[...] | |
<frontend> | |
<layout> | |
<updates> | |
<foobar> | |
<file>foobar.xml</file> | |
</foobar> | |
</updates> | |
</layout> |
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
import {ConfigurationLoaderInterface} from "./ConfigurationLoaderInterface"; | |
export class JsonConfigurationLoader implements ConfigurationLoaderInterface { | |
handle(file: string): Object { | |
return require(file); | |
} | |
} |