Skip to content

Instantly share code, notes, and snippets.

Kami mfd

Block or report user

Report or block mfd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sourcemap-extract.rb
#!/usr/bin/env ruby
require 'open-uri'
require 'pathname'
require 'json'
def strip_hash(f)
ext = f.extname
if ext.include?("?")
mfd / bootstrap-mq.scss
Created Oct 5, 2017 — forked from olegpolyakov/bootstrap-mq.scss
Bootstrap Sass Media Query Variables
View bootstrap-mq.scss
//== Media queries breakpoints
// Extra small screen / phone
$screen-xs: 480px;
$screen-xs-min: $screen-xs;
// Small screen / tablet
$screen-sm: 768px;
$screen-sm-min: $screen-sm;
mfd /
Created Jun 1, 2017 — forked from lopezjurip/
OSX Homebrew: docker-machine setup


Make sure you have installed Homebrew and (Homebrew-Cask)[].

# Install Homebrew
ruby -e "$(curl -fsSL"

# Install Homebrew-cask
brew install caskroom/cask/brew-cask
mfd / _decimal.scss
Created Feb 20, 2017 — forked from terkel/_decimal.scss
Rounding decimals in Sass
View _decimal.scss
// _decimal.scss | MIT License |
// Round a number to specified digits.
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
mfd /
Last active Jul 13, 2019 — forked from AndrewBarba/sanfrancisco-font.css
San Francisco Web Font

Web fonts

Custom webfonts

<link rel="stylesheet prefetch" href="">

mfd /
Created Dec 5, 2016 — forked from cobyism/
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

mfd / Less BEM-styled selectors
Created Nov 21, 2016 — forked from orlovmax/Less BEM-styled selectors
Less/Scss trick to generate BEM-styled selectors
View Less BEM-styled selectors
Less css trick to generate BEM-styled selectors, by Max Shirsin, + Scss version
@block: ~".dm-import-feed";
@{block} {
&_step_2 {
@{block}__page_step_2 {
display: block;
mfd / jade-blocks.jade
Created Nov 21, 2016 — forked from orlovmax/jade-blocks.jade
Enhanced Jade templates - BEM blocks + pass some data
View jade-blocks.jade
// Define navigation mixin
mixin nav(args)
- items = args.items || {}
- active = || {}
- nav = args.nav || {}
- list = args.list || {}
- item = args.item || {}
- item_active = args.item_active || {}
mfd / mixins.jade
Created Sep 6, 2016 — forked from shaneriley/mixins.jade
Jade mixins example
View mixins.jade
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
mfd / modal.js
Created Jul 28, 2016 — forked from navdeepsingh/modal.js
Load Dynamic (AJAX) modal in Bootstrap 3, remove from DOM after timeout
View modal.js
$('[data-toggle="modal"]').click(function () {
var url = $(this).attr('href');
$.get(url, function (data) {
var modal = $('<div id="clue-modal" class="modal fade" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content">' + data + '</div></div></div>').modal();
modal.on("", function () {
You can’t perform that action at this time.