View gist:8689338
var gulp = require('gulp'), | |
sass = require('gulp-less'); | |
gulp.task('less', function() { | |
gulp.src('assets-v2/less/app.less') | |
.pipe(gulp.dest('assets-v2/css/')); | |
}); | |
gulp.task('default', function() { | |
gulp.run('less'); |
View Ref Errof
ReferenceError: HTTPStatus is not defined | |
at ClientRequest.<anonymous> (/Users/jordancauley/projects/posted/api/controllers/FileController.js:55:34) | |
at ClientRequest.EventEmitter.emit (events.js:117:20) | |
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1669:21) | |
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:120:23) | |
at CleartextStream.socketOnData [as ondata] (http.js:1564:20) | |
at CleartextStream.read [as _read] (tls.js:502:12) | |
at CleartextStream.Readable.read (_stream_readable.js:320:10) | |
at EncryptedStream.write [as _write] (tls.js:366:25) | |
at doWrite (_stream_writable.js:219:10) |
View gist:8984009
module.exports = { | |
index: function (req,res) { | |
File.find( function foundFiles(err, files) { | |
if (err) return next(err); | |
// pass the array down to the /views/index.ejs page | |
res.view({ | |
files: files | |
}); |
View app.css
.featured-post{ | |
color: @white; | |
position: relative; | |
height: auto; | |
float: right; | |
min-height: 225px; | |
max-height: 225px; | |
width: 50%; | |
background-size: cover; | |
background-position: center center; |
View gist:9498154
index: function(req, res){ | |
User.findOne(req.user).populate('files').exec(function( err, fileuser){ | |
console.log(err); | |
console.log(fileuser); | |
res.view({ | |
user : fileuser | |
}); |
View responsive videos
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
.video-container iframe, | |
.video-container object, |
View UserController.js
update: function(req, res){ | |
}, |
View excerpt.php
function excerpt($limit) { | |
$excerpt = explode(' ', get_the_excerpt(), $limit); | |
if (count($excerpt)>=$limit) { | |
array_pop($excerpt); | |
$excerpt = implode(" ",$excerpt).'...'; | |
} else { | |
$excerpt = implode(" ",$excerpt); | |
} | |
$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); | |
return $excerpt; |
View the_post_thumbnail
<?php if (has_post_thumbnail()): the_post_thumbnail('', array('class' => 'img-responsive')); endif; ?> |
View untitled
/** | |
* MailController.js | |
* | |
* @description :: | |
* @docs :: http://sailsjs.org/#!documentation/controllers | |
*/ | |
var async = require('async'); | |
var nodemailer = require('nodemailer'); | |
var smtpTransport = nodemailer.createTransport("SMTP",{ | |
service: "Mandrill", |
OlderNewer