Skip to content

Instantly share code, notes, and snippets.

View Linrstudio's full-sized avatar
🌴
On vacation

xyz Linrstudio

🌴
On vacation
View GitHub Profile
@dvdsgl
dvdsgl / schema.json
Created March 30, 2018 20:27
Figma Platform schema
{
"$ref": "#/definitions/FileResponse",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"BlendMode": {
"enum": [
"COLOR",
"COLOR_BURN",
"COLOR_DODGE",
"DARKEN",
@sonburn
sonburn / getSetValueOnLayer.js
Last active January 8, 2021 03:16
Get or set a value on a layer in Sketch
var value = nil,
key = "kModelPropertiesKey",
layer = context.selection[0],
plugin = "com.animaapp.stc-sketch-plugin";
// Get the value
context.command.valueForKey_onLayer_forPluginIdentifier(key,layer,plugin);
// Set the value
context.command.setValue_forKey_onLayer_forPluginIdentifier(value,key,layer,plugin);
// [0] represents first override, replace with appropriate index if other override is desired
symbolInstance.setValue_forOverridePoint("New text", symbolInstance.overridePoints()[0]);
const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const {CommonsChunkPlugin} = require('webpack').optimize;
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const WriteFilePlugin = require('write-file-webpack-plugin');
const proxy = require('http-proxy-middleware'); // require('http-proxy-middleware');
const HtmlWebpackPlugin = require('html-webpack-plugin'); // require('http-proxy-middleware');
const pkg = require('./package.json');
@eeropic
eeropic / paste-svg-from-clipboard-paper.js
Last active August 11, 2024 20:47
Paste SVG to Paper.js from clipboard
//CC2018
document.addEventListener('paste', function(evt) {
//Import SVG copied to clipboard from Illustrator
//remove last hidden character that will otherwise break the import
if(document.activeElement.nodeName!="TEXTAREA"){
var str=evt.clipboardData.getData('text/plain').slice(0, -1);
var svg=project.importSVG(str)
svg.clipped=false;
svg.children[0].remove()
svg.parent.insertChildren(svg.index,svg.removeChildren());
@rsms
rsms / Windows font management.md
Last active November 15, 2020 04:49
Notes on font management on Windows

Font "package manager"

I've been thinking about creating a font management service similar to traditional software package managers (e.g. Debian Aptitude, NPM, etc.)

The basic idea is this:

  1. There's a main repository of fonts that are free (as in free to distribute) that the working group hosts
  2. There's a small program that serves as the "manager", to be used or installed on client systems
  3. The "manager" can be configured to operate with multiple repositories
javascript:(function pxl8(){const s=document.createElement('style');s.innerHTML='img{ image-rendering: optimizeSpeed; image-rendering: -moz-crisp-edges; image-rendering: -o-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; image-rendering: optimize-contrast; -ms-interpolation-mode: nearest-neighbor; }';document.head.appendChild(s);for(let i=0;i<frames.length;++i){frames[i].document.head.appendChild(s);}})()
function stripext(fn) {
const di = fn.lastIndexOf('.')
if (di < 1) {
return fn
}
const si = fn.lastIndexOf('/')
return (si == -1 || di > si+1) ? fn.substr(0, di) : fn
}
for (const sample of [
@migcosta
migcosta / max_width_email_template.html
Created December 11, 2017 15:14 — forked from stoyanvi/max_width_email_template.html
HTML Email Template: max-width hack for MS Outlook
<!--[if (gte mso 9)|(IE)]>
<center>
<table>
<tr>
<td width="600">
<![endif]-->
<div style="max-width: 600px; margin: 0 auto;">
<p>This text will be centered and constrained to 600 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>