Skip to content

Instantly share code, notes, and snippets.

View jonathanmoore's full-sized avatar
🚀
Building for Shopify

Jonathan Moore jonathanmoore

🚀
Building for Shopify
View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@balupton
balupton / README.md
Last active December 9, 2015 23:18
DocPad: Get Ruby, SASS and DocPad working on Heroku

DocPad: Get Ruby, SASS and DocPad working on Heroku

Getting Ruby, SASS and DocPad working on Heroku involves two steps:

  1. Ensuring all your plugins are the latest version. Open up your package.json and change all your docpad plugin dependency versions to 2.x and your docpad version to 6.x. Once done, run rm -Rf node_modules; npm install to grab the latest versions of everything.

  2. Installing Ruby and SASS on Heroku. Copy over the Gemfile, Gemfile.lock, and the .buildpacks files from https://github.com/docpad/sass-heroku-test to your own website. Then run heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git to tell heroku to use multiple buildpacks. Once done, deploy to heroku via git push heroku master and you may need to run heroku restart as sometimes the initial deploy fails.

@balupton
balupton / README.md
Last active October 11, 2015 18:08
DocPad: Minify your assets with Grunt

DocPad: Minify your assets with Grunt

The following will minify your assets with grunt each time a generation write completes.

Installation

  1. Install Dependencies
@dannygarcia
dannygarcia / grunt.js
Created September 20, 2012 02:39
Sample grunt-jekyll grunt.js
// Sample grunt-jekyll grunt.js file
// https://github.com/dannygarcia/grunt-jekyll
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jekyll: {
@65
65 / pinterest.js
Created February 26, 2012 01:28
pinterest buttons on every image in a blog post using jquery
$().ready(function() {
$('.entry-body img').each(function(){
var $permalink = $(this).parents('.entry').find('.permalink').attr('href');
$(this).wrap('<div class="pinme" style="' + $(this).attr('style') + '" />').after('<a href="http://pinterest.com/pin/create/button/?url=' + $permalink + '&media=' + $(this).attr('src') + '&description=' + $(this).attr('alt') + '" class="pin-it-button" count-layout="vertical">Pin It</a>');
});
$('.pinme').hover(function() {
$(this).children('iframe').css('display','block');
}, function() {
$(this).children('iframe').css('display','none');
@yconst
yconst / gist:964345
Created May 10, 2011 12:00 — forked from paulirish/README.md
imagesLoaded() jquery plugin
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.