Skip to content

Instantly share code, notes, and snippets.

View ToddSmithSalter's full-sized avatar

Todd Smith-Salter ToddSmithSalter

View GitHub Profile
@md5
md5 / 00_README.md
Last active March 20, 2024 00:19
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@jerel
jerel / controllers-post.js
Last active August 29, 2015 14:05
Ember 1.7 comment pagination example extracted from a working app
import Ember from 'ember';
export default Ember.ObjectController.extend({
queryParams: ['page'],
page: 1,
comments: Ember.K(),
paginationObserver: function() {
var id = this.get('id'),
page = this.get('page'),
@mmcgahan
mmcgahan / gist:9fa045d98c7c122f1c0b
Created June 18, 2014 19:09
Handlebars template inheritance
# Template composition with inclusion
Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance:
```html
<!-- home.hbs -->
<html>
<body>
{{> header}}
<p> HOME </p>
{{> footer}}
@dustinfarris
dustinfarris / circle.yml
Last active February 14, 2017 19:48
CircleCI script for Ember-CLI projects
machine:
node:
version: 0.10.28
dependencies:
pre:
- npm install -g bower
override:
- npm i
- bower i
deployment:
@patrickhammond
patrickhammond / android_instructions.md
Last active March 29, 2024 20:14
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@thepsion5
thepsion5 / LaravelValidator.php
Last active November 10, 2016 07:25
Demonstration of a simple wrapper for Laravel's Validator that allows rules to be altered based on input before validating and exceptions as transports for validation errors
<?php
use Illuminate\Support\MessageBag,
Illuminate\Validation\Factory;
/**
* A simple wrapper for Laravel's native validator. Allows
* validation rules to be modified pre-validation based on
* input and can be used to throw an exception with the
* input and validation failures
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@jackie
jackie / breakpoints.json
Last active December 19, 2015 15:28
Sass Script function to get breakpoint values from a JSON file.
{
"phone" : "all and (max-width: 603px)",
"desktop": "all and (min-width: 1025px)",
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)"
}
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.