Skip to content

Instantly share code, notes, and snippets.

View dsebastien's full-sized avatar

Sebastien Dubois dsebastien

View GitHub Profile
<%"---"%>
energy_level_morning:
energy_level_evening:
walked: false
push_ups:
abs:
tags:
- daily_notes
- daily_notes_<% moment(tp.file.title, "YYYY-MM-DD").format("YYYY") %>
<%"---"%>
<%"---"%>
energy_level_morning:
energy_level_evening:
walked: false
push_ups:
abs:
tags:
- daily_notes
- daily_notes_<% moment(tp.file.title, "YYYY-MM-DD").format("YYYY") %>
<%"---"%>
@dsebastien
dsebastien / TPL Book.txt
Last active April 3, 2024 07:22
Book template
<%"---"%>
summary:
link:
tags:
- book_notes
- books
- summaries
<%"---"%>
# <% tp.file.title %>
<%"---"%>
tags:
- meeting_notes
<%"---"%>
# <% tp.file.title %>
## Participants
- ... : Present/Absent/Excused
- ... : Present/Absent/Excused
- ... : Present/Absent/Excused
aliases tags
PREFRONTAL CORTEX (PFC)
prefrontal cortex (pfc)
Prefrontal cortex (PFC)
literature_notes
brain
neuroscience
thinking
cortex

summary: A method to organize your mind, focus your attention, achieve your goals, and avoid feeling overwhelmed link: https://amzn.to/3gXs70N tags:

  • book_notes
  • books
  • summaries
  • creativity
  • work
  • neuroscience
import { useEffect, useRef } from 'react';
export function App() {
// Use a ref to access the Canvas
const canvasRef = useRef<HTMLCanvasElement>(null);
// Use a ref to keep access to the Canvas Context
const canvasCtxRef = useRef<CanvasRenderingContext2D | null>(null);
const draw = (ctx: CanvasRenderingContext2D, frameCount: number) => {
@dsebastien
dsebastien / heatmap.md
Created January 10, 2024 09:21
Heatmap calendar example
const propertyName = "abs";
const emoji = "💪"; // ⏹️💤⚡⚠🧩↑↓⏳📔💾📁📝🔄📝🔀⌨️🕸️📅🔍✨💪
const color = ""; // See Heatmap plugin configuration for color names. If empty string: green

dv.span("** "+emoji+" Abs "+emoji+" **"); /* optional  */

const currentYear = DateTime.now().year;

const pages = dv.pages('"40 Journal/41 Daily Notes"').filter(p => p.file.name.startsWith(currentYear)).where(p => p[propertyName]).sort(p => p.file.name);
@dsebastien
dsebastien / package.json
Created January 31, 2020 11:35
Workbox 5 + Workbox build + TypeScript SW + Webpack build + Angular app
{
...
"scripts": {
"start:web:prod": "npm run build:prod:web && http-server dist/apps/web -d -c-1 -a 0.0.0.0 --proxy http://127.0.0.1:4200? --port 4200",
"start:web:prod:local": "npm run build:prod:web:local && http-server dist/apps/web -d -c-1 -a 0.0.0.0 --proxy http://127.0.0.1:4200? --port 4200",
"build:prod:web": "ng build web --prod",
"postbuild:prod:web": "npm run build:pwa:web",
"build:prod:web:local": "ng build web --prod",
"postbuild:prod:web:local": "npm run build:pwa:web:local",
"build:pwa:web": "rimraf ./dist/apps/web/service-worker.js && webpack --config ./service-worker/webpack.prod.config.js --progress --colors && node ./workbox-build-inject.js",
@dsebastien
dsebastien / create
Created February 27, 2014 22:10
git-shell-commands - create
#!/bin/sh
# Adapted from: http://planzero.org/blog/2012/10/24/hosting_an_admin-friendly_git_server_with_git-shell
# comment out or adapt if you want to allow non-root users to create new repositories
# If the user is not root
if [ "$USERNAME" != "root" ]
then
# Display a notice and stop
echo "Sorry, only root can use this command."