This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| anon true, if the space may be omitted in anonymous function declarations | |
| bitwise true, if bitwise operators should be allowed | |
| browser true, if the standard browser globals should be predefined | |
| cap true, if upper case HTML should be allowed | |
| continue true, if the continuation statement should be tolerated | |
| css true, if CSS workarounds should be tolerated | |
| debug true, if debugger statements should be allowed | |
| devel true, if logging should be allowed (console, alert, etc.) | |
| eqeq true, if == should be allowed | |
| es5 true, if ES5 syntax should be allowed |
| // deparam | |
| // | |
| // Inverse of $.param() | |
| // | |
| // Taken from jquery-bbq by Ben Alman | |
| // https://github.com/cowboy/jquery-bbq/blob/master/jquery.ba-bbq.js | |
| var isArray = Array.isArray || function(obj) { | |
| return Object.prototype.toString.call(obj) == '[object Array]'; | |
| }; |
| # Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
| # We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
| # Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
| # | |
| # Deployment structure | |
| # | |
| # SERVER: | |
| # /etc/init.d/nginx (1. nginx) | |
| # /home/app/public_html/app_production/current (Capistrano directory) | |
| # |
| require "bundler/capistrano" | |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
| require "rvm/capistrano" | |
| set :rvm_ruby_string, '1.9.2@sinatroxy' | |
| set :rvm_type, :system | |
| set :bundle_flags, "--deployment" | |
| set :application, "sinatroxy" | |
| set :repository, "xxx@yyy:sinatroxy" |
| // mock ajax | |
| $.ajaxPrefilter( function( options, originalOptions, jqXHR ) { | |
| if ( /^\/?mock-ajax/.test( originalOptions.url ) ) { | |
| // make new deferred and save any success/error handlers | |
| var success = options.success, | |
| error = options.error; | |
| // kill off the old handlers | |
| options.success = options.error = null; |