Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。
- 製作者: mattintosh
- ブログ: http://mattintosh.blog.so-net.ne.jp
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough [email protected] | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
AddEncoding gzip .gz | |
RewriteEngine on | |
RewriteCond %{HTTP:Accept-encoding} gzip | |
RewriteCond %{HTTP_USER_AGENT} !Konqueror | |
RewriteCond %{REQUEST_FILENAME}.gz -f | |
RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L] | |
RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L] | |
RewriteRule ^(.*)\.html$ $1.html.gz [QSA,L] |
# | |
# Add the following to Middleman's config.rb: | |
# | |
CoffeeScript.class_eval do | |
class << self | |
def compile_with_bare(*args) | |
options = args.pop if args.last.is_a?(Hash) | |
(options ||= {})[:bare] = true | |
args << options |
(function (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise | |
// that it works, or that I will provide support (don't sue me). | |
// Author: [email protected] | |
var timeouts = {}; |
Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。