Skip to content

Instantly share code, notes, and snippets.

// Reset spaces between display inline-block els
.el {
letter-spacing: -.31em;
word-spacing: -.43em;
}
// Hide text
.el {
font: 0/0 a;
text-shadow: none;
@arturkot
arturkot / rsync
Created November 27, 2012 08:21
Rsync SSH
rsync -rtvz --exclude '.DS_Store' [homeDir] -e 'ssh -p 59184' [domain]:[path]
<?php
// bah
?>
<a href="#" title="<?php the_time('h:i a'); ?>" rel="bookmark">
<time class="entry-date" datetime="<?php the_time('c'); ?>"><?php the_time( 'jS F Y' ); ?></time>
</a>
@arturkot
arturkot / gist:4285809
Created December 14, 2012 14:27
IE 7 – add bullets
if ($(html).hasClass('ie7')) {
$('.big-list').children('li').each(function() {
var $this = $(this),
txt = $this.text();
$this.text('*' + txt);
});
}
@arturkot
arturkot / gist:4285814
Created December 14, 2012 14:28
:focus for IE 7
if ($(html).hasClass('ie7')) {
$('input, textarea')
.focusin(function() { $(this).addClass('focus'); })
.focusout(function() { $(this).removeClass('focus'); });
}
@arturkot
arturkot / gist:4707299
Created February 4, 2013 15:10
LESS conventions
.selector {
property: value;
}
.selector {
.other-selector: { property: value; }
property: value;
}
.bg('common/bg_more-about-host.png', , , 130px 9px); // This example returns error.
.bg('common/bg_more-about-host.png', ~'', ~'', 130px 9px); // This is ok.
@arturkot
arturkot / gist:5040095
Created February 26, 2013 16:58
SVN refresh
svn add $( svn status | sed -e '/^?/!d' -e 's/^?//' )
svn delete $( svn status | sed -e '/^!/!d' -e 's/^!//' )
@arturkot
arturkot / gist:5151337
Created March 13, 2013 11:42
Examplary main JS
/*jslint browser: true, nomen: true */
/*globals jQuery */
(function ($) {
"use strict";
var App = {
/**
* Init Function
{
"colorPrimary": "#E2299E",
"colorSecondary": "#8D7B87",
"colorBg": "#EBD5E4",
"colorGradient": ["#b9157f", "#db2b9b"],
"minRange": "0",
"maxRange": "250000",
"isEasing": "true",