Skip to content

Instantly share code, notes, and snippets.

Avatar

jared laser imjared

View GitHub Profile
@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 / gist:a2ed311f5b2110dbdaf9
Created Feb 3, 2015
display list of optimizely tests
View gist:a2ed311f5b2110dbdaf9
javascript:(function(){var names="";for(var i=window["optimizely"].data.state.activeExperiments.length-1;i>=0;i--){var experimentId=window["optimizely"].data.state.activeExperiments[i];names+='<p style="font-size: 12px;">'+window["optimizely"].data.experiments[experimentId].name+"</span>";}var el=document.createElement("div");el.style.cssText="position: fixed; top: 0; right: 0; width: 15%; background: #000; color: #fff; padding: 5px; text-align: center;";el.innerHTML=names;var body=document.getElementsByTagName("body")[0];body.appendChild(el);window.setTimeout(function(){el.remove();},3000);})();
View imagedump.js
var canvas = document.getElementById("image-canvas");
var ctx = canvas.getContext("2d");
var pattern = {
background: "./output/background.jpg",
overlay: "./img/lucas.png",
points: [
{
xPercent: 10,
yPercent: 10,
@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 / gist:10305012
Created Apr 9, 2014
show optimizely tests on page
View gist:10305012
javascript:(function(){var names="";for(var i=window["optimizely"].data.state.activeExperiments.length-1;i>=0;i--){var experimentId=window["optimizely"].data.state.activeExperiments[i];names+='<p style="font-size: 12px;">'+window["optimizely"].data.experiments[experimentId].name+"</span>";}var el=document.createElement("div");el.style.cssText="position: fixed; top: 0; right: 0; width: 15%; background: #000; color: #fff; padding: 5px; text-align: center;";el.innerHTML=names;var body=document.getElementsByTagName("body")[0];body.appendChild(el);window.setTimeout(function(){el.remove();},3000);})();
@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
You can’t perform that action at this time.