Skip to content

Instantly share code, notes, and snippets.

View gbertb's full-sized avatar

Gilbert Bagaoisan gbertb

  • San Francisco, CA
View GitHub Profile
@johnhunter
johnhunter / table-cell-background.html
Created August 27, 2011 14:36
TextMate snippet: table cell background (html email)
<!--
Don't forget to add:
<html xmlns:v="urn:schemas-microsoft-com:vml">
-->
<!--[if gte mso 9]>
<v:image xmlns:v="urn:schemas-microsoft-com:vml" style='behavior: url(#default#VML);
display: inline-block;
position: absolute;
height: ${1:100}px;
width: ${2:100}px;
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@coolaj86
coolaj86 / gist:2332953
Last active April 2, 2020 04:17
Dimensions for VistaPrint business cards
Standard
Bleed Margin: 90mm x 52mm
Content Ends: 87mm x 49mm
Imperial
Bleed Margin: 3.54in x 2.05in
Content Ends: 3.43in x 1.93in
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@awshout
awshout / foundation4-topbar-menu.php
Last active August 19, 2023 02:44
WordPress Menu & Walker for ZURB's Foundation 4 Top Bar
<?php
add_theme_support('menus');
/**
* Register Menus
* http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples
*/
register_nav_menus(array(
'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor
'top-bar-r' => 'Right Top Bar'
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@madrobby
madrobby / gist:4161897
Created November 28, 2012 15:16
Retina screen media query
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi),
(min-resolution: 1.5dppx) {
/* Retina rules! */
}
@tessalt
tessalt / caret.scss
Last active October 13, 2015 21:58
caret
%pseudo-content-before {
position: relative;
&:before {
content: " ";
position: absolute;
display: block;
}
}
%pseudo-content-after {
@max-mapper
max-mapper / index.html
Created December 11, 2012 23:46
html5 checkbox toggle button
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://gather.at/home/stylesheets/sprite.css" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div style="width: 200px; margin: 10px; padding: 10px; border: 1px solid gray;">
<div class="share-wrapper">
<input class="share-option" name="twitter" type="checkbox">