Skip to content

Instantly share code, notes, and snippets.

View remino's full-sized avatar

Rem remino

View GitHub Profile
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
@remino
remino / wma2mp3.sh
Last active December 10, 2015 16:58 — forked from anonymous/wma2mp3.sh
Find and convert WMA files into MP3, including audio and metadata, using ffmpeg.
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $(basename $0) directory"
echo
echo "Specify a directory containing wma files to convert into mp3."
exit 1
fi
find "$1" -iname '*.wma' | while read i; do
@remino
remino / wpautop for ruby
Created July 3, 2012 00:44 — forked from goofmint/wpautop for ruby
WordPress's wpautop function port to ruby.
def wpautop(pee, br = true)
return '' if pee.strip == ''
pee = "#{pee}\n" # just to make things a little easier, pad the end
pee = pee.gsub(/<br \/>\s*<br \/>/s, "\n\n")
# pace things out a little
allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
pee = pee.gsub(Regexp.new('(<'+allblocks+'[^>]*>)'), "\n"+'\1')
pee = pee.gsub(Regexp.new('(<\/'+allblocks+'[^>]*>)'), '\1' + "\n\n")
pee = pee.gsub(/\r\n|\r/, "\n") # cross-platform newlines
if pee.include?('<object')
@remino
remino / sass_converter.rb
Created April 2, 2012 03:19 — forked from wolfeidau/sass_converter.rb
Sass plugin for Jekyll
module Jekyll
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /sass/i
end