Skip to content

Instantly share code, notes, and snippets.

View lunaroja's full-sized avatar

Abraham Velazquez Tello lunaroja

View GitHub Profile
<?php
/**
* Premailer API PHP class
* Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail
* Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal
* Premailer is owned by Dialect Communications group
* @link http://premailer.dialect.ca/api
* @author Marcus Bointon <[email protected]>
*/
@lunaroja
lunaroja / fb-debug.js
Created February 14, 2013 03:01
Open URL in Facebook Debugger
javascript: (function(){window.location='https://developers.facebook.com/tools/debug/og/object?q='+escape(window.location.href);})();
@lunaroja
lunaroja / oldie.html
Created February 11, 2013 16:50
oldie html class
<!DOCTYPE html>
<!--[if lte IE 8]><html lang="en" class="no-js oldie"><![endif]-->
<!--[if gte IE 9]<!--><html class='no-js' lang='en'><!--<![endif]-->
<head>
<meta charset='utf-8' />
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible' />
<title>Title</title>
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
</head>
@lunaroja
lunaroja / gist:4126532
Created November 21, 2012 18:00
Sublime Text User Preferences
{
"close_windows_when_empty": true,
"color_scheme": "Packages/Color Scheme - Default/Pastels on Dark.tmTheme",
"draw_indent_guides": false,
"fade_fold_buttons": false,
"font_face": "Monaco",
"font_options":
[
"no_antialias"
],
@lunaroja
lunaroja / gist:4043755
Created November 9, 2012 04:48
Open external link in new window with jQuery
$("a[href^='http']:not([href*='" + window.location.hostname + "'])").attr("target","_blank");
@lunaroja
lunaroja / gist:3900723
Created October 16, 2012 17:27
iPhone 5 - Web-App Capable with no Letterbox
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="360">
<meta name="viewport" content="user-scalable=no">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0">
<meta name="viewport" content="width=320.1">
@lunaroja
lunaroja / quickcurrency.js
Created February 2, 2012 19:25
Quick Currency formatter
/* JavaScript: US currency helper functions
-------------------------------------------------------*/
/**
* Formats any number, string or HTML string to a number with two trailing decimals
* @param {String} html Any number, string or HTML string
* @return {Number} Returns a number with two trailing decimals
*/
var toCurrency = function(html) {
var currency = html.match(/[\d\.]+/g);