Skip to content

Instantly share code, notes, and snippets.

View mswanson's full-sized avatar

Michael Swanson mswanson

View GitHub Profile
@yevgenko
yevgenko / composer.json
Created September 11, 2012 08:45
Example of using composer.phar for wordpress plugins/themes dependency management
{
"name": "yevgenko/wordpress-site",
"description": "Some WP powered site",
"repositories": {
"wordpress": {
"type": "package",
"package": [
{
"name": "plugins/db-toolkit",
"type": "wordpress-plugin",
@caycefischer
caycefischer / webdev-candyland.md
Last active July 26, 2020 04:23
setting up my web development environment on Mountain Lion

Setting up Mac OSX Lion for Web Development

These are the steps I take to set up a new install of OSX Mountain Lion for web development.


1. Tweak some OS X "hacker defaults"

Run my fork of Mathias Bynens' legendary script:

@there4
there4 / handlebars-helpers.js
Created June 10, 2012 00:23 — forked from elidupuis/handlebars-helpers.js
Simple Handlebars.js helpers
define([
"use!underscore",
"use!handlebars",
"moment"
],
function(
_, Handlebars, Moment
) {
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@innotekservices
innotekservices / jquery.spin.js
Created October 16, 2011 02:39
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@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
@lukemorton
lukemorton / README.markdown
Created June 4, 2011 13:32
Set caret position via jQuery

jQuery Caret

This is a very simple lightweight plugin to allow you to move the caret (or cursor) position in an <input /> or <textarea> element.

By exposing three jQuery.fn methods you can easily move a a caret to any position you like:

$.fn.caretTo( index , [ offset ] )

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables