Skip to content

Instantly share code, notes, and snippets.

clouddueling clouddueling

Block or report user

Report or block clouddueling

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
@clouddueling
clouddueling / gruntfile.js
Created Jun 21, 2014
Comparing similar automation tasks
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');
@clouddueling
clouddueling / AccountRole.js
Created Jun 14, 2014
Through association with SailsJS. Make sure all references to models are lowercase because that is how they're stored.
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',
@clouddueling
clouddueling / UserControllers.js
Created Jun 12, 2014
Any suggestions on how to extract the database stuff. Is this fine since it's just an adapter?
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();
}
};
@clouddueling
clouddueling / gulpfile.js
Created May 30, 2014
I have a few gulpfiles. One manages my theme in multiple apps and the other manages the app's unique stuff.
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
You can’t perform that action at this time.