Skip to content

Instantly share code, notes, and snippets.

Avatar

jared laser imjared

View GitHub Profile
@imjared
imjared / Notion table of contents
Created Feb 4, 2021
Adds a pinned table of contents when viewing Notion. Relies on uBlock Origin filters
View Notion table of contents
## 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 / ublock-notion-toc.txt
Created Jul 7, 2020
Use uBlock's filters to move Notion's table of contents to somewhere useful
View ublock-notion-toc.txt
! 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;)
View keybase.md

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:

View lime.sh
#!/bin/bash
projectFile=$(find $1 -name "*.sublime-project" -maxdepth 1)
echo $projectFile
if [ $projectFile ]
then
subl $projectFile
else
subl $1
fi
View ticketflyTotal.js
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 / bootstrap-breakpoints.scss
Last active Aug 16, 2016
scss breakpoint helpers based on bootstrap
View bootstrap-breakpoints.scss
// breakpoint helpers based on bootstrap's breakpoints
@mixin xs {
@media #{screen} and (max-width: #{$screen-xs-max}) {
@content;
}
}
@mixin sm {
@media #{screen} and (min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max}) {
@imjared
imjared / logo.scss
Last active Aug 29, 2015
source for codepen.io/imjared/full/athzf.
View logo.scss
@import "mathsass/dist/math.scss";
$radius: 12px;
$colors : (
1: #746f86,
2: #746f86,
3: #a16e8f,
4: #a16e8f,
5: #a9637b,
6: #a9637b,
@imjared
imjared / lime.sh
Created Oct 16, 2013
Add to /usr/local/bin. Use `lime [path]` instead of `subl [path]` to open sublime projects. If a project file exists it opens and preserves project settings. Requires `subl`. In response to http://www.sublimetext.com/forum/viewtopic.php?f=3&t=14129
View lime.sh
#!/bin/bash
projectFile=$(find $1 -name "*.sublime-project" -maxdepth 1)
echo $projectFile
if [ $projectFile ]
then
subl $projectFile
else
subl $1
fi
@imjared
imjared / rename.sh
Last active Dec 24, 2015
if you get a bunch of files that have an undesirable prefix and you want to remove it, just tell this script the prefix
View rename.sh
#!/bin/bash
# takes an argument of an undesired prefix then removes it from all files in dir
# if no arg is passed, prompt for name
if [ $# -eq 0 ]
then
read -p 'What prefix do you want to remove?: '
prefix=$REPLY
else
prefix=$1
@imjared
imjared / scraping-with-casperjs.js
Created Mar 20, 2013
A CasperJS script that crawled a list of links on then scraped the relevant content on each page and output it to a nicely formatted XML file. Sure beats database dumps/SQL manipulation, in my opinion.
View scraping-with-casperjs.js
/*jshint strict:false*/
/*global CasperError console phantom require*/
/**
* grab links and push them into xml
*/
var casper = require("casper").create({
});