Skip to content

Instantly share code, notes, and snippets.

Jordan Cauley jdcauley

Block or report user

Report or block jdcauley

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
jdcauley / Post Grid
Created Jan 22, 2014
edit lib/content.php
View Post Grid
<div class="col-md-3 post-grid">
<article <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>">
<?php if (has_post_thumbnail()): ?>
<?php the_post_thumbnail('', array('class' => 'center img-responsive')); ?>
<?php else : ?>
<img class="center img-responsive" src="<?php echo get_template_directory_uri(); ?>/assets/img/placeholder.jpg">
<?php endif; ?>
View - 3 Widget Footer
jdcauley / img.js
Created Jan 22, 2014
Random Image Load using jQuery
View img.js
$(function() {
var images =['1.jpg', '2.jpg', '3.jpg', '4.jpg'];
$('#ai-bg').css({'background-image': 'url(assets/images/bg/' + images[Math.floor(Math.random() * images.length)] + ')'});
View gist:8689338
var gulp = require('gulp'),
sass = require('gulp-less');
gulp.task('less', function() {
gulp.task('default', function() {'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 [as _read] (tls.js:502:12)
at (_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
files: files
jdcauley / app.css
Created Feb 17, 2014
Static lead area with 1 large and 2 small areas.
View app.css
color: @white;
position: relative;
height: auto;
float: right;
min-height: 225px;
max-height: 225px;
width: 50%;
background-size: cover;
background-position: center center;
jdcauley / gist:9498154
Created Mar 12, 2014
Sails.js user of Populate
View gist:9498154
index: function(req, res){
User.findOne(req.user).populate('files').exec(function( err, fileuser){
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){
You can’t perform that action at this time.