Skip to content

Instantly share code, notes, and snippets.

View stephenway's full-sized avatar

Stephen Way stephenway

View GitHub Profile
@stephenway
stephenway / README.md
Last active April 13, 2024 21:45
BEMIT Cheatsheet
@stephenway
stephenway / cors-conf.xml
Created September 13, 2015 04:52
Amazon S3 Directory Listing for Web Fonts
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
<script>
$.ajax({
url: "http://dig.jsondns.org/IN/" + window.location.hostname + "/A?callback=jsonp",
type: "GET",
dataType: "jsonp",
success: function(response) {
var showWarning = false;
$.each(response.answer, function(index, value) {
if (value.type === "A" && value.rdata === "63.135.210.217") {
showWarning = true;
@stephenway
stephenway / SassMeister-input-HTML.html
Last active August 29, 2015 14:11
Generated by SassMeister.com.
<div class="btn1">btn1</div>
<div class="btn2">btn2</div>
<div class="btn3">btn3</div>
<div class="btn4">btn4</div>
<div class="btn5">btn5</div>
<ul>
<li>Page</li>
<li>Page</li>
<li>Page</li>
@stephenway
stephenway / SassMeister-input.scss
Created July 31, 2014 17:52
Generated by SassMeister.com.
// ----
// libsass (v2.0.0)
// ----
@function scale-to-adjust($start, $change) {
@if($change > 0) {
$end: $start + $change;
@return percentage(($end - $start)/(100 - $start));
} @else {
@return percentage($change / $start);
@stephenway
stephenway / gist:c68d31c5dfcf11224ca0
Last active August 29, 2015 14:04
Vim shortcuts
Change single quotes to double quotes in vim
cs'"
Replace all lines containing webkit
:g/webkit/d
@stephenway
stephenway / gist:2ad1f7a4ad871cc6f0c0
Created July 15, 2014 22:14
UPDATE ALL THE WARE!
#!/bin/sh
bu
sudo npm update -g
sudo gem update --system
sudo gem update `gem list | cut -d ' ' -f 1`
vim -E -c BundleInstall -c q
reload!
@stephenway
stephenway / gist:eaaf17ee901b38853bff
Created July 9, 2014 18:46
_editorOverride.scss
[style] {
font-family: inherit !important;
font-size: inherit !important;
font-weight: inherit !important;
}
[style], [color] {
color: inherit !important;
}
h1, h2, h3, h4, h5, h6 {
@stephenway
stephenway / SassMeister-input-HTML.html
Created February 21, 2014 23:20
Generated by SassMeister.com.
<!DOCTYPE html>
<head>
</head>
<body>
<p>
We're going to set <span class='foo'>foo, and after that, we'll add <span class='fixed-width-text'>fixed width</span>. Was that also also bold?</span>
</p>
</body>
@stephenway
stephenway / SassMeister-input.scss
Created December 4, 2013 17:07 — forked from lunelson/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/