This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select Similar (ctrl shift a) | |
// https://gist.githubusercontent.com/phaistonian/b3737cf05c1b6a61dbb7/raw/1f1ca90f1c72e395cb4d2abfc23315c47dc5c25d/Select%20Similar.sketchplugin | |
/* Based on initial work by Ale Muñoz */ | |
(function(){ | |
var sel = selection[0], all_layers = [[doc currentPage] children]; | |
if (sel) { | |
var query = getIdForElement(sel), type = [sel className], found = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hash = {}; | |
[1,2,3,3,5,1].filter(function (item) { if (hash[item]) return true; hash[item] = false; return true; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bold_folder_labels": true, | |
"build_on_save": false, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"default": "Default.sublime-theme", | |
"detect_indentation": false, | |
"draw_indent_guides": true, | |
"draw_minimap_border": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Misc related to npm and webpack | |
node_modules | |
build | |
dist | |
webpack-stats.json | |
npm-debug.log | |
# Sublime related - just in case | |
################### | |
sublime-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
short_open_tag=On | |
error_reporting = E_ALL & ~E_NOTICE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello = () => { | |
var lala = 1; | |
something(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function attachRounder (element) { | |
window.addEventListener('resize', () => makeRound(element)); | |
makeRound(element); | |
} | |
function makeRound (element) { | |
let transform = window.getComputedStyle(element, null).getPropertyValue('transform'); | |
if (transform.indexOf('matrix') !== -1) { | |
element.style.transform = transform.replace(/[\d\.]+/gi, function (match) { return Math.round(match);}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Rebase from 're-base'; | |
const endPoint = 'actions'; | |
const firebaseUrl = 'https://firesync.firebaseio.com'; | |
const client = String(Date.now() + Math.random() * 100); | |
const data = []; | |
let initiated = false; | |
const base = Rebase.createClass(firebaseUrl); | |
function firesync (store) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Webpack = require('webpack'); | |
var path = require('path'); | |
var entry = require('./webpack-entry'); | |
// Prepend local dev server | |
for (var i in entry) { | |
entry[i] = ['webpack-dev-server/client?http://local.bestprice.gr:3000', 'webpack/hot/dev-server'] | |
.concat(entry[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subClass = function (source, prototype) { | |
var dummy = new source.constructor; | |
for (var key in prototype) { | |
dummy[key] = prototype[key]; | |
} | |
source.__proto__ = dummy; | |
} |
OlderNewer