Skip to content

Instantly share code, notes, and snippets.

View derekdreery's full-sized avatar

Richard Dodd (dodj) derekdreery

View GitHub Profile
@derekdreery
derekdreery / ActiveRecord Tutorial.md
Last active August 29, 2015 13:56
ActiveRecord Tutorial

Groupoffice ActiveRecord Tutorial

License

This document has no copyright protection whatsoever and you are free to do as you please with it. I don't take any responsibility for anything you do with this information though.

Introduction

The groupoffice ActiveRecord.php is a custom implementation of the [active record pattern][1] commonly used for database access from web applications. The system can seem complex and daunting at first, but as you get to know it you will find the time-saving features very helpful.

I may extend this to be a tutorial of the whole of groupoffice eventually.

This tutorial assumes you have a basic understanding of the groupoffice class autoloader and router. I give a quick recap below:

@pera
pera / .ghci
Last active November 3, 2017 13:01
GHCi dot file
-- You need to install IPPrint and HsColour with cabal to use this config.
-- If you find all the loading messages anoying you may want to set an alias:
-- alias ghci="ghci -v0"
-- Or if you are using stack ghci:
-- alias ghci="stack --silent ghci --ghci-options -v0"
:set -XNoMonomorphismRestriction
:set prompt "\ESC[34mλ\ESC[m "
-- remove the following comments if ghci >= v7.8.1 for multiline support:
@webdesserts
webdesserts / Gulpfile.js
Last active April 3, 2023 08:16
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.