Skip to content

Instantly share code, notes, and snippets.

var pages = dv.pages('#daily');
pages = pages.filter(p => p.file.name.includes('<% tp.date.now('YYYY-MM', 0, tp.file.title, 'YYYY-MM') %>'));
var titles = [], weights = [], eatingWindows = [];
pages.sort().forEach(p => {
	titles.push(p.file.name);
	weights.push(p.weight || 0);
	eatingWindows.push([p.startEating, p.endEating]);
});
@jakeweidokal
jakeweidokal / Obsidian Daily Note Template.md
Last active January 29, 2025 23:24
This is Jake Weidokal's template for creating daily notes in Obsidian.
week tags
<% tp.date.now('ww',0, tp.file.title, 'YYYY-MM-DD') %>
daily

<% tp.web.daily_quote() %>

<% tp.date.now("dddd, MMMM Do YYYY", 0, tp.file.title, "YYYY-MM-DD") %>

[[ <% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %> |⬅️ Yesterday]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>|➡️ Tomorrow]] | [[<% tp.date.now("YYYY-[w]WW", 0, tp.file.title, "YYYY-MM-DD") %>|📖 Weekly]] | [[<% tp.date.now("YYYY-MM", 0, tp.file.title, "YYYY-MM-DD") %>|📅 Monthly]]

@christophersjchow
christophersjchow / pipeline.conf
Last active April 21, 2025 11:50
Logstash pipeline and grok patterns for Unifi Dream Machine (UDM) 1.8.6
input {
udp {
port => 10514
type => unifi_syslog
}
}
filter {
if [type] == "unifi_syslog" {
grok {
@mubix
mubix / infosec_newbie.md
Last active March 10, 2025 09:42
How to start in Infosec
@JosefJezek
JosefJezek / ldap2csv.py
Last active April 23, 2022 07:49
Export Users from Active Directory / LDAP to CSV file with Python
#!/usr/bin/python
# http://www.packtpub.com/article/python-ldap-applications-ldap-opearations
# sudo apt-get install python-ldap
import ldap
host = 'ldap://example.com:389'
dn = '[email protected]'