Skip to content

Instantly share code, notes, and snippets.

View martylouis's full-sized avatar

Marty Thierry martylouis

View GitHub Profile
@martylouis
martylouis / placeholder.js
Last active August 29, 2015 13:57
Get placeholders to work on all browsers
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() === input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() === '' || input.val() === input.attr('placeholder')) {
input.addClass('placeholder');
@martylouis
martylouis / svg-css.txt
Last active December 30, 2015 01:59
CSS properties for SVG
## FILL ##
fill Sets fill color of the shape.
fill-opacity Sets fill opacity of the shape.
fill-rule Sets fill rule of the shape.
** example **
fill: #ccc;
fill: rgba(0,0,0,.5);
fill: red;
@martylouis
martylouis / Preferences.sublime-settings
Last active December 21, 2015 21:59
Sublime Text 3 prefs
{
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"detect-slow-plugins": false,
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"file_exclude_patterns":
[
@martylouis
martylouis / clearfix.css
Created April 26, 2013 18:40
CSS: Clearfix
.clearfix:before, .clearfix:after {content: ""; display: table;}
.clearfix:after {clear: both;}
.clearfix {zoom: 1;}
@martylouis
martylouis / twitter-widget.js
Last active October 13, 2015 18:08
Custom twitter widget
// Custom Twitter Widget
$(document).ready(function() {
$.getScript('http://widgets.twimg.com/j/2/widget.js', function() {
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 3,
id: 'twitterWidget',
interval: 9999,
width: "auto",
@martylouis
martylouis / gist:3905934
Last active May 31, 2017 16:29
basic .gitignore
We couldn’t find that file to show.
@martylouis
martylouis / ir.css
Created July 3, 2012 00:59
CSS: Image Replacement
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}