Skip to content

Instantly share code, notes, and snippets.

@kylestratis
kylestratis / Tasks by Date - for Obsidian and Dataview.js
Last active August 29, 2021 21:39 — forked from TfTHacker/Tasks by Date - for Obsidian and Dataview.js
A fork of TfTHacker's daily tasks query that, among other things, bases dates for overdue/due/upcoming tasks on the current page's title
```dataviewjs
// find dates based on format [[YYYY-MM-DD]]
const findDated = (task)=>{
if( !task.completed && !task.path.startsWith('Bins/Roam Import')) { // ignores Roam imports
task.link = " " + "[[" + task.path + "|*]]";
task.date="";
const found = task.text.match(/\[\[([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))\]\]/);
if(found) task.date = moment(found[1]);
return true;
}
@kylestratis
kylestratis / Code.gs
Last active November 9, 2021 20:03
Appscript to generate an email when setting "Added to Roam" column to TRUE. Only works with gmail address
// This constant is written in column C for rows for which an email
// has been sent successfully.
var ADDED = true;
var EMAIL_SENT = true;
/**
* Sends non-duplicate emails with data from the current spreadsheet.
*/
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
@kylestratis
kylestratis / readwise_jinja_template
Last active December 4, 2020 16:25
Readwise template
Type:: #{% if category == "articles" %}Article{% elif category == "books" %}Book{% elif category == "tweets" %}Tweet{% else %}{{category|title}}{% endif %}
Author:: [[{{author}}]]
Recommended By::
Full Title:: {{full_title}}
Status:: #Waiting [[📤Things to Process]]
Tags:: #Readwise
Newsletter:: [[Newsletter Backlog]]
{% if url %}Link:: {{url}}{% endif %}
{% if image_url %}![]({{image_url}}){% endif %}
# Summary
Type:: #Book
Author::
Recommended by::
Status:: #Waiting
Link::
Tags::
Newsletter::
# Summary
After organizing, highlighting, and bolding the highlights, create a high-level summary #[[Progressive Summarization]]
# [[💡Ideas]]
@kylestratis
kylestratis / .zshrc
Created June 1, 2019 15:32
public version of my personal zshrc
# If you come from bash you might have to change your $PATH.
#export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
export TERM="xterm-256color"
#See this for some commands: https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet
#source ~/.fonts/*.sh
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
@kylestratis
kylestratis / iterm2
Created March 31, 2019 03:47
Profile for iTerm2
{
"Use Non-ASCII Font" : false,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.50962930917739868,
"Red Component" : 0.44058024883270264,
"Blue Component" : 0.51685798168182373
},