This file contains 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
#!/usr/bin/env ruby | |
# Sizes - Calculate and sort all filesizes for current folder Includes | |
# directory sizes, colorized output Brett Terpstra 2019 WTF License | |
VERSION = "1.0.1" | |
require 'shellwords' | |
# Just including term-ansicolor by @flori and avoiding all the | |
# rigamarole of requiring multiple files when it's not a gem... - Brett | |
# |
This file contains 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
//dynamic parenting for 3d layers | |
//from Dan Ebberts on forums I think.. | |
//Position | |
L=thisComp.layer("Object center"); | |
L.toWorld(L.effect(name)("3D Point")); | |
//Scale | |
L =thisComp.layer("Object center"); | |
[L.transform.scale[0]/100*value[0],L.transform.scale[1]/100*value[1],L.transform.scale[2]/100*value[2]]; |
This file contains 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
on safari_is_ready(docNum, interval) | |
repeat | |
tell application "Safari" | |
try | |
do JavaScript "document.readyState" in document docNum | |
set readyState to result | |
set finishedLoading to (source of document docNum contains "</html>") | |
if finishedLoading and readyState is "Complete" then exit repeat | |
end try | |
end tell |
This file contains 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
#!/usr/bin/env ruby | |
# This Rules file is an attempt at a near zero configuration for the common | |
# use cases when creating a simple site with nanoc. It's meant to have | |
# better defaults so new users don't have to configure it much if at all. | |
# For the most part, it copies all files from the content folder to the | |
# output folder with the same name. It has the following features: | |
# | |
# * Certain predefined page extensions such as html, haml, md, markdown and | |
# textile are routed to "clean" URI's (see below regarding Item identifiers). |
This file contains 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
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
This file contains 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
YUI_JAR = File.dirname(__FILE__) + "/../tools/yuicompressor-2.4.2.jar" | |
class YuiCompressor < Nanoc3::Filter | |
identifier :yui_compress | |
type :text => :binary | |
def run(content, params={}) | |
type = type_from_extension | |
cmd = "java -jar #{YUI_JAR} --type #{type} -o #{output_filename}" | |
IO.popen(cmd, 'w') { |f| f.write(content) } | |
raise "yuicompressor exited with #{$?} for '#{cmd}'" unless $? == 0 |