This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=responsive($to) | |
@if $to == phone | |
@media only screen and (max-width: 479px) | |
@content | |
@else if $to == landscape | |
@media only screen and (min-width: 480px) and (max-width: 767px) | |
@content | |
@else if $to == tablet | |
@media only screen and (min-width: 768px) and (max-width: 959px) | |
@content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a fluid content area. This should be used rather than floating and setting widths | |
// for increased flex. They can be rearranged with responsive queries later | |
=split($params) | |
@for $i from 1 to length($params) + 1 | |
& > *:nth-child(#{$i}) | |
float: left | |
width: nth($params, $i) | |
// Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.imgFade = (time) -> | |
# set default time | |
time ?= 500 | |
# wrap it | |
this.wrap("<div class='#{this.attr('class')}' />") | |
wrapper = | |
this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// here's an array | |
arr = [] | |
// here's some shit in an array | |
arr = ['some', 'shit'] | |
// here's adding some shit to an array | |
arr.push('more shit') | |
// here's counting the number of things in an array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# -------------------------------------------------------------------------------------- | |
# Sets up your computer with the tools you need to develop in a modern ruby environment. | |
# -------------------------------------------------------------------------------------- | |
# This install includes: | |
# - homebrew | |
# - rbenv | |
# - ruby-build | |
# - ruby 1.9.3-p125 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------- | |
# Sensical Sentence Scrambler | |
# --------------------------- | |
# This short program takes any word longer than three characters and randomly shuffles all the characters | |
# except for the first and the last. Strangely enough, sentences are still quite readable like this. | |
# **Usage** | |
# Save the file on your computer as 'scramble.rb'. | |
# From the command line, run `ruby scramble.rb "Here's my sentence!"`, and it should output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hover-darken(percent) | |
if @background | |
&:hover | |
background: darken(@background, percent) | |
.test | |
background: blue | |
hover-darken(50%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Installation instructions: | |
# - Download the file | |
# - mv finalize.sh finalize | |
# - chmod +x finalize | |
# - mv finalize /usr/local/bin | |
# - now you can type `finalize` in any directory and it should work | |
# NOTE: this will rename all the files in your current directory, so be careful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@blue: #30B5CE | |
.transition(@params: all .25s ease) { | |
-webkit-transition: @params | |
-moz-transition: @params | |
transition: @params | |
} | |
.box { | |
background: darken(@blue, 10%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=button($bgcolor) | |
$dark-text: if( lightness($bgcolor) < 60%, true, false ) | |
$text-color: if( $dark-text, $white, #494949 ) | |
background: $bgcolor | |
color: $text-color | |
.box | |
+button(#CE5543) |