This file contains hidden or 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
module ApplicationHelper | |
# | |
# Returns css class for <body> | |
# | |
def body_class | |
body_class = [] | |
body_class << (params[:controller].gsub('_','-') rescue nil) | |
body_class << (params[:action].gsub('_','-') rescue nil) | |
body_class << @body_class if @body_class |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
@media (min-width: \$min_width_${1:size}) { | |
${2} | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>@media</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
This file contains hidden or 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
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages | |
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Packages | |
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages | |
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages | |
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Packages | |
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages | |
This file contains hidden or 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
# | |
# Convert mp4 to m4v, ogv & gif | |
# | |
# Dependencies: | |
# * ffmpeg (brew install ffmpeg) | |
# * ffmpeg2theora (brew install ffmpeg2theora) | |
# | |
# Put this file in a folder containing mp4's you want to convert. | |
# | |
# In terminal run following command: |
This file contains hidden or 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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
This file contains hidden or 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
// | |
// Spiderman is a mixin to absolute position an element | |
// in his first relative parent, top to bottom, left to right. | |
// | |
// @param $offset Offset from the edge | |
// | |
@mixin spiderman($offset: 0) { | |
bottom: $offset; | |
left: $offset; | |
position: absolute; |
This file contains hidden or 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
class Parent | |
def self.name(name) | |
@name = name | |
puts @name | |
end | |
def whoami | |
puts "I'm the parent #{@name}" | |
end |
This file contains hidden or 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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
This file contains hidden or 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
<?php if ( wp_is_mobile() ) : ?> | |
<!-- HTML for mobile --> | |
<?php else : ?> | |
<!-- HTML for not mobile() --> | |
<?php endif; ?> |
This file contains hidden or 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
// | |
// Shake horizontally | |
// | |
// Use: | |
// @include animation(shake-x 1s); | |
// | |
@include keyframes(shake-x) { | |
0%, 100% { | |
@include translateX(0); | |
} |