Skip to content

Instantly share code, notes, and snippets.

View imathis's full-sized avatar
🍽️
Hungry for biscuits.

Brandon Mathis imathis

🍽️
Hungry for biscuits.
View GitHub Profile
// Create a simple top to bottom linear gradient with a background-color backup
// The first argument, $color will be output as background-color: $color
//
// This yields a gradient that is 5% brighter on the top and 5% darker on the bottom
//
// +gradient-bg(#777)
//
// This yeilds a gradient where the bright and dark colors are shifted 10% from the original color.
// If you don't specify a third argument it will assign this value for the darkness too, keeping the gradient even.
//
var flashPlayerLocation = "/assets/jwplayer/player.swf";
var flashPlayerSkin = "/assets/jwplayer/glow/glow.xml";
window.addEvent('domready', function() {
html5toFlash();
});
function html5toFlash(){
var videos = $$('video');
if(!videos){return}
// This helps you toggle CSS3 mixins to make sure your site design doesn't depend on them.
// Simply import this file to turn off all css3 called with Compass mixins.
// Comment out the import to turn them on again.
=linear-gradient($no: 0, $no: 0, $no: 0, $no: 0)
=box-shadow($no: 0, $no: 0, $no: 0, !no: 0)
=text-shadow($no: 0, $no: 0, $no: 0, $no: 0)
=border-radius($no: 0)
=border-top-left-radius($no: 0)
=border-top-right-radius($no: 0)
@imathis
imathis / _extensions.sass
Created November 5, 2010 18:58
Creates a nice 3D ribbon effect with CSS only
=gradient-bg($color, $top: 5, $bottom: $top)
@if $top < 0 and $bottom < 0
$color1: darken($color, abs($top))
$color2: lighten($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
@else
$color1: lighten($color, abs($top))
$color2: darken($color, abs($bottom))
+linear-gradient(color-stops($color1, $color2))
background-color: $color
@imathis
imathis / iOS-pictos-buttons.sass
Created November 8, 2010 19:24
Some simple classes to be used with @extend and the pictos font
+font-face("pictos-web", font-files("pictos-web", woff, "pictos-web.ttf", truetype, "pictos-web.svg#webfontIyfZbseF", svg), 'pictos-web.eot')
.pictos
font-family: 'pictos-web'
font-weight: normal
font-style: normal
=pictos-button($char)
@extend .pictos-button-style
&:before
content: $char
@imathis
imathis / apachectl fix
Created December 3, 2010 05:05
fix for allowing restarting apache via apachectl in OS X 10.5.6
`sudo apachectl restart` doesn't work in 10.5.6 you'll get this error:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
in OS X 10.5.6 Apple updated to Apache 2.2.15, which patched quite a few vulnerabilities (see http://support.apple.com/kb/HT4435) and also broke the apachectl script.
To get sorted, edit /usr/sbin/apachectl and replace line 82
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
@imathis
imathis / 3d.scss
Created January 5, 2011 23:23 — forked from chriseppstein/3d.scss
@function shadow-3d($thickness-shadow-color, $splash-shadow-color, $thickness, $angle: 0) {
$shadows: compact();
@if unit($thickness) != px { @warn "$thickness must be passed as a pixel value, eg: 5px." };
@for $i from 1 through $thickness/1px {
$shadows: append($shadows, 0 1px * $i 0 adjust-color($thickness-shadow-color, $lightness: -3.3% * ($i - 1)));
}
@each $values in (
0 $thickness + 1px 1px 0.1,
0 0 $thickness + 5px 0.3,
0 abs($thickness - 2px) 5px 0.2,
@imathis
imathis / test.diff
Created May 28, 2011 12:05
move along, just testing a syntax highlighter
@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase
it "should generate a sprite from nested folders" do
css = render <<-SCSS
- @import "nested/*.png";
+ @import "nested/**/*.png";
@include all-nested-sprites;
SCSS
assert_correct css, <<-CSS
@imathis
imathis / code_blocks.rb
Created June 15, 2011 16:04
Jekyll plugin to import code blocks from the filesystem for syntax highlighting
require 'pathname'
module Jekyll
class CodeBlockTag < Liquid::Tag
def initialize(tag_name, file, tokens)
super
@file = file.strip
end
@imathis
imathis / Pullquote.css
Created June 19, 2011 02:52
Jekyll Pullquote plugin for Octopress
.has-pullquote:before {
/* Reset metrics. */
padding: 0;
border: none;
/* Content */
content: attr(data-pullquote);
/* Pull out to the right, modular scale based margins. */
float: right;