Skip to content

Instantly share code, notes, and snippets.

Ruthie BenDor unruthless

Block or report user

Report or block unruthless

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
@unruthless
unruthless / gist:7aa125be39eb57ab19c7
Created Mar 13, 2015
Transition bind/unbind pattern
View gist:7aa125be39eb57ab19c7
var transitionend = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',
$el = $('.foo'),
onTransitionEnd = function(event) {
$el.off(transitionend);
};
$el.on(transitionend, onTransitionEnd);
@unruthless
unruthless / README.md
Last active Aug 29, 2015
World Cup "Injuries"
View README.md

A quick scatterplot to show this data:

http://www.reddit.com/r/sports/comments/297gsu/oh_the_agony/

To improve:

  • Not enough colors to have a unique color per team
  • Some labels are overlapping and obscuring each other.
  • Superlative stats would be useful (most "injury"-prone, biggest delayer of game, most stoic/likely to survive zombie apocalypse)
@unruthless
unruthless / index.html
Last active Aug 29, 2015
Simple scrubber UI component
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Scrubber.js</title>
<style type="text/css">
.container {
background: #333;
View gist:5ae56a935b5edfc7c66e
# Get process ID
ps aux | grep -i "Program To Kill"
# Kill the process
killall -9 PID
@unruthless
unruthless / globalsniffer.js
Last active Aug 29, 2015
sniffs for global variables
View globalsniffer.js
/**
* Detect Globals
* @source https://github.com/sindresorhus/log-globals
*/
(function () {
'use strict';
function getIframe() {
var el = document.createElement('iframe');
@unruthless
unruthless / gist:11383824
Last active Aug 7, 2019
HTML Email Template guidelines
View gist:11383824

General guidelines for designing HTML email templates.

Questions and comments welcome anytime – thanks for reading!

KEY TAKEAWAY:

  • Coding for HTML emails is like coding for Internet browsers from 10 years ago. (It’s the email clients’ — Outlook, etc. — fault.)
  • Picture a website from a decade ago: that’s the level of design complexity we can reasonably shoot for.

WIDTH:

View gist:11383785
Pop App https://popapp.in/
Marvel App https://marvelapp.com/iphone/
IDEs
Macaw http://macaw.co/
Sketch http://bohemiancoding.com/sketch/
Sketch & D3 http://snips.net/blog/posts/2014/01-10-fast-interactive_prototyping_with_d3_js.html
Hardware
@unruthless
unruthless / preventPinchToZoom.js
Created Apr 28, 2014
Prevent pinch-to-zoom on Win8/Chrome tablet
View preventPinchToZoom.js
(function () {
'use strict';
function preventPinchToZoom(event) {
if (event.touches.length >= 2) {
event.stopPropagation();
event.preventDefault();
}
}
@unruthless
unruthless / mq-boilerplate.css
Last active Jul 5, 2016
Media Query Boilerplate
View mq-boilerplate.css
/**
* Target styles based on screen color support
*/
/* Screen is in monochrome */
@media (monochrome) {
}
/* Screen is in color */
@media (color) {
View restore_blink.css
You can’t perform that action at this time.