Skip to content

Instantly share code, notes, and snippets.

View motionharvest's full-sized avatar

Aaron motionharvest

View GitHub Profile
@motionharvest
motionharvest / sassextend.css
Last active September 6, 2017 19:09 — forked from antsa/sassextend.css
Sass Extend and Placeholder Selector Example
// =========================
// Example 1: using a @mixin
// =========================
// SCSS:
@mixin a_pink_box() {
float: left;
display: block;
color: pink;
@motionharvest
motionharvest / gist:85235f53e1d07ccdbe48
Created January 26, 2015 19:48
SVG with internal package
<svg version="1.1" id="dsvgee" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 278 278" width="278" height="278">
<!-- Super elite legit badassery for browsers that support it -->
<div id="dsvgee-component">
<img src="/images/smileys/shade_smile.gif"/>
<div id="success">
This is a big test
</div>
<script>
(function(){
if(!test) return;
@motionharvest
motionharvest / Data-dump.js
Created November 10, 2014 19:17
Data After Interior Step
{
"Active": {
"shell": {},
"legs": {
"catid": 1,
"legid": 0,
"shortName": "Castor",
"height": 5,
"image": "img/legs/castor_80.png"
},
System.$win.on('mousemove', function(e) {
nextX = e.clientX;
diff = currX - nextX;
var tmpVal = (Data.Active.shell.width * Data.Active.boxes[index].perc) * System.scale;
var valMinusDif = tmpVal - diff;
var newperc = (valMinusDif / (Data.Active.shell.width * System.scale));
var percDif = newperc - Data.Active.boxes[index].perc;
Data.Active.boxes[index].perc += percDif;
Data.Active.boxes[index + 1].perc -= percDif;
boxElements[index].update({
@motionharvest
motionharvest / cellCycle_saveJSON
Created August 23, 2014 00:22
Saved CellCycle Object
{
"particles": [
[5.57, 0, 1, 1, 0],
[3.47, 12.69, 1, 0],
[3.239, 25.126, 1, 0],
[0.691, 37.563, 1, 0],
[0, 50, 1, 1, 4],
[8.695, 0, 1, 1, 5],
[7.967, 12.69, 1, 0],
[5.473, 25.126, 1, 0],
@motionharvest
motionharvest / index.js
Created August 5, 2014 20:26
Local changes to gulp-ruby-sass
'use strict';
var fs = require('fs');
var path = require('path');
var chalk = require('chalk');
var dargs = require('dargs');
var slash = require('slash');
var gutil = require('gulp-util');
var spawn = require('win-spawn');
var eachAsync = require('each-async');
var glob = require('glob');
@motionharvest
motionharvest / gist:8966180
Created February 12, 2014 22:50
Internal Access to Node
/*
Give internal access via buffer
*/
var stdin = process.openStdin();
stdin.setEncoding( 'utf8' );
var abilities = {
reload: function (){
gulp.run('reload');
}
}
@motionharvest
motionharvest / package.json
Created February 6, 2014 16:30
Packages for dev dependencies
{
"devDependencies": {
"gulp-livereload": "~0.3.2",
"gulp-concat": "~2.1.7",
"tiny-lr": "0.0.5",
"gulp-minify-css": "~0.3.0",
"gulp": "~3.5.1",
"gulp-ruby-sass": "~0.3.0",
"gulp-uglify": "~0.2.0",
"gulp-cache": "~0.1.1",
@motionharvest
motionharvest / gulpfile.js
Created February 6, 2014 16:28
gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
compass = require('gulp-compass'),
plumber = require('gulp-plumber'),
// autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
cache = require('gulp-cache'),
livereload = require('gulp-livereload'),
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
compass = require('gulp-compass'),
plumber = require('gulp-plumber'),
// autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),