Skip to content

Instantly share code, notes, and snippets.

Brent booleanbetrayal

Block or report user

Report or block booleanbetrayal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View flatten.js
<!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/
View bulk_processor.rb
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 / gist:fa7b19ed5c4bfc39cb36
Created Nov 18, 2014
SVGO - removeUnknownsAndDefaults broken
View gist:fa7b19ed5c4bfc39cb36
<?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>
@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active Dec 4, 2019
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
@booleanbetrayal
booleanbetrayal / ng_paginate_filter
Created Sep 4, 2013
barebones pagination filter example for angular. could be easily parameterized further.
View ng_paginate_filter
// 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;
You can’t perform that action at this time.