This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const util = require('util'); | |
const exec = util.promisify(require('child_process').exec); | |
printTable([ | |
'your_usernames_here', | |
], '2023-10-01').catch(console.error) | |
async function printTable(users, prDate) { | |
const metrics = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Who are the { parents, children, grandchildren, grandparents, siblings, ... } of { name }? | |
* | |
* Let's start with just a small set: | |
* Amy and Bob have children Carol, Doug, Erin | |
* Carol and Xavier have children Mike, Nina | |
* | |
* Amy + Bob <- we only care about genetic relations, don't fuss about the "+" as something we need! | |
* / | \ | |
* Doug Erin Carol + Xavier |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a log of what I did today at ~/.today | |
# Example: | |
# today I made a sandwich | |
# today I ate a sandwich | |
# cat ~/.today | |
# 2018-07-16 16:02:12 I made a sandwich | |
# 2018-07-16 15:59:28 I ate a sandwich | |
today(){ | |
# make sure the file exists | |
touch ~/.today |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Gets the current branch and project name and uses that to compile a github URL that matches what you have open in Jetbrains | |
#jetbrains settings -> tools -> external tools | |
#program: /path/to/this/.file | |
#parameters: $ProjectFileDir$ $FilePathRelativeToProjectRoot$ $SelectionStartLine$ $SelectionEndLine$ | |
#working directory: $ProjectFileDir$ | |
open $(cd $1 && echo $(git config --get remote.origin.url | sed -e 's/git@/https:\/\//' | sed -e 's/\.net:/.net\//' | sed -e 's/.git$/\//')"blob/"$(git rev-parse --abbrev-ref HEAD)"/"$2#L$3-L$4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function syl(word) { | |
word = word.toLowerCase(); | |
if(word.length <= 3) return 1; | |
if(word.search(/\d/) != -1) return Math.floor(word.length/3); | |
word = word.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, ''); | |
word = word.replace(/^y/, ''); | |
return word.match(/[aeiouy]{1,2}/g).length; | |
}; | |
$('body').append('<div id="readdiv" style="padding:20px; font-size:30px; font-family:arial; width:600px; line-height:80px; position:fixed; top:20px; left:50%; margin-left:-300px; background-color:white;"></div>'); | |
$readdiv = $('#readdiv'); |