I hereby claim:
- I am d4rekanguok on github.
- I am d4rek (https://keybase.io/d4rek) on keybase.
- I have a public key whose fingerprint is 1973 C35F 82EF DC52 898E 644C 5742 2A02 DDA9 A54B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# sh /Applications/Sketch.app/Contents/Resources/sketchtool/install.sh | |
# npm install -g svgo s2v | |
if [ -z "$1" ]; then | |
SOURCEDIR=. | |
else | |
SOURCEDIR=$1 | |
fi |
Layer::chain = (options...) -> | |
layer = @ | |
options.reduce (promise, option) -> | |
promise.then () -> | |
new Promise (resolve) -> | |
layer.animate option | |
layer.once Events.AnimationEnd, () -> | |
resolve() | |
, Promise.resolve() |
var sketch = require('sketch/dom'); | |
var document = sketch.getSelectedDocument(); | |
var selection = document.selectedLayers.layers.slice(); | |
selection | |
.sort((l1, l2) => { | |
var l1x = l1.frame.x, | |
l1y = l1.frame.y, | |
l2x = l2.frame.x, | |
l2y = l2.frame.y; |
const sketch = require('sketch/dom'); | |
const UI = require('sketch/ui'); | |
const document = sketch.getSelectedDocument(); | |
const selection = document.selectedLayers.layers.slice(); | |
const resize = (layer, options = {}) => { | |
const { scaleX, scaleY, originX, originY } = Object.assign({ | |
scaleX: 1, | |
scaleY: 1, | |
originX: 0, |
const { src } = require('gulp') | |
const fs = require('fs') | |
const path = require('path') | |
const through = require('through2') | |
const hashsum = require('gulp-hashsum') | |
const modifyJson = ({ fileName, src, property }) => through.obj((file, _, cb) => { | |
const { name } = path.parse(file.path) | |
if (name !== fileName) return cb(null, file) |
import React from 'react' | |
import rehypeReact from 'rehype-react' | |
import { Helmet } from 'react-helmet' | |
import { graphql } from 'gatsby' | |
import PropTypes from 'prop-types' | |
import NoteBlock from '../components/note-block' | |
// import '../css/blog-post.css'; // make it pretty! |
import differenceBy from 'lodash/differenceBy' | |
export const hasItem = <T>(data: T[], item: T, key: keyof T): boolean => { | |
return data.some(datum => datum[key] === item[key]) | |
} | |
export const removeOutdatedItem = <T>( | |
data: T[], | |
outdated: T[], | |
key: keyof T |