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
#!/usr/bin/env ruby | |
# Texmate command: open markdown links | |
# <http://macromates.com/> | |
# [My favorite editor](http://macromates.com/) | |
idx = ENV['TM_LINE_INDEX'].to_i | |
line = ENV['TM_CURRENT_LINE'] | |
alt_tokens = line.include?('<') && line.include?('>') | |
b_token = alt_tokens ? '<' : '(' | |
e_token = alt_tokens ? '>' : ')' |
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
/* Cross browser transparency */ | |
.transparent_class { | |
filter:alpha(opacity=50); | |
-moz-opacity:0.5; | |
-khtml-opacity: 0.5; | |
opacity: 0.5; | |
} |
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
// expects a number from 0 to 100 | |
=opacity(!opacity) | |
:opacity= !opacity / 100 | |
:-moz-opacity= !opacity / 100 | |
:-ms-filter= "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{!opacity})" | |
:filter= "alpha(opacity=#{!opacity})" |
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
<?php | |
// LIMONADE SESSION FEATURES EXAMPLES | |
require_once 'lib/limonade.php'; | |
function configure() | |
{ | |
// by default, session is enable. It automaticaly start a session with LIM_SESSION_NAME as name | |
option('session', false); // disable | |
option('session', true); // enable |
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
<?php | |
// LIMONADE FLASH FEATURES EXAMPLES | |
require_once 'lib/limonade.php'; | |
function configure() | |
{ | |
option('env', ENV_DEVELOPMENT); | |
} | |
function before() |
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
<?php | |
# LIMONADE URL REWRITING EXAMPLE | |
# In your .htaccess in your app folder | |
# <IfModule mod_rewrite.c> | |
# Options +FollowSymlinks | |
# Options +Indexes | |
# RewriteEngine on |
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
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return 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
=clearfix | |
overflow: hidden | |
+has-layout | |
/* clears while allowing overflow (great for use with box shadows) | |
=pie-clearfix | |
&:after | |
content: " " | |
display: block | |
height: 0 |
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 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. | |
// |
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/bash | |
HOSTSFILE="/etc/hosts" | |
BAKFILE="$HOSTSFILE.bak" | |
DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
backup() | |
{ |
OlderNewer