Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View niallobrien's full-sized avatar

Niall O'Brien niallobrien

  • Waterford, Ireland
View GitHub Profile
@niallobrien
niallobrien / gist:7118965
Created October 23, 2013 13:39
Bonfire.js
A self-hosted backend platform for front-end developers to easily create sophisticated, realtime web applications.
Bonfire will be a node.js backend platform for developing a realtime API. It also provides common integrations that sophisticated realtime web applications require. Bonfire is being developed so that your typical front-end developer will rarely have to touch backend code.
How?
Bonfire will sit on top of Sails.js (node.js, Express & Socket.io) and will use MongoDB.
It will allow front-end developers to perform CRUD operations via websockets upon the backend data. Security restrictions will be written & enforced server-side. This will closely model Firebase in this regard.
What Else?
As a front-end developer, there’s only so much you can do before you will need your own backend (even when using something like Firebase). Since we will already have a backend running for you to deploy, we’ll also include common (opinionated) integrations and features common to most web apps (as discussed above). Su
niallobrien@Nialls-MacBook-Pro:~/dev/js/hoodie
$ ls
niallobrien@Nialls-MacBook-Pro:~/dev/js/hoodie
$ hoodie new myapp hoodiehq/my-first-hoodie#plugins
.d$b. .d$b. .d$$$$$$b. .d$$$$$$b. .d$$$$$$b. .d$b..d$$$$$$$$b.
$$$$$..$$$$$.$$$$$$$$$$$b .$$$$$$$$$$$b $$$$$$$$$$b $$$$$$$$$$$$$$$P'
$$$$$$$$$$$$d$$$$$$$$$$$$bd$$$$$$$$$$$$b$$$$$$$$$$$b$$$$$$$$$$$$$$$b.
$$$$$$$$$$$$Q$$$$$$$$$$$$PQ$$$$$$$$$$$$P$$$$$$$$$$$P$$$$$$$$$$$$$$$P'
$ hoodie start
.d$b. .d$b. .d$$$$$$b. .d$$$$$$b. .d$$$$$$b. .d$b..d$$$$$$$$b.
$$$$$..$$$$$.$$$$$$$$$$$b .$$$$$$$$$$$b $$$$$$$$$$b $$$$$$$$$$$$$$$P'
$$$$$$$$$$$$d$$$$$$$$$$$$bd$$$$$$$$$$$$b$$$$$$$$$$$b$$$$$$$$$$$$$$$b.
$$$$$$$$$$$$Q$$$$$$$$$$$$PQ$$$$$$$$$$$$P$$$$$$$$$$$P$$$$$$$$$$$$$$$P'
$$$$$´`$$$$$'$$$$$$$$$$$$''$$$$$$$$$$$$'$$$$$$$$$$P $$$$$$$$$$$$$$$b.
'Q$P' 'Q$P' 'Q$$$$$$P' 'Q$$$$$$P' 'Q$$$$$$$P 'Q$P''Q$$$$$$$$P'
Version: 0.2.7 (node v0.10.20, npm 1.3.11, platform: darwin)
@niallobrien
niallobrien / Gruntfile.js
Created October 8, 2013 10:05
Grunt file for Yeoman Angular generator (Bootstrap-sass ~3.0)
// Generated on 2013-10-07 using generator-angular 0.4.0
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
@niallobrien
niallobrien / 0_reuse_code.js
Created October 4, 2013 09:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@niallobrien
niallobrien / Gruntfile.js
Last active December 24, 2015 11:59
Yeoman + Angular + Bootstrap v3
// Generated on 2013-10-02 using generator-angular 0.4.0
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
@niallobrien
niallobrien / gist:5669865
Created May 29, 2013 12:17
PHP OOP, implementing and interface & dependancy injection.
<?php
// Define the methods that must be implemented
interface MailerInterface
{
public function addEmail($email);
public function send();
}
// Implement the Interface methods in this class
@niallobrien
niallobrien / gist:5669430
Last active December 17, 2015 20:39
PHP simple IoC example
<?php
class Container
{
protected $registry = [];
// Typehint Closure to show expected object
public function bind($name, Closure $closure)
{
// Populate $registry array with passed-in $closure
$registry[$name] = $closure;
@niallobrien
niallobrien / gist:5405135
Created April 17, 2013 15:15
Install Ruby & Rails
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL -l
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p0
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv rehash
rbenv global 2.0.0-p0
gem install rails --no-ri --no-rdoc
@niallobrien
niallobrien / gist:5308804
Last active December 15, 2015 19:09
100% height sidebar
position: absolute; top:0; bottom:0;