If you are using "hash" navigation for a single page app on Github Org or User Pages, you may run into a URL problem.
Users who visit a url like
http://myorg.github.io/upcoming-events
#!/usr/bin/env ruby | |
# figure out which repository this is | |
# assumes it's a bare repository | |
repository = /([^\/]*?)\.git$/.match(`pwd`.chomp)[1] | |
# get the stdins from git | |
stdins = []; stdins << $_ while gets | |
stdins.each do |str| |
function isValidEmail(str) { | |
/** | |
* These comments use the following terms from RFC2822: | |
* local-part, domain, domain-literal and dot-atom. | |
* Does the address contain a local-part followed an @ followed by a domain? | |
* Note the use of lastIndexOf to find the last @ in the address | |
* since a valid email address may have a quoted @ in the local-part. | |
* Does the domain name have at least two parts, i.e. at least one dot, | |
* after the @? If not, is it a domain-literal? | |
* |
(function (RSVP) { | |
if (!RSVP) { | |
return; | |
} | |
/** | |
Spread is utilized with the all() method. | |
Basic Usage: |
But really easy to re-sort because the items aren't really numbered:
1. one
import Ember from 'ember'; | |
import { helper } from 'ember-helper'; | |
import { htmlSafe } from 'ember-string'; | |
const { escapeExpression } = Ember.Handlebars.Utils; | |
/** | |
* This helper escapes a value, useful for building styles | |
* | |
* @example | |
* <div style={{escape (concat 'color:' ugcColour)}}></div> |
import Ember from 'ember'; | |
const { get, observer } = Ember; | |
/** | |
Returns whether a route is currently active | |
Example: | |
```handlebars |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@site_username"> | |
<meta name="twitter:creator" content="@creator_username"> | |
{% if page.title %} | |
<meta name="twitter:title" content="{{ page.title }}"> | |
{% else %} | |
<meta name="twitter:title" content="{{ site.title }}"> | |
{% endif %} | |
{% if page.url %} | |
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}"> |
// instance-initializers/app-view.js | |
// With an instance initializer, we can register a component for Ember to use at the top level. | |
// Not ideal, but it works in the meantime until routable components drop. | |
import Ember from 'ember'; | |
const AppView = Ember.Component.extend({ | |
classNames: ['my-app'], | |
}); |