Skip to content

Instantly share code, notes, and snippets.

View bomberstudios's full-sized avatar
🍊
Thinking

Ale Muñoz bomberstudios

🍊
Thinking
View GitHub Profile
@bomberstudios
bomberstudios / Ale.tmTheme
Created July 21, 2009 15:09
A TextMate theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>Created by Jacob Rus. Modified by Ale Muñoz</string>
<key>name</key>
<string>Ale</string>
<key>settings</key>
<array>
@bomberstudios
bomberstudios / optimize-legibility.html
Created June 29, 2010 09:08 — forked from kolber/optimize-legibility.html
Improved handling of kerning pairs and ligatures in modern browsers using the text-rendering: optimizeLegibility; declaration.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cross-browser kerning-pairs & ligatures</title>
<style>
body { font-family: sans-serif; background: rgba(30, 10, 0, 0.05); color: rgba(40, 30, 0, 1); width: 500px; margin: 80px auto; padding: 0px; }
a { color: rgba(15, 10, 0, 0.8); text-decoration: none; border-bottom: 1px solid; padding: 1px; -webkit-transition: background 1s ease; }
a:hover { background: rgba(0, 220, 220, 0.2); }
p { line-height: 1.5; padding: 0px 1em 0em 0em; }
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Nice Buttons</title>
<style>
* { margin: 0; padding: 0; }
ul {
padding: 20px;
width: 80px;
float: left;
.gradient (@from: #eee, @to: #ccc) {
background-color: @from;
background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image: -moz-linear-gradient(center top, @from, @to);
}
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>ul.buttongroup</title>
<style>
ul.buttongroup {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
display: inline-block;
@bomberstudios
bomberstudios / benchmark.js
Created October 22, 2010 10:19
A simple benchmark comparing Fireworks CS3 and Bohemian Coding Sketch. Same code can be run on both (save as .jsf for Fireworks and .jstalk for Sketch)
// redefine log() if we are inside Fireworks
if (!this['log']) {
log = alert;
}
log('Starting benchmark - ' + new Date());
// Benchmark function
function benchmark(func,msg){
start = new Date();
func.call();
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundleUUID</key>
<string>A9237092-D694-450A-8C8F-F9005D932664</string>
<key>command</key>
<string>osascript -e 'tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1'</string>
test( 'Size command, single object', function(){
assert('An item is selected and its width is 100', fw.selection[0].width, 100);
run_command("Size","Width +1");
assert('Selected item is 1 pixel wider', fw.selection[0].width, 101);
run_command("Size","Width +10");
assert('Selected item is 10 pixels wider', fw.selection[0].width, 111);
run_command("Size","Height +1");
assert('Selected item is 1 pixel taller', fw.selection[0].height, 101);
run_command("Size","Height +10");
assert('Selected item is 10 pixels taller', fw.selection[0].height, 111);
File pattern:
!(/\.DS_Store|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
Folder pattern:
!.*/(\.[^/]*|CVS|log|vendor|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
@bomberstudios
bomberstudios / Dribbble Slice.jsf
Created February 8, 2011 16:01
Creates a 400x300 PNG32 slice, ready for exporting and uploading to dribbble.com
var left = 100,
top = 100;
if (fw.selection.length) {
left = fw.selection[0].left,
top = fw.selection[0].top;
}
fw.getDocumentDOM().addNewHotspot("slice", "rectangle", {left:left, top:top, right:left + 400, bottom: top + 300});
fw.getDocumentDOM().setSliceExportOptions({ animAutoCrop:true, animAutoDifference:true, applyScale:false, colorMode:"32 bit", crop:false, cropBottom:0, cropLeft:0, cropRight:0, cropTop:0, ditherMode:"none", ditherPercent:100, exportFormat:"PNG", frameInfo:[ ], interlacedGIF:false, jpegQuality:80, jpegSelPreserveButtons:false, jpegSelPreserveText:true, jpegSelQuality:90, jpegSelQualityEnabled:false, jpegSmoothness:0, jpegSubsampling:0, localAdaptive:true, lossyGifAmount:0, macCreator:"", macFileType:"", name:"PNG 32", numCustomEntries:0, numEntriesRequested:0, numGridEntries:6, optimized:true, paletteEntries:null, paletteInfo:null, paletteMode:"adaptive", paletteTransparency:"none", percentScale:100, progressiveJPEG:false, savedAnimationRepeat:0, sorting:"none", useScale:tru