Skip to content

Instantly share code, notes, and snippets.

View bigsweater's full-sized avatar

Vincent Maglione bigsweater

View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bigsweater
bigsweater / proof.md
Created February 9, 2018 17:20
Keybase ID confirmation

Keybase proof

I hereby claim:

  • I am bigsweater on github.
  • I am vmaglione (https://keybase.io/vmaglione) on keybase.
  • I have a public key whose fingerprint is 78F6 8A15 927F F091 B8C5 7E54 E0D5 4E69 7423 53EF

To claim this, I am signing this object:

@bigsweater
bigsweater / gulpfile.js
Created July 13, 2016 20:23
Sage gulpfile with Browserify Hot Module Reloading, sourcemaps, and asset revisioning
/* eslint-disable */
// ## Globals
var argv = require('minimist')(process.argv.slice(2));
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var changed = require('gulp-changed');
var concat = require('gulp-concat');
var flatten = require('gulp-flatten');
var gulp = require('gulp');
var gulpif = require('gulp-if');
@bigsweater
bigsweater / heading_anchors.php
Created June 18, 2016 21:35
Function to add IDs to heading tags in WordPress (without regex) using PHP DOMDocument
<?php
// Obviously remove namespace stuff if you're not using namespaces.
/**
* Add anchor IDs to headings in content
*/
function anchor_headings( $content ) {
$charset = '';
<?php
/**
* Plugin Name: Grunt Sitemap Generator
* Plugin URI: http://www.github.com/lgladdy
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php
* Author: Liam Gladdy
* Author URI: http://gladdy.co.uk
* Version: 1.0
*/
@bigsweater
bigsweater / Capfile
Created March 2, 2014 14:11
Capfile for deploying Bedrock on MediaTemple's GridServer
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Load tasks from gems
require 'capistrano/composer'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
@bigsweater
bigsweater / main.scss
Last active January 1, 2016 21:09
A boilerplate main.scss for organized imports and atomic css
// Vendor dependencies.
@import "compass";
@import "susy";
@import "animation";
// Author dependencies.
@import "mixins";
@import "variables";
@import "animations"; // Animation mixins
@bigsweater
bigsweater / config.rb
Created December 31, 2013 20:31
My own config.rb recipe for web dev projects
require 'susy'
require 'animation'
#================================================#
#Section: Default Properties #
#================================================#
project_type = :stand_alone
relative_assets = true
disable_warnings = false
preferred_syntax = :scss
@bigsweater
bigsweater / individual-document.php
Created December 18, 2013 22:17
A WordPress widget that generates a JPG of the first page of the first PDF it finds attached to the page it's assigned to.
<?php
function load_pmg_single_doc() {
register_widget('PMG_Single_Doc');
}
add_action('widgets_init', 'load_pmg_single_doc');
class PMG_Single_Doc extends WP_Widget {
function PMG_Single_Doc() {
@bigsweater
bigsweater / leadtracking.js
Last active December 28, 2015 22:39
Lead tracking with jquery.
/* This code relies on two small jQuery plugins:
*
* jQuery Cookie Plugin
* https://github.com/carhartl/jquery-cookie
*
* and
*
* jQuery replaceText - v1.1 - 11/21/2009
* http://benalman.com/projects/jquery-replacetext-plugin/
*