Skip to content

Instantly share code, notes, and snippets.

View jimthedev's full-sized avatar

Jim Cummins jimthedev

View GitHub Profile
@jimthedev
jimthedev / emo.php
Created May 7, 2013 17:09
Command line wrapper for emogrifier written in PHP
<?php
/* DETECT CLI MODE */
if ( isset($_SERVER['argc']) && $_SERVER['argc']>=1 ) {
/* CHECK FOR EMOGRIFIER.PHP */
if(!file_exists(dirname(__FILE__).'/emogrifier.php')) {
quit(1,"emogrifier.php is missing.");
}
require_once(dirname(__FILE__).'/emogrifier.php');
@jimthedev
jimthedev / aliases
Created May 7, 2013 17:42
Bash script at ~/.emo/aliases that calls emo.php, the emogrifier wrapper
myemo(){
php ~/.emo/emo.php $1 $2 $3
}
alias emo=myemo
@jimthedev
jimthedev / emo.sublime-build
Created May 11, 2013 07:26
SublimeText2 Build File for Emogrifier Wrapper (emo.php)
{
"cmd": ["/usr/bin/php ~/.emo/emo.php $file_name style.css|open -a /Applications/Sublime\\ Text\\ 2.app -f"],
"shell": true
}
@jimthedev
jimthedev / php.except.ini
Created November 29, 2013 20:12
Zend 1 with Doctrine 2 php.ini file excerpt
include_path = ".:/usr/local/zf/library/Zend:/usr/local/doctrine/library:/usr/local/doctrine/library/doctrine/common/lib:/usr/local/doctrine/library/doctrine/dbal/lib:/usr/local/doctrine/library/doctrine/cache/lib:/usr/local/doctrine/library/doctrine/annotations/lib:/usr/local/doctrine/library/doctrine/orm/lib:/usr/local/doctrine/library/doctrine/lexer/lib"
@jimthedev
jimthedev / 0_reuse_code.js
Created December 15, 2013 22:26
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
@jimthedev
jimthedev / Gruntfile.js
Created July 10, 2014 16:21
How to implement customized SCSS/SASS after creating a project with ionic generator
//
// PATH TO THIS FILE: root of your project
//
// Edit your Gruntfile.js file's bower install section to exclude ionic's css
// as shown below. This is just a snippet so you need to find this section.
// If you don't do this, then you'll get ionic in CSS precompiled form
// in addition to your custom scss build and everything will break.
// Automatically inject Bower components into the app
'bower-install': {
@jimthedev
jimthedev / dependencies
Created July 14, 2014 20:41
generator-ionic dependencies list for gulp branch
List of current dependencies as of July 14, 2014. On the left is the current dependency, on the right, the possible replacement:
"grunt": "~0.4.1", https://github.com/gulpjs/gulp/
"grunt-autoprefixer": "~0.4.0", https://github.com/Metrime/gulp-autoprefixer
"grunt-bower-install": "~0.7.0", https://github.com/taptapship/wiredep
"grunt-concurrent": "~0.4.1", Likely unneeded since gulp runs concurrent by default.
"grunt-contrib-clean": "~0.5.0", https://github.com/robrich/gulp-rimraf
"grunt-contrib-compass": "~0.6.0", https://github.com/appleboy/gulp-compass
"grunt-contrib-concat": "~0.3.0", https://github.com/wearefractal/gulp-concat
"grunt-contrib-connect": "~0.5.0", https://github.com/avevlad/gulp-connect
/* AngularDDP - a client for DDP version pre1 */
angular.module('angularDDP', ['$q'])
.factory("DDP", function (wsUri) {
function Constructor(wsUri) {
this.VERSIONS = ["pre1"];
this.wsUri = wsUri;
this.sock;
this.defs = {}; // { deferred_id => deferred_object }
@jimthedev
jimthedev / Error
Last active August 29, 2015 14:04 — forked from afuggini/Error
Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module starter.controllers due to:
Error: [$injector:modulerr] Failed to instantiate module angularDDP due to:
Error...<omitted>...1)
@jimthedev
jimthedev / gist:075681f56450b5e684f4
Created August 5, 2014 21:56
genericCollectionFactory.js
.factory('genericCollectionFactory',function(){
function Collection() {
var _items = [];
function get () {
return _items;
}
function add (item) {