Skip to content

Instantly share code, notes, and snippets.

@patocallaghan
patocallaghan / modules.md
Created January 29, 2014 16:38
Intercom JS
View modules.md

JavaScript Modules

##Why Modules? Writing your JavaScript in a modular fashion provides many benefits over writing in the traditional spaghetti style of sprawling global functions. Benefits include:

View test2.css
This file has been truncated, but you can view the full file.
@charset "UTF-8";
/*
*/
/*
Making a change to this file? Please update the relevant documentation too!
@patocallaghan
patocallaghan / parse.sh
Created April 18, 2014 06:22
Converts a text version of an email cut-and-pasted from gmail's view original. Puts the resulting data in a file with the same name as the inputfile but suffixed with ".html". Created by @lorcan.
View parse.sh
#!/bin/bash
PROGNAME=`basename $0`
verbose=no
function usage () {
cat <<EOF
Converts a text version of an email cut-and-pasted from gmail's view original. Puts the resulting data in a file with the same name as the inputfile but suffixed with ".html".
Usage: $PROGNAME [-v] inputfile
-v executes and prints out verbose messages
View line-reader.rb
#!/usr/bin/env ruby
require 'pp'
require 'optparse'
class LineReader
def initialize
@doc_blocks = []
@state = :expecting_docs
reset_temp_vars()
View office_list.html
<!-- MICROSOFT WORD APPLICATION -->
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l1 level1 lfo2'>
<![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Apples
<o:p></o:p>
</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l1 level1 lfo2'>
<![if !supportLists]><span
View ember-generate-module.js
//ember generate component awesome-button
import Ember from 'ember';
export default Ember.Component.extend({
});
//VERSUS
import Ember from 'ember';
View google-docs-paste.html
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:15px;font-family:Arial;color:#000000;background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">bold</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt;"><span style="font-size:15px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">italic</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt;"><a href="http://test.com" style="text-decoration:none;"><span style="font-size:15px;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;">link</span></a></p>
<p><b style="font-weight:normal;" id="docs-internal-g
@patocallaghan
patocallaghan / intercom.js
Last active August 29, 2015 14:14
Setup Intercom for EmberJS
View intercom.js
var IntercomInitializer = {
name: 'intercom',
initialize: function(container, application){
var router = container.lookup('router:main');
router.on('didTransition', function(){
if(window.Intercom) {
window.Intercom('update');
}
});
}
View ember-resources
> A framework for creating ambitious applications
http://emberjs.com/
### Ember Inspector
* https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi?hl=en
### Why Ember.js?