A mostly reasonable approach to JavaScript
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
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{HTTP_ACCEPT} image/webp | |
| RewriteCond %{DOCUMENT_ROOT}/$1.webp -f | |
| RewriteRule ^(wp-content/uploads.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
| </IfModule> | |
| <IfModule mod_headers.c> | |
| Header append Vary Accept env=REDIRECT_accept | |
| </IfModule> |
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
| /* | |
| Foundation 5 w/ Grunt + Libsass (watch scss/*.scss & .html) | |
| Requirement: Chrome LiveReload extension (https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en). | |
| Usage: foundation new project-name --libsass && grunt | |
| */ | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), |
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
| var win = Ti.UI.createWindow(); | |
| var ball = Ti.UI.createView({ | |
| backgroundColor:'blue', | |
| height:50, | |
| width:50, | |
| borderRadius:20 | |
| }); | |
| win.add(ball); |
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
| Alloy.Globals.fa = require('fa'); |
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
| //Application Window Component Constructor | |
| function ApplicationWindow() { | |
| //load component dependencies | |
| var FirstView = require('ui/common/FirstView'); | |
| //create component instance | |
| var self = Ti.UI.createWindow({ | |
| backgroundColor : '#ffffff', | |
| borderRadius : 6 | |
| }); |
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
| // | |
| // Aaron K. Saunders | |
| // | |
| // http://www.clearlyinnovative.com | |
| // http://blog.clearlyinnovative.com | |
| // @aaronksaunders | |
| // | |
| // | |
| (function() { | |
| var group, tab1, tab2, win1, win2; |
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
| /** | |
| * @aaronksaunders | |
| * | |
| * See more Appcelerator Information on Company Blog | |
| * blog.clearlyinnovetiove.com | |
| * | |
| */ | |
| var TiParse = function(options) { | |
| FB = { | |
| init: function() { |
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
| #! /bin/sh | |
| # Run this from the folder you want to be the parent of your docs | |
| # By default, generated docs go into | |
| # titanium_mobile/dist/apidoc/ti_mobile_docs/ | |
| # | |
| # This can be changed below | |
| git clone https://github.com/appcelerator/titanium_mobile.git | |
| cd titanium_mobile | |
| sudo apt-get install python-setuptools python-dev |