Skip to content

Instantly share code, notes, and snippets.

View DimaRGB's full-sized avatar

Dmytro Lyfarenko DimaRGB

View GitHub Profile
@JoelBesada
JoelBesada / sketch-loader.js
Created January 8, 2018 15:10
Webpack Sketch Loader
const JSZip = require('jszip')
const { parseBuffer } = require('bplist-parser')
const { isObject, each, find } = require('lodash')
const parseArchivedValue = value => {
return parseBuffer(new Buffer(value, 'base64'))
}
const parseArchivedString = obj => {
const { $objects } = parseArchivedValue(
@kwokhou
kwokhou / angular-autoNumeric.js
Last active April 22, 2024 21:54
AngularJS directive for autoNumeric.js
// Directive for autoNumeric.js
// Require AngularJS, jQuery and autoNumeric.js
angular.module('crunch.ui.numeric', []).directive('crNumeric', [function () {
'use strict';
// Declare a empty options object
var options = {};
return {
// Require ng-model in the element attribute for watching changes.
require: '?ngModel',
// This directive only works when used in element's attribute (e.g: cr-numeric)