Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p>
Nothing here yet...
</p>
View dribbble bulshit comments filter
var meaninglessWords = ['stunning','nice','amaizing','bro','wow','good job','great job','great','neat','sick','fucking','hah','haha','cool','coool','gorgeous','clean','as always','fantastic','brilliant','bloody','genious','love','freaking','insane','sexy','beautiful',':)','whoa','dope','lovely','like','mate','dang','dude','rad','super','is','so','that','this','i','it','oh'];
var isBulshitSentence = x => x.split(" ").filter(x=>!~meaninglessWords.indexOf(x.replace(/\!\.\,/g,"").toLowerCase())).length < 3;
[].slice.call(document.querySelectorAll('.comment-body')).forEach(x=>isBulshitSentence(x.innerText) && x.remove());
View sketch object dump
function dump_obj(obj){
log("#####################################################################################")
log("## Dumping object " + obj )
log("## obj class is: " + [obj className])
log("#####################################################################################")
log("obj.properties:")
log("#####################################################################################")
log([obj class].mocha().properties())
log("obj.propertiesWithAncestors:")
log([obj class].mocha().propertiesWithAncestors())
@timuric
timuric / export-layer
Last active Aug 29, 2015
Export layers in sketch app
View export-layer
function exportLayer(layer,path){
var rect = [layer rectByAccountingForStyleSize:[[layer absoluteRect] rect]];
var slice = [[MSSliceMaker slicesFromExportableLayer:layer inRect:rect] firstObject];
[doc saveArtboardOrSlice: slice toFile: path];
}