Skip to content

Instantly share code, notes, and snippets.

@corysimmons
corysimmons / jeet.styl
Created August 12, 2014 09:11
Jeet 5.3.0 - One file for random use
// Grid Settings
jeet = {
gutter: 3,
parent-first: false,
layout-direction: LTR
}
g = jeet.gutter
-get_span(ratio = 1)
@corysimmons
corysimmons / _typography.styl
Created August 8, 2014 07:20
Decent typography boilerplate
// Reset
html
color: _c12
font-weight: 100
font-size: 70%
line-height: 1.5
+above(_mobile)
font-size: 80%
+above(_tablet)
font-size: 90%
@corysimmons
corysimmons / resize.js
Last active January 3, 2018 16:08
John Resig - Learning from Twitter Tiny JS Throttle
let didResize = false
window.addEventListener(`resize`, () => {
didResize = true
})
setInterval(() => {
if (didResize) {
// Do stuff
didResize = false
@corysimmons
corysimmons / force-repaint.styl
Created July 9, 2014 04:36
Force repaint on stubborn position: fixed elements.
.foo
position: fixed
&.active
animation: repaint 1ms
@keyframes repaint
from
width: 99.999%
to
width: 100%
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
/* Iconic theme rules. Don't delete! */
iconic-color(color)
fill: color
stroke: color
color-primary = #DA3A35
color-secondary = lighten(#DA3A35, 30%)
/* Hide all icons that are waiting to be injected */
/*!
* jquery.addrule.js 0.0.15 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/05/12
**/
@corysimmons
corysimmons / SassMeister-input-HTML.html
Created April 9, 2014 02:09
Generated by SassMeister.com.
<div class="box">Hello</div>
@corysimmons
corysimmons / SassMeister-input.scss
Created April 4, 2014 13:08
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Jeet 5 - http://jeet.gs
/* Syntax Quick Reference
--------------------------
column($ratios: 1, $offset: 0, $cycle: 0, $uncycle: 0, $gutter: jeet(gutter))
@corysimmons
corysimmons / retina.scss
Created March 31, 2014 20:46
Mobile first breakpoint, hits all browsers, lets you customize retina width/height, works in any pipeline.
@mixin retina-background-image($file-sm, $file-lg, $retina-width: auto, $retina-height: auto, $breakpoint: 0px) {
background: url("#{$file-sm}") no-repeat;
background-size: cover;
@media
(-webkit-min-device-pixel-ratio: 2) and (min-width: #{$breakpoint}),
( min--moz-device-pixel-ratio: 2) and (min-width: #{$breakpoint}),
( -o-min-device-pixel-ratio: 2/1) and (min-width: #{$breakpoint}),
( min-device-pixel-ratio: 1.5) and (min-width: #{$breakpoint}),
( min-resolution: 192dpi) and (min-width: #{$breakpoint}),