Skip to content

Instantly share code, notes, and snippets.

View fmal's full-sized avatar
:octocat:
:octocat:‎ ‎‎‎ ‎ ‎:octocat:

Filip Malinowski fmal

:octocat:
:octocat:‎ ‎‎‎ ‎ ‎:octocat:
View GitHub Profile
@fmal
fmal / _mixin-better.scss
Created September 29, 2012 18:56 — forked from necolas/_mixin-better.scss
Sass grid construction
// Still need to work out how to combine rules for numbers
// that share a greatest common factor without the unit-builder
// actually containing the fraction to which they can both be
// reduced.
// Calculate the greatest common factor of two integers
@function gcf($a, $b) {
@if $b == 0 {
@return $a;
}
@fmal
fmal / gist:4012134
Created November 4, 2012 14:31
Ruby 1.8.7 on OS X 10.8 Mountain Lion
# Install homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
# Install command line tools for Xcode -- requires free Apple ID
http://developer.apple.com/downloads
# Install requirements
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42 rbenv ruby-build
@fmal
fmal / gist:4012195
Created November 4, 2012 14:58
RubyCocoa Homebrew
brew update
wget https://raw.github.com/gist/3258648/9f98d466e00d39ef7ef9555b0f0967afe0c29dc2/rubycocoa.rb -O /usr/local/Library/Formula/rubycocoa.rb
brew install rubycocoa
@fmal
fmal / gist:4050781
Created November 10, 2012 11:17
CSS: ellipsis
.ellipsis {
-o-text-overflow: ellipsis;
overflow: hidden;
text-overflow: ellipsis;
text-wrap: none;
white-space: nowrap;
word-wrap: none;
}
@fmal
fmal / index.html
Created November 27, 2012 17:58 — forked from caycefischer/index.html
Just Harry Roberts' nav abstraction, robust-ified with code to eliminate the whitespace between inline-block elements. I have to do this every time anyway, so now it's built into the snippet.Monospace font is set to ensure the amount of space is as cons
<div class="nav">
<li class="box"><a href="">One</a></li>
<li class="box"><a href="">Two</a></li>
<li class="box"><a href="">Three</a></li>
</div>
@fmal
fmal / asset.sh
Created December 20, 2012 18:20
render html to pdf
wkpdf --source http://google.com/ --output cv.pdf --paper letter --orientation portrait --margins 0 --print-background yes
data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=
@fmal
fmal / asset.css
Created January 14, 2013 22:47
Center elements vertically
.inliner {
height: 100%;
}
.inliner,
.inliner + * {
display: inline-block;
vertical-align: middle;
}
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
staging: 'dist/debug/',
production: 'dist/release/',
pkg: grunt.file.readJSON('package.json'),
@fmal
fmal / input.scss
Created February 3, 2013 00:08 — forked from kaelig/input.scss
%myclass {
color: blue;
@media (min-width: 600px) {
background: red;
}
@media (min-width: 800px) {
font-size: 28px;
}
}