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 / Export Symbols.sketchplugin
Created August 6, 2014 18:18
Export Symbols from Canvas
var layers = [[doc currentPage] layers],
document_path = [[doc fileURL] path].split([doc displayName])[0],
currentFilePath = [[doc fileURL] path];
// Loop through layers, picking symbols:
var allSymbols = {}
for (var i=0; i < [layers count]; i++) {
var current = [layers objectAtIndex:i],
currentID = current.sharedObjectID()
@bomberstudios
bomberstudios / anime-for-kids.md
Created July 23, 2014 21:20
Kid-friendly anime movies
  • Mi Vecino Totoro
  • Arrietty y el mundo de los diminutos
  • Ponyo en el acantilado
  • Nicky, la aprendiz de bruja
  • Haru en el reino de los gatos
  • La Guerra de los Mapaches de Pompoko
  • La Historia de los Niños Lobo
@bomberstudios
bomberstudios / 2048.sketchplugin
Created April 23, 2014 13:49
Play 2048 inside Sketch.app, just because...
var URL = "http://gabrielecirulli.github.io/2048/"
var frame = NSMakeRect(0,0,340,480)
var webView = [[WebView alloc] initWithFrame:frame]
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:URL]]]
var mask = NSTitledWindowMask + NSClosableWindowMask + NSMiniaturizableWindowMask + NSResizableWindowMask + NSUtilityWindowMask;
var window = [[NSPanel alloc] initWithContentRect:frame styleMask:mask backing:NSBackingStoreBuffered defer:true];
[[window contentView] addSubview:webView]
[window makeKeyAndOrderFront:nil]
@bomberstudios
bomberstudios / Post to Campfire.sketchplugin
Created March 26, 2014 16:04
Post to Campfire from Sketch.app — Requires Flint.app
// Post to Campfire (ctrl alt cmd p)
// Setup
var CHAT_ROOM = "Main Room"
var flint = SBApplication.application("Flint"),
msg = [doc askForUserInput:"Post to Campfire:" initialValue:""];
if (msg) {
[flint post:msg toRoom:CHAT_ROOM]
@bomberstudios
bomberstudios / Copy Layer List.sketchplugin
Created February 26, 2014 09:42
Sketch: Copy layer list to clipboard
// Copy Layer List to Clipboard
// Change this variables to configure the script:
var COPY_LAYER_TYPE = false,
TRAVERSE_GROUPS = true
var layers = [[doc currentPage] layers],
loop = [layers objectEnumerator],
layer_tree = "",
@bomberstudios
bomberstudios / Change Font.sketchplugin
Last active May 20, 2024 03:42
Change font family for all text layers in Sketch
// Change font (ctrl a)
var doc = context.document,
selection = context.selection,
font_name = [doc askForUserInput:"Font name:" initialValue:"Arial"];
function check_layer(layer){
log(layer)
var className = layer.className()
log("Checking layer " + layer + " of klass: " + className)
if (className == "MSTextLayer") {
@bomberstudios
bomberstudios / Duplicate State.jsf
Created January 12, 2014 07:31
A fix for the dreaded bug in Fireworks CS6, where duplicating a state won't duplicate the symbols (see http://forums.adobe.com/message/5987155)
fw.getDocumentDOM().selectAll();
fw.getDocumentDOM().duplicateFrame(-1, 1, "after current", true);
@bomberstudios
bomberstudios / sketch-plugins.md
Last active July 16, 2025 18:21
A list of Sketch plugins hosted at GitHub, in no particular order.
@bomberstudios
bomberstudios / Export for Android from Sketch.md
Created May 14, 2013 15:41
Feature request: Export for Android from Sketch

For example xhdpi will be the reference for Android design and then we will able to export to ldpi, mdpi, hdpi and xxhdpi with only one click.

The export function creates a folder for each format named (ldpi, mdpi, hdpi, xhdpi, xxhdpi...) and each slice wil be resized like that :

  • xhdpi = 100%
  • ldpi = 37,5%
  • mdpi = 50%
  • hdpi = 75%
  • xxhpi = 150%
// Clear All Guides in Current Artboard
#import 'library/common.js'
var current_artboard = [[doc currentPage] currentArtboard];
if (current_artboard != null) {
var horizontal_guides = [current_artboard horizontalRulerData],
vertical_guides = [current_artboard verticalRulerData];
// Remove horizontal guides