Skip to content

Instantly share code, notes, and snippets.

Max Wheeler makenosound

Block or report user

Report or block makenosound

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
@makenosound
makenosound / async.rb
Created Jan 18, 2019 — forked from paul/async.rb
Implementations of useful step adapters for dry-transaction
View async.rb
# frozen_string_literal: true
module Tesseract
module Transaction
module Steps
# Executes the step in a background job. Argument is either an ActiveJob
# or another Transaction (or anything that implements `#perform_later`.
#
# If the provided transaction implements a `validate` step, then that
# validator will be called on the input before the job is enqueued. This
@makenosound
makenosound / convert.pl
Created Jan 23, 2016
Use ffpmeg to convert h.265 to h.265
View convert.pl
#!/usr/bin/perl
use strict;
use warnings;
open DIR, "ls -1 |";
while (<DIR>)
{
chomp;
next if ( -d "$_"); # skip directories
View smartquotes.js
tinymce.PluginManager.add('smartquotes', function(editor) {
function convert(e) {
rootNodes = editor.dom.select("body > *");
for (var i = 0; i < rootNodes.length; i++) {
var el = rootNodes[i];
var contentEditable = editor.dom.getAttrib(el, "contenteditable");
if (contentEditable !== "false") {
convertBlock(el);
View jsx.html
<!-- Pretend this is a JSX block -->
<div>
<TouchPreview previewClassName="link--preview">
<a href="/foo">
Hello
</a>
</TouchPreview>
</div>
@makenosound
makenosound / app.js
Last active Aug 29, 2015 — forked from anonymous/app.js
Viewloader rewrite
View app.js
var views = {
foo: function($el, el, props) {
console.log(props);
},
bar: function($el, el, props) {
console.log(props);
},
fooBar: function($el, el, props) {
console.log(props);
}
@makenosound
makenosound / spacing-class.css.scss
Created May 3, 2013
Modified version of the `spacing-classes` pattern from Stitch. Allows you to specify additional units for output.
View spacing-class.css.scss
// Generate inline class names for your elements
//
// <div class="actions inset-vert-small-large">
// <button type="submit">Totes click me!</button>
// </div>
//
// Padding
// ---------------
// pad-{item} : pad-small (padding: 10px)
// pad-vert-{item}-{item + 1} : pad-vert-small-large (padding: 10px 0 40px 0)
@makenosound
makenosound / flexible-grid.scss
Last active Dec 14, 2015
A flexible grid structure using SASS and placeholder classes
View flexible-grid.scss
// Configurables
$flexibleGridColumns: 24 !default;
$flexibleGridColumnWidth: 30px !default;
$flexibleGridGutterWidth: 18px !default;
// Full width of a row
$flexibleGridRowWidth: ($flexibleGridColumns * $flexibleGridColumnWidth) + ($flexibleGridGutterWidth * ($flexibleGridColumns - 1));
// The width of a column
$flexibleGridGridWidth: percentage($flexibleGridColumnWidth / $flexibleGridRowWidth);
@makenosound
makenosound / grid.scss
Created Mar 4, 2013
SASS cascades aren’t quite as smart as I wish they were
View grid.scss
// 8-column grid where each columns is 12.5%
%grid {
display: inline;
float: left;
clear: none;
}
%grid-2 {
@extend %grid;
View flexi.css.scss
// Configurables
$flexiColumns: 24 !default;
$flexiColumnWidth: 30px !default;
$flexiGutterWidth: 18px !default;
// Full width of a row
$flexiRowWidth: ($flexiColumns * $flexiColumnWidth) + ($flexiGutterWidth * ($flexiColumns - 1));
// The width of a column
$flexiGridWidth: percentage($flexiColumnWidth / $flexiRowWidth);
@makenosound
makenosound / preview.js
Created Feb 10, 2012 — forked from virginia/preview.js
Google Preview
View preview.js
$(document).ready(function() {
google.load("books", "0");
var viewerHeight;
var headerHeight;
var btn = $('#viewerButton'); // Single ref.
var viewer = $('#viewerContainer');
function viewerInit() {
You can’t perform that action at this time.