- Method instantiation and method calls need parans () (ie. bus.drive(), new Bus())
- Minimize dom selectors in classes (pass in dom elements into class constructor)
class Bus
constructor: ->
class Bus
# Sample verbose configuration file for Unicorn (not Rack) | |
# | |
# This configuration file documents many features of Unicorn | |
# that may not be needed for some applications. See | |
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
# for a much simpler configuration file. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. | |
application = ENV['APP_NAME'] |
## run manually, currently not worth scripting. | |
## from https://devcenter.heroku.com/articles/static-sites-ruby | |
mkdir appname | |
mkdir -p site/public/{images,js,css} | |
touch site/{config.ru,public/index.html} | |
cd site && bundle init | |
echo -e "source :rubygems\ngem 'rack'" > Gemfile |
# Description: | |
# Automates aspects of mover.io's current Github workflow which leverages | |
# Github's issue tags and commenting system. We previously used a :+1: | |
# comment to approve pull requests, but doing so did not affect the state of | |
# the the PR. | |
# | |
# Included is a Github webhook handler that checks for comments containing | |
# certain trigger words. Currently: | |
# | |
# :+1: The pull request is approved. |
# controller w/ decent exposure | |
class ItemsController < ApplicationController | |
expose(:item) | |
expose(:items) | |
def create | |
if item.save | |
redirect_to(item) | |
else |
$(function () { | |
$('[data-toggle="tooltip"]').tooltip(); | |
$('#membership-form').on('submit', function(e){ | |
var member = $( "input:first" ).val(); | |
e.preventDefault(); | |
$.ajax({ | |
method: "GET", | |
url: "https://api.ama.ab.ca/reward_dollars/promotions/3/contestants/"+ member +".jsonp", | |
jsonp: "callback", |
> create-react-native-app math-quiz | |
> cd math-quiz | |
> npm run eject | |
Select: React Native: I'd like a regular React Native project. | |
What should your app appear as on a user's home screen? math-quiz | |
What should your Android Studio and Xcode projects be called? mathquiz | |
> npm run ios |
download tarball (http://s3tools.org/download) | |
$ sudo python setup.py install | |
$ s3cmd --configure | |
Enter new values or accept defaults in brackets with Enter. | |
Refer to user manual for detailed description of all options. | |
Access key and Secret key are your identifiers for Amazon S3 |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cognito Stack | |
Parameters: | |
AuthName: | |
Type: String | |
Description: Unique Auth Name for Cognito Resources | |
Resources: | |
# Creates a role that allows Cognito to send SNS messages | |
SNSRole: |