Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View baku89's full-sized avatar
🍡

Baku 麦 baku89

🍡
View GitHub Profile
// cylinder tool for pen tool https://s.baku89.com/pentool/
// 使い方:リンク先の画面左の(+)をクリックしてから、右側のエディタに以下の内容を張り付け、
// 右上の「Update」を押して反映させるとツールが使えるようになります。
//  キャンバス上でドラッグまたはクリックすると描画できます。
// コードの最初の opt { ... } の中身の数字を変えて Update すると、
// それ以降に描画する円柱の形や間隔などを変更できます。
// 描いたものは左下の歯車メニューからSVG形式で書き出せます。
const BLACK = '#282a2e'
//const GUIDE = '#3e999f'
const WHITE = '#f9faf9'
@mattattui
mattattui / index.html
Last active October 24, 2020 11:28
Vue + Paper
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shape selection</title>
<!-- Vue for doing stuff-->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- Paper for handling graphics -->
<script src="https://unpkg.com/paper@0.11.3/dist/paper-full.min.js"></script>
<!-- Axios for making API calls -->
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@attentive
attentive / goban.clj
Last active January 5, 2020 02:41
SVG goban in Hiccup
(ns goban
(:require [clojure.string :as string]
hiccup.core))
(let [CEL 5.0 ; cell dimension in SVG viewport units
BDR 3.0 ; border width
PXR 10 ; ratio of pixels to SVG vw
BOA (* CEL 18) ; board side
DIM (+ BOA (* BDR 2))] ; goban side
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 21, 2024 23:26
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@TomByrne
TomByrne / MultiExporter.jsx
Last active March 19, 2024 10:12
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@rc1
rc1 / OSX Example
Last active April 11, 2024 18:50
Command line arguments in openFrameworks
open -n ./emptyExampleDebug.app/ --args 1 2 3 4
@twe4ked
twe4ked / input.scss
Created December 5, 2011 06:27
FREE! Sass (SCSS) mixin for including retina images (useful when developing for iOS).
@mixin background-image-retina($file, $type, $width, $height) {
background-image: url($file + '.' + $type);
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) {
& {
background-image: url($file + '@2x.' + $type);
-webkit-background-size: $width $height;
}
}
}