Skip to content

Instantly share code, notes, and snippets.

View booleanbetrayal's full-sized avatar
💯

Brent Dearth booleanbetrayal

💯
View GitHub Profile
@booleanbetrayal
booleanbetrayal / gist:fa7b19ed5c4bfc39cb36
Created November 18, 2014 17:08
SVGO - removeUnknownsAndDefaults broken
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="3002px" height="1466px" viewBox="0 0 3002 1466" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.1.1 (8761) - http://www.bohemiancoding.com/sketch -->
<title>page_bottom_hexagons_short</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="3004" height="1466"></rect>
<linearGradient x1="50%" y1="1.57844388%" x2="50%" y2="85.7840211%" id="linearGradient-3">
<stop stop-color="#CEC6BD" offset="0%"></stop>
<stop stop-color="#DFD9D2" offset="100%"></stop>
<!doctype html>
<html>
<title>Flatten.js, General SVG Flattener</title>
<head>
<script>
/*
Random path and shape generator, flattener test base: http://jsfiddle.net/xqq5w/embedded/result/
Basic usage example: http://jsfiddle.net/Nv78L/3/embedded/result/
@booleanbetrayal
booleanbetrayal / ng_paginate_filter
Created September 4, 2013 17:21
barebones pagination filter example for angular. could be easily parameterized further.
// usage '... ng-repeat="n in storeArray | paginate: 10"'
myApp.filter("paginate", function() {
return function(items, maxDisplay) {
if (!items || !items.length) return items;
var totalLength = items.length;
var tmp = items;
module Paperclip
# A wrapper for a queued item. Normally this would be a temporary file, but we can't do that, because Paperclip
# would copy the temporary file before the content is actually written.
class BulkQueueItem
attr_reader :destination
def initialize(destination)
@destination = destination
end
def closed?
@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active November 9, 2023 18:59
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {