Skip to content

Instantly share code, notes, and snippets.

Avatar
🇰🇷
Currently coding in Korea

Ray Brown bitmanic

🇰🇷
Currently coding in Korea
View GitHub Profile
View gist:81593e11389fa821ca929fffa779305a
### Keybase proof
I hereby claim:
* I am bitmanic on github.
* I am raybrown (https://keybase.io/raybrown) on keybase.
* I have a public key ASD0xlJShol_M4bYTjYHrvC3Ey-iovmTH33V97nZCxtCLgo
To claim this, I am signing this object:
@bitmanic
bitmanic / image_helpers.rb
Last active Aug 12, 2019
Inline SVG in Middleman
View image_helpers.rb
# Middleman - Inline SVG Helper
# ------------------------------------------------------------------------------
#
# Installation
# ------------
# 1. Save this file at `[project_root]/helpers/image_helpers.rb`
# 2. Open the project's Gemfile and add this line: `gem "oga"`
# 3. Run `bundle install` from the command line
#
# Note: Restart your local Middleman server (if it's running) before continuing
@bitmanic
bitmanic / improved-keyframe-code.sass
Created Mar 20, 2012
I just stumbled across theCSSguru's animate mixin for Sass (http://thecssguru.freeiz.com/animate/) and found it very useful for including animations in my Sass files. However, I saw room for improvement in the keyframe code. Below is a comparison of the s
View improved-keyframe-code.sass
// Using a list to loop through each prefix and cut down on duplicated code
$keyframe-prefixes: (-webkit-keyframes, -moz-keyframes, -ms-keyframes, keyframes)
@each $prefix in $keyframe-prefixes
@#{$prefix} fadeIn
0%
opacity: 0
100%
opacity: 1
@bitmanic
bitmanic / rem.scss
Created Aug 9, 2011
rem() is a Sass mixin that converts pixel values to rem values for whatever property is passed to it.
View rem.scss
/*
* 'rem' is a Sass mixin that converts pixel values to rem values for whatever property is passed to it.
* It returns two lines of code — one of the regular pixel values (for IE), and another with the
* converted rem values (for everyone else). Special thanks to Chris Epstein (http://chriseppstein.github.com)
* and Martin Bavio (http://martinbavio.com) for the help and code!
*
* Sample input:
* .element {
* @include rem('padding',10px 0 2px 5px);
* }
@bitmanic
bitmanic / wp-pods-vs-ee.php
Created Mar 13, 2011
This file is a comparison between WordPress/Pods and ExpressionEngine. It shows the syntax required to display a list of three featured books on a site's homepage.
View wp-pods-vs-ee.php
<!-- Featuring three books on a site's homepage -->
<!-- The Pods/WordPress way -->
<ul id="featured-books">
<?php
$book = new Pod('book');
$params = array(
'where'=>'t.show_on_homepage = 1',
You can’t perform that action at this time.