I hereby claim:
- I am trescenzi on github.
- I am trescenzi (https://keybase.io/trescenzi) on keybase.
- I have a public key ASCOqDo6R32CB5hOOsOsNTcbeFrrTS-gT62G73_oiXzqpwo
To claim this, I am signing this object:
| const text = await Deno.readTextFile('./day1'); | |
| const digits = new Map(); | |
| digits.set('zero', '0'); | |
| digits.set('one', '1'); | |
| digits.set('two', '2'); | |
| digits.set('three', '3'); | |
| digits.set('four', '4'); | |
| digits.set('five', '5'); | |
| digits.set('six', '6'); |
| (fn ripairs [list] | |
| (var index (length list)) | |
| (fn [] | |
| (match index | |
| 0 nil | |
| _ (do | |
| (let [ret (. list index)] | |
| (set index (- index 1)) | |
| (values index ret)))))) |
| #! /bin/bash | |
| read -p "Letters to exclude: " exclude | |
| exclude=${exclude:-/\d} | |
| read -p "First Letter[.]: " first | |
| first=${first:-.} | |
| read -p "Second Letter[.]: " second | |
| second=${second:-.} | |
| read -p "Third Letter[.]: " third | |
| third=${third:-.} |
| describe('test, () => { | |
| it('should do the same thing it did last time', () => { | |
| const snapshot = cy.readFile('./cypress/snapshots/snapshot.html'); | |
| let bodyHtml = ''; | |
| cy.visit('/home'); | |
| cy.get('body').then(b => bodyHtml = b.innerHTML); | |
| cy.on('fail', () => { | |
| // This throws a "You can't promise inside a promise" | |
| // https://on.cypress.io/returning-promise-and-commands-in-another-command | |
| cy.writeFile('./cypress/snapshots/snapshot.html', bodyHtml); |
| class GraphRouter { | |
| constructor(state) { | |
| this.vertices = {}; | |
| this.sortedVerticies = []; | |
| this.visitedVerticies = []; | |
| } | |
| addNode(path, dependencies, resolve) { | |
| const vertex = { | |
| name: path.split('/').pop(), |
| # Make sure to `npm install -g pug prettier` first. | |
| # Usage: ./jade_to_html.sh path/to/file/without/extension | |
| pug $1.jade | |
| # remove && escapes | |
| sed -i.bak "s/&&/\&\&/g" $1.html | |
| # remove extra whitespace | |
| sed -i.bak -E "s/[[:space:]]+/ /g" $1.html | |
| # prettify | |
| prettier --write $1.html |
| pug $1.jade | |
| # remove && escapes | |
| sed -i.bak "s/&&/\&\&/g" $1.html | |
| # remove extra whitespace | |
| sed -i.bak -E "s/[[:space:]]+/ /g" $1.html | |
| # prettify | |
| prettier $1.html > $1.prettier.html | |
| # move back to goal file | |
| mv $1.prettier.html $1.html |
| class trie: | |
| def __init__(self): | |
| self.parentNodes = {} | |
| def search(self, word): | |
| if len(word) == 0 or not word[0] in self.parentNodes: | |
| return 0 | |
| return self.parentNodes[word[0]].find(word[1:]) |
I hereby claim:
To claim this, I am signing this object:
| const Vue = require('vue'); | |
| const renderer = require('vue-server-renderer').createRenderer(); | |
| const rssData = { | |
| title: 'Test Feed', | |
| link: 'www.test.com', | |
| desc: 'A test rss feed', | |
| items: [ | |
| { |