Skip to content

Instantly share code, notes, and snippets.

@faetea
faetea / address_regex.txt
Created March 9, 2016 00:50
Regex for Street Address
\d{1,4}[A-Z]?\s([NSEW]\.)?\s(\d{1,3}(st|nd|rd|th))?\s(\w\s)+([A-Z][a-z]{1,3}\.)?
Example Addresses:
89A 2nd Street
89 Second St.
4025 N. Pulaski St.
2500 North Tallman St.
601 59th street
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@cybrox
cybrox / EmberChartComponent.js
Created June 5, 2014 12:39
Use Chart.js as a simple Ember.js component
/**
* This is a very simple example of an ember component to integrate
* nnick/chart.js in an ember.js application. Basically, it is simply
* using the components hook to create a ChartJS canvas element.
* Additionally, it supports an update property that allows you to
* let the chart re-rendet if your data or options change. Chart.js
* doesn't support updating its data so this will just create a new
* chart on the given canvas.
*
* Example usage in a handlebars template:
@H1D
H1D / file-upload.hbs
Created March 28, 2014 09:41
with file upload ember jquery-file-upload
<input type="file" class="fileupload__input" name="{{unbound name_attr}}">
<button class="fileupload__button" {{bind-attr disabled="disabled"}}>
{{#unless upload_progress}}
{{unbound text}}
{{else}}
{{upload_progress}}
{{/unless}}
</button>