Skip to content

Instantly share code, notes, and snippets.

View influxweb's full-sized avatar
Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...

Matt Zimmermann influxweb

Coffee Helps Me Focus...Coffee Helps Me Focus...Coffee Helps Me Focus...
View GitHub Profile
@influxweb
influxweb / html-entities.js
Created May 1, 2012 15:33 — forked from dbushell/gist:2567294
HTML Entities with jQuery and the Browser
var div = $('<div/>');
function encodeEntities(str) {
return div.text(str).html();
}
function decodeEntities(str) {
return div.html(str).text();
}
@influxweb
influxweb / ie_check.js
Last active September 8, 2015 17:20 — forked from padolsey/gist:527683
Check IE version using JavaScript
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@influxweb
influxweb / README.md
Created February 24, 2016 20:16 — forked from aaronsama/README.md
Star rating
@influxweb
influxweb / .gitconfig
Created May 3, 2016 00:14 — forked from nepsilon/a-better-setup-for-git.md
A better setup for Git
# The basics, who you commit as:
[user]
name = John Doe
email = john@doe.org
# Your Github username
[github]
user = githubusername
# Some aliases to save 1000s keystrokes each year:
[alias]
log = log --color
@influxweb
influxweb / RWD-|-Responsive-HTML5-form-elements-with-CSS-Flexbox.markdown
Created July 12, 2016 22:42
RWD | Responsive HTML5 form elements with CSS Flexbox
@influxweb
influxweb / example.html
Created August 15, 2016 19:26 — forked from ryantownsend/example.html
ITCSS Flexbox Grid Object
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="main.css" />
<title>ITCSS Grid Example</title>
</head>
<body>
// --------------------------------------------------------------------------------------
// A More Modern Scale for Web Typography
// Based on this article: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// --------------------------------------------------------------------------------------
$body-font-size: 1em !default;
// Adjusts body typography to be default
// for each browser.
@mixin reset-body-font-size($font-size: 100%, $size-adjustment: 0.5) {
@influxweb
influxweb / README.md
Created October 5, 2016 18:50 — forked from steveosoule/README.md
Dynamic Resize Images Based on URL

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

@influxweb
influxweb / debounce-es2015.js
Created January 3, 2017 20:34 — forked from vincentorback/debounce-es2015.js
Smarter debouncing
export function debounce(fn, wait) {
let timeout;
return function () {
clearTimeout(timeout);
timeout = setTimeout(() => fn.apply(this, arguments), (wait || 1));
}
}