Skip to content

Instantly share code, notes, and snippets.

View Linrstudio's full-sized avatar
🌴
On vacation

xyz Linrstudio

🌴
On vacation
View GitHub Profile
@baku89
baku89 / principles_ja.md
Last active May 14, 2021 12:35
Principles for Unclichéd Generative Arts

Don't show off what can be realized with the tool

スペック的にやれることを生かしきらない

  • 3DCGツールで2Dグラフィックスをつくる
  • 動画ソフトで静止画をつくる
  • GPU処理で本当は100万パーティクル出せるところを、あえて5個だけでめっちゃ良い感じに動かす

Try tiresome (but not impossible) expressions

@mizchi
mizchi / log
Created January 17, 2021 10:18
prisma:info Starting a sqlite pool with 17 connections.
prisma:info Started http server on http+unix:///private/tmp/prisma-789c342c854e2e3b622ab519.sock
prisma:query BEGIN
prisma:query SELECT `dev`.`User`.`id` FROM `dev`.`User` WHERE `dev`.`User`.`name` = ? LIMIT ? OFFSET ?
prisma:query SELECT `dev`.`User`.`id` FROM `dev`.`User` WHERE `dev`.`User`.`name` = ?
prisma:query UPDATE `dev`.`User` SET `name` = ? WHERE `dev`.`User`.`id` IN (?)
prisma:query SELECT `dev`.`User`.`id`, `dev`.`User`.`name` FROM `dev`.`User` WHERE `dev`.`User`.`id` = ? LIMIT ? OFFSET ?
prisma:query COMMIT
prisma:query BEGIN
prisma:query SELECT `dev`.`User`.`id` FROM `dev`.`User` WHERE `dev`.`User`.`id` = ? LIMIT ? OFFSET ?
@swyxio
swyxio / Newton-1.29.vb
Last active July 10, 2022 08:34
Newton - my VBA utility library for doing matrix multiplication and other useful automations during my finance days https://twitter.com/swyx/status/1327041894853922816
Attribute VB_Name = "Newton"
'Newton Utilities, written by swyx
'Project initiated Jan 1 2012
'V1 released Feb 5 2012
'V1.1 added and renamed functions, updated helpfiles Apr 8 2012
'V1.2 spline interp extraction from surface, n_RandomWalk. released Jun 15 2012
'V1.21 n_Corr, n_TangencyPortfolio, n_CovMat subsumed into n_Cov, fixed n_GetTimeSeries, n_AutoCorr, n_Lag, n_Pval, added PValues to n_Regress, n_Payback, n_ChartMakeScatter
'V1.22 n_Granger, pval for n_Corr, n_Divide, n_Curve, n_PriceIRS, upgraded n_BuildCurve
'V1.23 n_PriceFwd/Rate, n_AutoRegress/n_Remove_AutoRegress (needs work), augmented n_PriceOption for pricing FXO, digitals, and returning greeks
'V1.24 n_FXOVolCurve, n_FormatAsPercent linked to ctrl+shift+5, n_FormatInc/DecreaseDecimalPlace
/**
* @typedef {Object} ClassifyProps
* @property {React.ElementType} [as] - Element to render
* @property {import('clsx').ClassValue} [className] - Composable classnames passed to clsx
*/
/**
* @param {ClassifyProps} props
*/
function Classify({ as: El = "div", ...props }) {
@xdesro
xdesro / MarginTop.js
Created August 17, 2020 18:31
Godforsaken margin-top React component.
const MarginTop = (props) => (
<div>
{Array.from(Array(props.spacing)).map((br) => (
<br />
))}
{props.children}
</div>
);
ReactDOM.render(
@jdsteinbach
jdsteinbach / Subsetting.md
Created May 8, 2020 19:32
Case Studies in Font Subsetting

Case Studies in Font Subsetting

Initial Files Provided

iA Writer provided variable fonts as 2 ttfs (Upright and Italic), each ~150kb.

Note: iA Writer provided static fonts as woff2 (Regular, Italic, Bold, Bold Italic) around 45kb each. Unfortunately this can skew people's initial performance reaction away from variable fonts.

@nobodxbodon
nobodxbodon / extension.ts
Created April 26, 2020 06:38
vs code插件 auto-correct 基础上实现了中文标点符号自动替换为英文标点符号的原型
'use strict';
import * as vscode from 'vscode';
import { getWords } from './helpers';
const ks = require('node-key-sender');
// let config: vscode.WorkspaceConfiguration;
let words: any;
// let triggers: string[];
@romannurik
romannurik / duplicate-components.scripter.ts
Last active February 24, 2022 16:08
Figma + Scripter scripts
// Makes a copy of all selected components (how is this not built into Figma?)
let newSelection = [];
for (let component of figma.currentPage.selection.filter(node => node.type == 'COMPONENT')) {
let clone = component.clone()
clone.x += clone.width;
newSelection.push(clone);
}
figma.currentPage.selection = newSelection;
@rsms
rsms / pdf-to-svg.md
Last active February 21, 2023 09:04

Converting PDF → SVG

Surprisingly complicated. Figma supports SVG → PDF but not the other way around. Sketch supports PDF → SVG with some bugs (often vector shape overlaps are incorrect.)

dawbarton/pdf2svg looks like an interesting project that could be compiled as WASM but it is itself poinsoned by GNU GPL license. Plus, it depends on a huge amount of (also GPL-licensed) code in the form of Poppler and Cairo.