Skip to content

Instantly share code, notes, and snippets.

# Require any additional compass plugins here.
require "json"
# Set this to the root of your project when deployed:
# Drupal - http_path = "/sites/all/themes/#{THEME_FOLDER}/"
# Wordpress - http_path = "/wp-content/themes/#{THEME_FOLDER}/"
THEME_FOLDER = File.basename(File.dirname(__FILE__))
http_path = "/"
css_dir = "css"
sass_dir = "sass"
# These are my notes from the PragProg book on CoffeeScript of things that either
# aren't in the main CS language reference or I didn't pick them up there. I wrote
# them down before I forgot, and put it here for others but mainly as a reference for
# myself.
# assign arguments in constructor to properties of the same name:
class Thingie
constructor: (@name, @url) ->
# is the same as:
@ezekg
ezekg / promises.md
Last active August 29, 2015 14:06 — forked from meagar/promises.md

##JavaScript isn't threaded

  • Synchronous code locks up the browser
  • Asynchronous code frees up the browser but leads to...

##Async callback hell

"Return" values are no longer available to our synchronous code

@ezekg
ezekg / SassMeister-input.scss
Last active August 29, 2015 14:06
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// Flint (v1.12.0)
// ----
@import "flint";
@include _(foundation);
@ezekg
ezekg / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// Bootstrap Sass (v3.2.0.2)
// ----
@import "bootstrap";
@mixin make-custom-column($args) {
$grid: nth($args, 5);
require 'mina/git' # Require mina/git
set :term_mode, nil # Bug in OS X that makes the password promp kinda fishy...
set :domain, 'example.com' # The web servers SSH domain
set :deploy_to, '/home/user/my-site' # Full path to where you want Mina to deploy
set :repository, 'https://USERNAME@bitbucket.org/USERNAME/REPOSITORY.git' # The git repository Mina shall use
set :branch, 'master' # What git branch Mina should get
set :user, 'username' # What username to connect with through SSH
set :current_path, 'www' # What file should be the current version. Probably 'www', 'public_html' or perhaps 'current'.
@ezekg
ezekg / SassMeister-input.scss
Last active August 29, 2015 14:08
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
///
/// Customization modules
///
/// @type {Map}
///
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@ezekg
ezekg / .env.development
Last active August 29, 2015 14:10
Multiple WP environments with Dotenv and Composer
DB_NAME=database
DB_USER=user
DB_PASSWORD=pass
DB_HOST=localhost
WP_HOME=http://example.dev
WP_SITEURL=http://example.dev/wp
<?php
$blueprint = json_decode( '{
"sample": {
"themes": [
"automattic/_s"
],
"mu_plugins": {
"wds-required-plugins": "https://github.com/WebDevStudios/WDS-Required-Plugins.git"
},