Skip to content

Instantly share code, notes, and snippets.

Writing the codes, pushing the fixes

Jamie Schembri shkm

Writing the codes, pushing the fixes
Block or report user

Report or block shkm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shkm / _mixins.scss
Created Oct 21, 2013
Retina sprites. Given a normal and retina sprite map, along with the name of the sprite, this does magic things. Requires a retina mixin, such as
View _mixins.scss
// Include normal and retina sprites. Requires retina mixin.
@mixin retina-sprite($map-1x, $map-2x, $sprite, $dimensions: true) {
$position-1x: sprite-position($map-1x, $sprite);
background: sprite-url($map-1x) $position-1x no-repeat;
@if $dimensions {
@include sprite-dimensions($map-1x, $sprite);
@include retina {
shkm / _mixins.scss
Last active Dec 26, 2015
Retina mixin
View _mixins.scss
@mixin retina {
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dppx) {
shkm / gist:7008739
Created Oct 16, 2013
Multi-size favicon.ico with ImageMagick
View gist:7008739
convert favicon-16x16.png favicon-32x32.png favicon.ico
shkm / gist:6165319
Created Aug 6, 2013 bookmarklet
View gist:6165319
shkm / conosle.js
Created May 22, 2013
Brings conosle to Chrome. See
View conosle.js
conosle = console;
shkm / mirror.exclude
Last active Dec 17, 2015
Bootable OS X backups with rsync. Based on Nicolas Gallagher's script (
View mirror.exclude
- .Spotlight-*/
- .Trashes
- .DocumentRevisions-*/
- /.dbfseventsd
- .fseventsd/
- /tmp/*
- /Network/*
- /cores/*
- /afs/*
- /automount/*
shkm / ValidatingModel.php
Last active Dec 16, 2015
Laravel self-validating model. Child models need only extend `getRules()` and return their own rules array. Loosely based on Jeffrey Way's (
View ValidatingModel.php
abstract class ValidatingModel extends \Eloquent
public $errors;
public static function boot()
shkm / register_post_type.sublime-snippet
Created May 3, 2012 — forked from ninnypants/cpt.sublime-snippet
register_post_type snippet for Sublime Text 2
View register_post_type.sublime-snippet
register_post_type('${1:slug}', array(
${2:'labels' => array(
${3:'name' => _x( '${4:Plural Name}', '${5:translation context}', '${6:translation domain}' ),}
${8:'singular_name' => _x( '${9:Singular Name}', '${10:translation context}', '${6:translation domain}' ),}
${11:'add_new' => _x( '${12:Add new}', '$9', '${6:translation domain}' ),}
${13:'add_new_item' => __( '$12 $9', '${6:translation domain}' ),}
${14:'edit_item' => __( 'Edit ${15:$9}', '${6:translation domain}' ),}
${16:'new_item' => __( 'New ${17:$9}', '${6:translation domain}' ),}
shkm / gist:1821872
Created Feb 14, 2012
Add Seperator to Dock in OS X
View gist:1821872
defaults write persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }' && killall Dock
shkm / gist:1821866
Created Feb 14, 2012
Pixel-based Dock Resizing in OS X
View gist:1821866
defaults write tilesize -int <SizeInPixels> && killall Dock
You can’t perform that action at this time.