Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Atkin benatkin

View GitHub Profile
@benatkin
benatkin / how-to-install-deno.md
Last active Aug 25, 2021
How to install Deno
View how-to-install-deno.md

How to install Deno

To install Deno, run the installation script, and add the lines to your profile. Here it is for ~/.zshrc. The Deno install script doesn't automatically add it to the end. Rather than do it manually, I have a little script that does it.

install-deno.sh
curl -fsSL https://deno.land/x/install/install.sh | sh
@benatkin
benatkin / pb.js
Created Dec 12, 2012
something to paste into the node.js repl to get access to the clipboard, by running two commands in succession rather than passing a function
View pb.js
pb={c:function(s){var p=require('child_process').spawn('pbcopy');p.stdin.write(s);p.stdin.end();},v:function(){o=this;require('child_process').exec('pbpaste',function(e,so,se){o.d=so})}}
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);
}
@benatkin
benatkin / Global.sublime-settings
Created Jul 20, 2011
excluding node_modules from Sublime Text 2
View Global.sublime-settings
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
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