Skip to content

Instantly share code, notes, and snippets.

@maxfell
maxfell / renderSlice.js
Created April 6, 2017 16:40
Render selected Sketch slic to NSImage
(function(){
var selection = context.selection.firstObject()
if (selection.class() != "MSSliceLayer")
return
var exportRequest = MSExportRequest.exportRequestsFromExportableLayer_inRect_useIDForName_(
selection,
selection.absoluteInfluenceRect(),
false
@maxfell
maxfell / RunElm.py
Last active June 8, 2016 21:50
Compile Elm Code to JavaScript in Pythonista using Elm's web REPL
# coding: utf-8
import appex
import requests
from bottle import route, run
from objc_util import *
SFSafariViewController = ObjCClass('SFSafariViewController')
@on_main_thread
def open_in_safari_vc(url, tint_color=None):
@maxfell
maxfell / README.md
Last active August 18, 2018 20:55
Symbolicating crash reports of bitcode apps without a matching dSYM file

Symbolicating crash reports of bitcode apps without a matching dSYM file

Seems like there is a bug in iTunes Connect where XCode doesn't fetch the correct dSYMs, which is quite a nightmare. However, whith a little help of the atos tool we can squeeze some code out of the crash.

I wrote a simple ruby script that goes through all unsymbolicated lines of a crash file and replaces them their symbolicated amigo. It works like this:

ruby symbolicate.rb MyApp.app/MyApp the_crash.crash
@maxfell
maxfell / SassMeister-input.scss
Created January 21, 2015 10:25
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// Susy (v2.1.3)
// ----
@import "susy";
$susy: (
flow: ltr,
import requests
import console
import Image
import StringIO
content = sys.argv[1]
console.clear()
print "Generating QR-Code for: " + content
@maxfell
maxfell / body.html
Created January 5, 2012 20:59
Art Directed posts in tumblr
<!-- Make sure to load the injectCSS() function when the body is loading -->
<body onload="injectCSS();">
FUN
</body>