Skip to content

Instantly share code, notes, and snippets.

View sjungling's full-sized avatar

Scott Jungling sjungling

  • Moderne.io
  • Chico, CA
  • 15:06 (UTC -07:00)
View GitHub Profile
module.exports = function(grunt) {
// Command Line Arguments
var currentSite = grunt.option('site') || 'build',
currentNicheSite = grunt.option('nicheSite') || 'faucetdirect';
/**
* BUILD - Global var for centralizing helper functions and stanard configs
* @type {Object}
*/
var BUILD = {
@sjungling
sjungling / Gruntfile.js
Created August 14, 2013 20:14
recursive in-place Uglify
module.exports = function(grunt) {
var uglify = {
options: {
files: function(srcDir) {
var filesAry = [];
var results = {};
filesAry.push(srcDir);
filesAry = grunt.file.expand(filesAry);
filesAry.forEach(function(file) {
results[file] = [file];
jQuery()(function($) {
var Animal, sam;
Animal = (function() {
Animal.prototype.options = {
foo: 'bar',
bar: 'baz'
};
@sjungling
sjungling / gist:5687767
Created May 31, 2013 20:29
BuildBot Scripts
/Users/s_jungling/Documents/scratch/build-bot/scripts/
├── ackbar.coffee
├── adult.coffee
├── archer.coffee
├── ascii.coffee
├── aww.coffee
├── beerme.coffee
├── bees.coffee
├── carlton.coffee
├── cheer.coffee
@sjungling
sjungling / pre-commit.sh
Last active September 3, 2017 15:45
New Build Preflight Check
#!/bin/sh
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
function check_master() {
printf "Checking to see if this is the master branch… "
# CONSTANT(S)
BRANCH_PATTERN="^# On branch ([^${IFS}]*)"
# Get status w/current branch
@sjungling
sjungling / Sassify.md
Last active December 17, 2015 03:18
Sassify

Sassify

Sassify is a quick and easy command line tool for cleaning up SCSS files. Think of it like an HTMLTidy or JSFormat but for SCSS.

With Sassify you can cleanup individual files sassify general.scss or an entire directory of files sassify sass/product/*.scss

Transform:

.title {
  h1 {
 padding: 16px 0 0 10px;
@sjungling
sjungling / with-microformats.erb
Last active December 15, 2015 19:59
Microformats
<div class="hproduct">
<h2 class="fn">
<a href="<%= this.ProductComposite.WishListProduct.Link %>">
<span class="manufacturer"><%= this.ProductComposite.WishListProduct.Manufacturer %></span>
<%= this.ProductComposite.WishListProduct.ProductId %>
</a>
</h2>
<h3 class="description">
<%= this.ProductComposite.WishListProduct.Title %>
</h3>
jQuery('#PricedOptionsForm :input[value!=""]').serializeArray().map(function(i){
return(i.value)
}).join(',')
@sjungling
sjungling / index.js
Created March 20, 2013 21:15
un-class-ified index for wishlists:index
// Generated by CoffeeScript 1.6.1
jQuery(function($) {
var changeList, copyItem, createList, deleteItem, deleteList, node, updateProductInfo, updateUserInfo;
updateUserInfo = function() {
console.log("updateUserInfo called");
return $.ajax({
url: '/index.cfm?page=wishlists:user_info&fmt=pjax',
success: function(res) {
return $('#user-info').replaceWith(res);
@sjungling
sjungling / wishlist.js
Last active December 15, 2015 05:19
un-class-ified wishlist for display_simple
// Generated by CoffeeScript 1.6.1
jQuery(function($) {
var addProductToWishList, addToWishList, button, collapse, container, createForm, createWishList, expand, icon, listsContainer, node, resizeWidget, toggleDropdown, updateWishlistLists;
collapse = function() {
console.log("Collapse it");
if ((typeof node !== "undefined" && node !== null) && (typeof container !== "undefined" && container !== null)) {
node.removeClass('is-expanded').addClass('is-collapsed');
return container.animate({
'height': 0