Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bclinkinbeard's full-sized avatar

Ben Clinkinbeard bclinkinbeard

View GitHub Profile
const muteStorage = new Keyv(MONGODB_URI, { namespace: `${env}mute` })
const unmute = async () => {
client.guilds.cache.forEach((g) => {
const muted = g.members.cache.filter((m) => {
const roleNames = Array.from(
m.roles.cache.mapValues((r) => r.name).values(),
)
return roleNames.includes(ROLES.MUTED)
})
@bclinkinbeard
bclinkinbeard / atomic-habits-notes.md
Created August 19, 2020 14:29
Rough notes on Atomic Habits by James Clear

Atomic Habits

"Building habits in the present allows you to do what you want in the future."

The Four Steps of Habits

  1. Cue
  2. Craving
  3. Response
  4. Reward
console.log('hello')
@bclinkinbeard
bclinkinbeard / index.js
Created November 29, 2017 17:10
Extract all the non-png links from a directory of Markdown files
const markdownLinkExtractor = require('markdown-link-extractor')
const fs = require('fs')
const { join } = require('path')
const dir = join(__dirname, 'chapters')
const files = fs.readdirSync(dir)
const titles = files.map(
file => file.substr(0, file.lastIndexOf('.')).split(' - ')[1],
)
@bclinkinbeard
bclinkinbeard / .block
Created November 3, 2017 18:17
Stacked Bar Chart
license: gpl-3.0
@bclinkinbeard
bclinkinbeard / .block
Last active January 26, 2017 03:21 — forked from dbetebenner/.block
D3 Block-a-Day: Day 16, January 16th, 2017
license:gpl-3.0
height:600
border:no
Raw
@bclinkinbeard
bclinkinbeard / .block
Last active January 24, 2017 02:42 — forked from dbetebenner/.block
D3 Block-a-Day: Day 18, January 18th, 2017
license:gpl-3.0
height:600
border:no
Raw
@bclinkinbeard
bclinkinbeard / frame.html
Created October 12, 2016 17:54
D3 listener collisions across iframes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
circle {
fill: green;
}
module.exports = {
server: '.',
files: [
'*.html',
'src/*'
],
ui: false,
notify: false
};
@bclinkinbeard
bclinkinbeard / LICENSE
Last active September 6, 2016 19:51
Personal Best High Jumps for Two High Jumpers
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all