Skip to content

Instantly share code, notes, and snippets.

View jhsu's full-sized avatar
💀
compliant with future standards

Joe Hsu jhsu

💀
compliant with future standards
  • MineHub
  • New York, NY
  • X @jhsu
View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'ul',
classNames: ['pagination-navigation'],
hasNext: function() {
return this.get('page') < this.get('pages');
}.property('page', 'pages'),
hasPrevious: function() {
return this.get('page') > 1;
<a ui-sref="dashboard.child">show the child view</a>
<div ui-view></div>
eventsource
go-eventsource
client/client
toggleCvc: ->
@cvc_container ||= @form.find(".payment-cvc")
@cvc_content ||= @cvc_container.contents()
cvc = @cvc_content.find('input').val()
if !cvc || /^\s*$/.test(cvc)
@cvc_content.remove()
showCvc: ->
@cvc_container.html(@cvc_content)
stripeHidden = _.template """
<div>
<input type='hidden' name='stripeToken' value='<%= id %>' />
<input type='hidden' name='payment_method[name]' value='<%= name %>' />
<input type='hidden' name='payment_method[last4]' value='<%= last4 %>' />
<input type='hidden' name='payment_method[exp_month]' value='<%= exp_month %>' />
<input type='hidden' name='payment_method[exp_year]' value='<%= exp_year %>' />
</div>
"""
stripeHidden = _.template """
<div>
<input type='hidden' name='stripeToken' value='<%= id %>' />
<input type='hidden' name='payment_method[name]' value='<%= name %>' />
<input type='hidden' name='payment_method[last4]' value='<%= last4 %>' />
<input type='hidden' name='payment_method[exp_month]' value='<%= exp_month %>' />
<input type='hidden' name='payment_method[exp_year]' value='<%= exp_year %>' />
</div>
"""
#!/usr/bin/env bash
say "Did you run test?"
while true; do
read -p "Do your run tests? [yn]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit 1;;
* ) echo "Please answer yes or no.";;
esac
@jhsu
jhsu / images.md
Last active December 14, 2015 14:29

high five

quotasaurusrex

@jhsu
jhsu / waffles.md
Last active December 14, 2015 11:59