Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST
requests with voice file encoded in FLAC format, and query parameters for control.
client
The client's name you're connecting from. For spoofing purposes, let's use chromium
lang
Speech language, for example, ar-QA
for Qatari Arabic, or en-US
for U.S. English
//check for mobile devices | |
//modified from http://bit.ly/nMEXh4 | |
var ua = navigator.userAgent; | |
var checker = { | |
iphone: ua.match(/(iPhone|iPod)/), | |
ipad: ua.match(/(iPad)/), | |
blackberry: ua.match(/BlackBerry/), | |
android: ua.match(/Android/) |
( function( window, undefined ) { | |
'use strict'; | |
// helper function | |
function capitalize( str ) { | |
return str.charAt(0).toUpperCase() + str.slice(1); | |
} | |
// ========================= getStyleProperty by kangax =============================== |
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
## git completion (run brew install bash-completion first) | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
## branch name in prompt |
Testing JavaScript isn't just a thing you can read about in children's fairy tales.
This is just a scratch pad of everything I find. As the really good resources start to float to the top, I'll transition them to a more permanent GitHub repo.
R = React.DOM | |
nations = ['britain', 'ireland', 'norway', 'sweden', 'denmark', 'germany', | |
'holland', 'belgium', 'france', 'spain', 'portugal', 'italy', 'switzerland'] | |
Typeahead = React.createClass | |
getInitialState : -> {input: ""} | |
handleChange : -> @setState input: @refs.field.getDOMNode().value | |
handleClick : (nation)-> @setState input: nation | |
matches : (input)-> |
# --------------------------------------------------------------------------- | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management | |
# 6. Networking | |
# 7. System Operations & Information |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
""" | |
Copyright (C) 2017 Michael von den Driesch | |
This file is just a simple implementation of a python class allowing for various | |
*booking* types (LIFO, FIFO, AVCO) | |
This *GIST* is free software: you can redistribute it and/or modify it | |
under the terms of the BSD-2-Clause (https://opensource.org/licenses/bsd-license.html). | |
This program is distributed in the hope that it will be useful, but WITHOUT |