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 / mixture-tech-stack.md
Last active December 15, 2015 07:19
Technologies that seem to power mixture.io's client
@bomberstudios
bomberstudios / convert.rb
Created November 20, 2012 10:37
Converts PSD files in a folder to PNG
Dir.glob("*.psd").each do |file|
system("sips -s format png #{file} --out #{File.basename(file,'.psd')}.png")
end
@bomberstudios
bomberstudios / emoji-prompt.sh
Created October 4, 2012 09:32
El prompt de bash definitivo...
##### EXEC ###################################################################
# $ brew install bash-completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# brew git-completion
export GIT_PS1_SHOWDIRTYSTATE="true"
export GIT_PS1_SHOWSTASHSTATE="true"
export GIT_PS1_SHOWUNTRACKEDFILES="true"
@bomberstudios
bomberstudios / muji-dotted-paper.ps
Created July 20, 2012 11:24
Print your own Muji dotted paper in A4 format (open in Preview.app, print at 100% scale)
%!PS-Adobe-3.0
% Title: dot grid paper, 5x5 mm
%%BeginSetup
%%BeginFeature: *PageSize A4
<< /PageSize [ 595.27 841.889 ]
/ImagingBBox null
>> setpagedevice
%%EndFeature
%%EndSetup
@bomberstudios
bomberstudios / mercadillo.md
Created May 22, 2012 20:31
Mercadillo Fotográfico Naranja

Se vende

Tengo todo este equipo cogiendo polvo en un cajón. Está todo entre muy bien y nuevo (me gusta cuidar mis cámaras :) pero desde que entró la Panasonic GF1 + 20mm 1.7 en casa no he vuelto a usarlo, y creo que se merece estar en un hogar donde lo quieran y le den cariño:

Está todo en Madrid, y en principio prefiero entrega en mano para que puedas probar que todo está bien y que te convence lo que compras.

@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
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))$
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);
<?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>
@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();