// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## {{{ http://code.activestate.com/recipes/532908/ (r3) | |
| #! /usr/bin/env python | |
| """ | |
| pyText2Pdf - Python script to convert plain text files into Adobe | |
| Acrobat PDF files with support for arbitrary page breaks etc. | |
| Version 2.0 | |
| Author: Anand B Pillai <abpillai at gmail dot com> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location /assets/ { | |
| gzip_static on; | |
| expires max; | |
| add_header Cache-Control public; | |
| add_header Access-Control-Allow-Origin *; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Spineforge < Thor | |
| include Thor::Actions | |
| # thor spineforge:fuse ios | |
| desc "fuse ios/android","builds and runs app" | |
| def fuse(platform) | |
| #cd spineapp | |
| @spineapp_dir = File.dirname(__FILE__) | |
| @forge_dir = @spineapp_dir + '/../' | |
| inside @spineapp_dir do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery.ajaxSetup( | |
| beforeSend: (xhr) -> | |
| xhr.setRequestHeader('X-Auth-Token', | |
| App.Session.getAuthenticationToken()) | |
| ) | |
| # ... | |
| class App.Session | |
| # ... | |
| getAuthenticationToken: -> |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This method creates a html canvas and automatically scales it fit the mobile devices display dpi. You can code everything for 320 px and it still looks pixel perfect on high res displays like iPhone 4 or newer Android devices. | |
| iPhone 3Gs has 320 x 480 devicePixelRatio = 1, Android phone has 480 x 800 devicePixelRatio=1.5, iPhone 4 has 480 x 960 devicePixelRatio = 2 | |
| code like this creates a circle of the same size on all devices without pixeling | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| http://closure-library.googlecode.com/svn-history/r440/trunk/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js | |
| * @license | |
| Copyright (c) 2008, Adobe Systems Incorporated | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are | |
| met: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function interval(duration, fn){ | |
| var _this = this | |
| this.baseline = undefined | |
| this.run = function(){ | |
| if(_this.baseline === undefined){ | |
| _this.baseline = new Date().getTime() | |
| } | |
| fn() | |
| var end = new Date().getTime() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |