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
# Why rewrite URLs? Read this: http://en.wikipedia.org/wiki/Rewrite_engine | |
# Apache (.htaccess or httpd.conf) | |
# Make sure AllowOverride is on for the directory, or put the rewrite rules in httpd.conf | |
# http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule . /index.php [L] | |
# Nginx (nginx.conf) |
# TOPIC: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=10250#p40640 | |
1. "300 pixels" is the HARDCODED WIDTH of the CODE COMPLETION POPUP. | |
Look for 00 00 00 00 00 C0 72 40 in the binary | |
and replace with your wanted value | |
(for example 00 00 00 00 00 C0 82 40 for 600 pixels). | |
2. GOTO: http://gregstoll.dyndns.org/~gregstoll/floattohex/ | |
3. In "Double value: (Convert to HEX)" enter size, ex. 400 (Size in Pixels u want) |
var fs = require('fs'); | |
var csv = require('csv'); | |
var _ = require('lodash'); | |
var dir = './projection-coefficients/'; | |
var out = 'coeff.json'; | |
var obj = {}; | |
function done() { | |
var o = fs.createWriteStream(out, {encoding: 'utf8'}); |
setInterval(function(){[].forEach.call($$('*'),function(a){a.style.outline='2px solid #'+(~~(Math.random()*(1<<24))).toString(16)})},100) |
<?php | |
$files = array_slice($argv, 1); | |
foreach ($files as $file) { | |
$picture = file_get_contents($file); | |
$size = getimagesize($file); | |
// base64 encode the binary data, then break it into chunks according to RFC 2045 semantics | |
$base64 = chunk_split(base64_encode($picture)); |
<?php | |
// Has Potential, but still no luck... lol | |
// run as is, change the forLoop # at the bottom for checks.. now its = 200 | |
function gen_uuid($len=8) { | |
$hex = md5("MaxMind GeoIP" . uniqid("", true)); | |
$pack = pack('H*', $hex); | |
$tmp = base64_encode($pack); | |
$uid = preg_replace("#(*UTF8)[^A-Za-z0-9]#", "", $tmp); | |
$len = max(4, min(128, $len)); | |
while (strlen($uid) < $len) |
<?php | |
function gen_uuid2($len=8) { | |
$hex = md5("Madison_DeSimone" . uniqid("", true)); | |
$pack = pack('H*', $hex); | |
$tmp = base64_encode($pack); | |
$uid = preg_replace("#(*UTF8)[^A-Za-z0-9]#", "", $tmp); | |
$len = max(4, min(2000, $len)); | |
while (strlen($uid) < $len) | |
$uid .= gen_uuid(22); |
body { | |
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif; | |
} | |
#text { | |
display: none; | |
} | |
.tag { | |
display: inline-block; |
$(document).ready(function() { | |
var text = $('#text').text(); | |
var word_array = text.split(' '); | |
// blank array to store result | |
var word_count = {}; | |
// lets count the words | |
for ( var x in word_array ) { |