Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View stoplion's full-sized avatar
🎯
Focusing

George Norris stoplion

🎯
Focusing
  • Ottertune
  • Elsewhere
View GitHub Profile
@stoplion
stoplion / index.html
Created April 16, 2021 03:54
Slot Machine
<div id="stage" class="perspective-on">
<div id="rotate">
<div id="ring1" class="ring"></div>
<div id="ring2" class="ring"></div>
<div id="ring3" class="ring"></div>
<div id="ring4" class="ring"></div>
<div id="ring5" class="ring"></div>
</div>
<div>
<button class="go">Start spinning</button>
@stoplion
stoplion / index.html
Created January 8, 2021 20:01
MWjBvjv
<div id="root"></div>
@stoplion
stoplion / index.html
Created January 8, 2021 19:48
MWjBvjv
<div id="root"></div>
@stoplion
stoplion / gist:07f73c6ff20a84bcc3c32244cb82474c
Created August 12, 2020 01:03
Dump Rails Routes to JSON
```
module AppPathsHelper
def map_routes
routes = Rails.application.routes.routes.map do |route|
{alias: route.name, path: route.path.spec.to_s }
end
white_listed_routes = %w(
new_calc
user_home
@{%
const flatten = d => {
return d.reduce(
(a, b) => {
return a.concat(b);
},
[]
);
};
@{%
const flatten = d => {
return d.reduce(
(a, b) => {
return a.concat(b);
},
[]
);
};
const parser = require('../percentage_parser');
describe('Parser', () => {
describe('returns math equations with no percentages with no alternations', () => {
it('does nothing to non percentage formulas', () => {
const eq = '4 + 4 - 123 / 32';
const result = parser.feed(eq).results;
const expectedResultStr = {
@stoplion
stoplion / image_filters.rb
Created September 7, 2017 03:58 — forked from tonycoco/image_filters.rb
Useful image filters (Instagram/Hipster/Cool) for CarrierWave using MiniMagick (ImageMagick)
module CarrierWave
module MiniMagick
def toaster_filter
manipulate! do |img|
img.modulate '150,80,100'
img.gamma 1.1
img.contrast
img.contrast
img.contrast
img.contrast
@stoplion
stoplion / image_filters.rb
Created September 7, 2017 03:58 — forked from tonycoco/image_filters.rb
Useful image filters (Instagram/Hipster/Cool) for CarrierWave using MiniMagick (ImageMagick)
module CarrierWave
module MiniMagick
def toaster_filter
manipulate! do |img|
img.modulate '150,80,100'
img.gamma 1.1
img.contrast
img.contrast
img.contrast
img.contrast
@stoplion
stoplion / gulpfile.js
Created August 3, 2016 22:11 — forked from Darkle/gulpfile.js
Using Browserify, BrowserSync & Nodemon with Electron in Gulp.
'use strict';
var gulp = require('gulp')
var runSequence = require('run-sequence')
var path = require('path')
var browserSync = require('browser-sync').create()
var nodemon = require('gulp-nodemon')
var sourcemaps = require('gulp-sourcemaps')
var browserify = require('browserify')
var source = require('vinyl-source-stream')