Skip to content

Instantly share code, notes, and snippets.

View ninjasort's full-sized avatar
💻
Working remotely

Cameron ninjasort

💻
Working remotely
View GitHub Profile
@ninjasort
ninjasort / gulpfile.js
Last active September 1, 2019 20:43
Gulp Workflow - Sass, Uglify, Express, Copy, Bourbon, Neat, BrowserSync
var gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
filter = require('gulp-filter'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
bodyParser = require('body-parser'),
express = require('express'),
@ninjasort
ninjasort / mixins.scss
Created January 26, 2015 04:25
Sass Mixins
@mixin back-drop() {
position: absolute;
width: 100%;
height: 100%;
margin: auto;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 100;
@ninjasort
ninjasort / blog.js
Created February 5, 2015 01:29
Rendering React templates in a Keystone View
var keystone = require('keystone');
var async = require('async');
var _ = require('underscore');
var React = require('react');
// install node-jsx
require('node-jsx').install({extension: '.js', harmony: true});
// require React component and use React.createFactory to configure it later
var BlogPage = React.createFactory(require('../../components/blogPage'));
@ninjasort
ninjasort / utils.js
Last active August 29, 2015 14:18
utils
/**
* Parses query string and returns object
* @param {string} string ?a=b&c=d
* @return {object} {a: b, c: d}
*/
function parseQueryString(string) {
var obj = {};
var keyValues = string.slice(string.indexOf('?') + 1).split('&');
for(var i = 0; i < keyValues.length; i++) {
var parts = keyValues[i].split('=');
{
"scripts": {
"beefy": "beefy main.js:bundle.js 3000 --live --index=./index.html --open"
}
}
@ninjasort
ninjasort / snippet.js
Last active January 2, 2016 23:50
IE placeholder
// http://kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/
function fixIEPlaceholders() {
if (!Modernizr.input.placeholder) {
$("input").each(function() {
if($(this).val() == "" && $(this).attr("placeholder") !== ""){
$(this).val($(this).attr("placeholder"));
$(this).focus(function(){
if($(this).val() == $(this).attr("placeholder")) $(this).val("");
});
$(this).blur(function(){
@ninjasort
ninjasort / webpack.sh
Created February 11, 2016 22:13
webpack cli
$ webpack --help
webpack 1.12.13
Usage: https://webpack.github.io/docs/cli.html
Options:
--help, -h, -?
--config
--context
--entry
--module-bind
@ninjasort
ninjasort / bower.json
Created April 9, 2016 23:06
Bower (Angular Deps)
}
"json3": "~3.3.1",
"es5-shim": "~4.3.1",
"angular-resource": "1.4.x",
"angular-spotify": "~1.2.0",
"lodash": "~3.10.1",
"angular-bootstrap": "~0.14.3",
"angular-ui-router": "~0.2.13",
"bootstrap-sass-official": "~3.3.1",
"angular-socialshare": "latest",
@ninjasort
ninjasort / jquery-plugins.json
Last active July 16, 2016 22:05
jQuery Plugins
{
"isotope": "https://github.com/metafizzy/isotope",
"wow": "1.1.2",
"slicknav": "1.0.7",
"jquery-notebook": "latest",
"blueimp-file-upload": "9.12.1",
"ajaxchimp": "https://github.com/scdoshi/jquery-ajaxchimp",
"counter-up": "https://github.com/bfintal/Counter-Up",
"clndr": "http://kylestetz.github.io/CLNDR",
"vimeo-jquery-api": "https://github.com/jrue/Vimeo-jQuery-API",
@ninjasort
ninjasort / apis.json
Last active December 28, 2017 00:30
node apis
{
"nodecommerce": "https://github.com/ttaub/nodecommerce",
"Shopify-api-node": "https://github.com/microapps/Shopify-api-node",
"medium-sdk-nodejs": "https://github.com/Medium/medium-sdk-nodejs",
"siteleaf-node": "https://github.com/siteleaf/siteleaf-node",
"node-harvest": "https://github.com/log0ymxm/node-harvest",
"docusign-node-client": "https://github.com/docusign/docusign-node-client",
"hellosign-nodejs-sdk": "https://github.com/HelloFax/hellosign-nodejs-sdk",
"intercom-node": "https://github.com/intercom/intercom-node",
"node-github": "https://github.com/mikedeboer/node-github",