Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Atkin benatkin

View GitHub Profile
View nested-markdown.md
# chems

````js
console.log(3);
function wow() {
  console.log('wowDoge');
}
````
View fizzbuzz.js
for (let i=1; i <= 100; i++) {
let s = '';
if (i % 3 == 0) s += 'Fizz';
if (i % 5 == 0) s += 'Buzz';
console.log(s.length ? s : i);
}
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(" ");
}