A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
for (var layerGroupName in PSD) { | |
view = PSD[layerGroupName]; | |
// Change FramerPager here to your keyword | |
if (view.name.indexOf("FramerPager") != -1){ | |
// do something with that thing! | |
// one idea is to add it to an array for access later | |
// or you cold set their css style, set their positions, whatever | |
// in the demo below I make a new FramerPager for it so it… pages | |
} | |
} |
server { | |
listen 80; | |
listen [::]:80; | |
server_name domain.com; | |
autoindex off; | |
index index.php index.html; | |
root /srv/www/domain.com/public; |
endScrollMomentum = function(event) { | |
var animation, constant1, constant2, totalVelocity, touchEvent, velocity; | |
touchEvent = Events.sanitize(event); | |
constant1 = 1000; | |
constant2 = 0; | |
velocity = dragger.calculateVelocity(); |
class TextView extends View | |
constructor: (args) -> | |
super | |
@text = args?.text or "" | |
@define "text", | |
get: -> @html | |
set: (value) -> | |
@html = value |
start = function() { | |
all my framer code | |
} | |
preloadImages = ["a.png", "b.png"]; | |
preloadImagesCount = 0; // How many images were loaded | |
preloadImages.map(function(image) { | |
var imageLayer = new Layer({image:image}) | |
imageLayer.on("load", function() { |
class LayerBrowser | |
constructor: (options) -> | |
@objects = [] | |
@restore = options.restore | |
@_setup() | |
@add options.import if options.import | |
add: (object) -> | |
@objects.push object |
EventEmitter = (require?("./EventEmitter") || Framer).EventEmitter | |
class AppStateMachine extends EventEmitter | |
constructor: -> | |
@states = [] | |
# Start the state machine with the document's hash, or the given route | |
start: (name) -> | |
@go if document.location.hash then document.location.hash[1..-1] else name |
load = (scripts...) -> | |
for script in scripts | |
script = "#{script}.coffee" if script.indexOf '.' == -1 | |
eval CoffeeScript.compile(Utils.domLoadDataSync(script)) | |
load 'finderWindow', 'appStateMachine' |
# Upstreams | |
# Note: if you want to run multiple meteor apps on the same server, | |
# make sure you define a separate port for each. | |
upstream yoursite { | |
server 127.0.0.1:3000; | |
} | |
# HTTP Server | |
server { | |
listen 0.0.0.0:80; |