Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Atkin benatkin

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am benatkin on github.
  • I am benatkin (https://keybase.io/benatkin) on keybase.
  • I have a public key ASBc_wPfm13RGJnnZVtA0u1h2LGr0tiB98Xpo5iy7VkmbAo

To claim this, I am signing this object:

@benatkin
benatkin / README.md
Last active Mar 21, 2018
bored> prompt zsh theme
View README.md

bored oh-my-zsh theme

In The Bipolar Lisp Programmer one student has bored> for a prompt.

I made an oh-my-zsh theme for this. It's super simple.

To use it:

View genesis_public_key
04abc69200bebaf9e938a4a810fedcc0dcc9f4b2a79411b8293ef8fc0e8bc2df1dfd2bb68817e4daf01d898317e2f734d6e95d4cb6181d7b22b1b398a2c6619481
View infinity.jsx
import React from "react";
import { render } from "react-dom";
const curve = (start, control1, control2, end) => {
return [
"M",
start.join(" "),
"C",
control1.join(" "),
control2.join(" "),
View infinity-curve.jsx
const App = () => {
const points = symmetricalCurvePoints({
controlX: 10,
endpointX: 35,
endpointDistance: 15,
controlDistance: 35
})
return (
<div>
<svg
View symmetrical-curve-points.js
const symmetricalCurvePoints = ({ controlX, endpointX, endpointDistance, controlDistance}) => (
[
[endpointX, 50 - endpointDistance / 2],
[controlX, 50 - controlDistance / 2],
[controlX, 50 + controlDistance / 2],
[endpointX, 50 + endpointDistance / 2]
]
)
View infinity-curve-first-attempt.jsx
const Guide = ({ start, end }) => {
return [
<circle fill="gray" opacity={0.5} cx={start[0]} cy={start[1]} r={1} />,
<path
stroke="gray"
strokeWidth="1"
strokeOpacity={0.5}
fill="transparent"
d={line(start, end)}
/>,
View svg-path-functions.js
const curve = (start, control1, control2, end) => {
return [
"M",
start.join(" "),
"C",
control1.join(" "),
control2.join(" "),
end.join(" ")
].join(" ");
}
@benatkin
benatkin / html5-logo.json
Last active Jan 30, 2018
XML-as-JSON format inspired by Azure templates, jsx, and WordPress shortcodes
View html5-logo.json
{
"[svg xmlns=http://www.w3.org/2000/svg viewBox='0 0 512 512']": [
{"[title]": "HTML5 Logo"},
"[polygon fill='#E44D26' points='107.644,470.877 74.633,100.62 437.367,100.62 404.321,470.819 255.778,512']",
"[polygon fill='#F16529' points='256,480.523 376.03,447.246 404.27,130.894 256,130.894']",
"[polygon fill='#EBEBEB' points='256,268.217 195.91,268.217 191.76,221.716 256,221.716 256,176.305 255.843,176.305 142.132,176.305 143.219,188.488 154.38,313.627 256,313.627']",
"[polygon fill='#EBEBEB' points='256,386.153 255.801,386.206 205.227,372.55 201.994,336.333 177.419,336.333 156.409,336.333 162.771,407.634 255.791,433.457 256,433.399']",
"[path d='M108.382,0h23.077v22.8h21.11V0h23.078v69.044H152.57v-23.12h-21.11v23.12h-23.077V0z']",
"[path d='M205.994,22.896h-20.316V0h63.72v22.896h-20.325v46.148h-23.078V22.896z']",
"[path d='M259.511,0h24.063l14.802,24.26L313.163,0h24.072v69.044h-22.982V34.822l-15.877,24.549h-0.397l-15.888-24.549v34.222h-22.58V0z']",
@benatkin
benatkin / SassMeister-input.scss
Created Aug 10, 2017
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// sass scoping
body {
$wow: url(doge.jpg);
background-image: $wow;
}
You can’t perform that action at this time.