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
<IfModule mod_rewrite.c> | |
# Enable Rewrite Engine | |
# ------------------------------ | |
RewriteEngine On | |
RewriteBase / | |
# Redirect index.php Requests | |
# ------------------------------ | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] |
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
// REQUIRED VARS. Defaults to a 950px wide, 24-column grid that has 30px wide units and 10px wide | |
// gutters. If you do the fluid grid, then this 950/24/30/10px size will become the maximum size. | |
$grid_type: fixed !default | |
$grid_columns: 24 !default | |
$grid_column_width: 30 !default | |
$grid_gutter_width: 10 !default | |
// GENERATED VARS. You can ignore these. | |
$grid_full_width: $grid_columns * $grid_column_width + $grid_columns * $grid_gutter_width - $grid_gutter_width | |
$grid_column_width_percent: ($grid_column_width / $grid_full_width * 100) * 1% |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hiding JavaScript-Dependent Content</title> | |
<script type="text/javascript"> | |
var html = document.getElementsByTagName('html')[0]; | |
html.className = (html.className != '' ? html.className + ' ' : '') + 'js'; | |
</script> | |
</head> |
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
// Clear Default Text Input Value on Focus | |
$('input[type="text"]').each(function(){ | |
var def = $(this).attr('placeholder') != '' && $(this).attr('placeholder') != undefined ? $(this).attr('placeholder') : $(this).attr('value'); | |
$(this).val(def).attr('placeholder',''); | |
$(this).focus(function(){ | |
if($(this).val() == def){ | |
$(this).removeClass('placeholder').val(''); | |
} | |
}).blur(function(){ | |
if($(this).val() == ''){ |
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
// Open All External Links in a New Tab | |
$('a').not('[href^="/"],[href*="' + window.location.host + '"]').attr('target','_blank'); |
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
<!DOCTYPE html> | |
<html > | |
<head> | |
<meta charset="UTF-8"> | |
<title>Code Pen · 14</title> | |
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/normalize.css"> | |
<style> |
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
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iOS\ Simulator.app |
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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
Motion::Project::App.setup do |app| | |
# Dependencies | |
app.files.unshift(*Dir['vendor/teacup/lib/**/*.rb']) | |
# Config – Use `rake config' to see complete project settings. | |
config = { |
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 App.Model extends Batman.Model | |
@persist App.Storage | |
@encodeAttributesFor: -> | |
@encodeAttributesForKeys ?= [] | |
for key in arguments | |
if typeof key == 'string' | |
@encodeAttributesForKeys.splice(index,1) if (index = @encodeAttributesForKeys.indexOf(key)) > 0 | |
@encodeAttributesForKeys.push key |
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
// Border Shorthand | |
// ------------------------- | |
=border($border: false, $border_horizontal: false, $border_bottom: false, $border_left: false) | |
$args: length($border) | |
// Reset Variables Based on Argument Count | |
@if $args > 1 and length(nth($border,1)) > 1 or nth($border,1) == none | |
@if $args == 4 | |
$border_left: nth($border, 4) |
OlderNewer