Instantly share code, notes, and snippets.

View Browser.php
<?php
$I_Browser = true;
class Browser {
private $_agent = '';
private $_browser_name = '';
private $_version = '';
private $_platform = '';
private $_os = '';
private $_is_aol = false;
View socialButtons.php
<a
class='btn social-facebook btn-large'
href='https://www.facebook.com/sharer.php?s=100&p[title]=<?php echo urlencode($name); ?>&p[url]={{ urlencode(url("{$account->local}/{$meet->local}")) }}&p[summary]={{ urlencode(strip_html_tags($meet->overview)) }}&p[images][0]={{ urlencode(Config::get('aws.s3') . '/' . $meet->image) }}'
target='_blank'>&nbsp;</a>
<a
class='btn social-twitter btn-large'
href='https://twitter.com/share?url={{ urlencode(url("{$account->local}/{$meet->local}")) }}&text={{ urlencode($meet->name) }}'
target='_blank'>&nbsp;</a>
View AuthController.js
//
// Module Dependencies
// ==================================================================
var auth = require('../lib/auth'),
db = require('../models'),
hash = require('../lib/hash'),
flash = require('../lib/flash');
//
// Controller
View gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-karma');
View server.js
// set up ======================================================================
// get all the tools we need
var express = require('express');
var app = express();
var port = process.env.PORT || 3001;
var mongoose = require('mongoose');
var passport = require('passport');
var flash = require('connect-flash');
var logger = require('morgan');
View AccountRole.js
module.exports = {
tableName: 'account_roles',
attributes: {
account_id: 'integer',
name: 'string',
description: 'text',
deleted: 'boolean',
View AccountRole.js
module.exports = {
tableName: 'account_roles',
attributes: {
account_id: 'integer',
name: 'string',
description: 'text',
deleted: 'boolean',
View UserControllers.js
module.exports = {
find: function (req, res) {
return User.findOne(req.param('id'))
.exec(function(err, user) {
return res.json({
user: user
});
});
},
View fabric-align-text.js
var SCALE_FACTOR = 1.2;
self.center = function() {
var activeObject = self.canvas.getActiveObject();
if (activeObject) {
activeObject.center();
activeObject.setCoords();
setUnsaved();
}
};
View gulpfile.js
// Keeps my theme synced in multiple apps
var gulp = require('gulp');
var gutil = require('gulp-util');
var compass = require('gulp-compass');
var clean = require('gulp-clean');
/*
|--------------------------------------------------------------------------
| Config