Skip to content

Instantly share code, notes, and snippets.

var total = 0;
$('.results-list tr').not('thead tr').each( function() {
var amount = $(this).find('td').eq(4).text();
amount = amount.replace('$', '');
total = total + parseFloat( amount );
});
console.log( 'total amount: $' + total.toFixed( 2 ) + ', lol' );
@imjared
imjared / lime.sh
Created September 22, 2016 02:02
#!/bin/bash
projectFile=$(find $1 -name "*.sublime-project" -maxdepth 1)
echo $projectFile
if [ $projectFile ]
then
subl $projectFile
else
subl $1
fi
@imjared
imjared / keybase.md
Last active September 9, 2019 19:50

Keybase proof

I hereby claim:

  • I am imjared on github.
  • I am imjared (https://keybase.io/imjared) on keybase.
  • I have a public key ASAyEZudDaehMsNgynlDs_jxZ6-KcVZF_EubkUKqG4IVCQo

To claim this, I am signing this object:

@imjared
imjared / ublock-notion-toc.txt
Created July 7, 2020 15:28
Use uBlock's filters to move Notion's table of contents to somewhere useful
! In ublock's extension settings, under "My Filters", add the following:
! move notion's table of contents to the side
notion.so##.notion-table_of_contents-block>div:style( position: fixed !important; top: 4rem; left: 1rem; width: 350px !important; padding: 2rem; border: 1px solid #eee; border-radius: 5px; max-height: calc(100vh - 5rem) !important; overflow: scroll;)
@imjared
imjared / Notion table of contents
Created February 4, 2021 16:17
Adds a pinned table of contents when viewing Notion. Relies on uBlock Origin filters
## Add to U
! add notion
notion.so##.notion-table_of_contents-block>div:style(overflow: scroll; overflow-x: hidden; background-color: white; position: fixed !important; top: 4rem; left: 1rem; width: 350px !important; padding: 2rem; border: 1px solid #eee; border-radius: 5px; max-height: calc(100vh - 5rem) !important; overflow: scroll;)
@imjared
imjared / notion-toc.js
Last active September 6, 2022 20:11
Notion table of contents bookmarklet
/**
* Note that this only works for pages that have a table of contents. It won't magically make one for you. V2, anyone?
*
* Usage:
* 1. In Chrome, right click your bookmarks menu and click "Add page" in the popup menu
* 2. For "Name", pick something like "Notion TOC Formatter"
* 3. For "URL", paste the code below and click Save
* 4. On a Notion page that has a table of contents, click the bookmarklet and ✨✨
*
* This will only work for the page you're on. As soon as you navigate, ya gotta click again.