Skip to content

Instantly share code, notes, and snippets.

View dgrigg's full-sized avatar

Derrick Grigg dgrigg

View GitHub Profile
@dgrigg
dgrigg / webpack.config.js
Created May 30, 2019 18:19
Webpack + Twig setup
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const WebpackNotifierPlugin = require('webpack-notifier');
const TailwindCss = require('tailwindcss');
const AutoPrefixer = require('autoprefixer');
const path = require('path');
@dgrigg
dgrigg / composer.json
Created January 30, 2018 17:42
Setting up a CraftCMS website and plugins with Composer
{
"name": "idcorp/silverado",
"type": "project",
"authors": [
{
"name": "Derrick Grigg",
"email": "derrick@dgrigg.com"
}
],
"minimum-stability": "dev",
@dgrigg
dgrigg / package.json
Created May 9, 2016 14:18
NPM scripts for compiling sass/css and js using compass and browserify, minifies files, copies resources etc.
{
"name": "NPM build scripts",
"version": "1.0.0",
"description": "NPM Scripts to compile and build sass and javascript",
"main": "index.js",
"scripts": {
"js:browserify": "browserify -t debowerify src/js/main.js -o public/js/main.js",
"js:compile": "uglifyjs public/js/main.js -b -o public/js/main.js",
"js:minify": "uglifyjs public/js/main.js -o public/js/main.min.js",
"copy": "copyfiles -f src/fonts/* html/fonts",
@dgrigg
dgrigg / json_exception_helper.php
Created November 22, 2013 21:14
A CodeIgniter helper function for returning JSON errors messages to AJAX calls instead of standard HTML error page. Use the helper instead of having to override the core Exception class.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
function show_json_error($message, $status_code = 500, $status_message = '')
{
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: application/json');
set_status_header($status_code, $status_message);
echo json_encode(

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.