Skip to content

Instantly share code, notes, and snippets.

View metbril's full-sized avatar

metbril metbril

View GitHub Profile
@frankmeeuwsen
frankmeeuwsen / gist:0d0e6c7d0fb18f33b5b85f8f1851888b
Created January 21, 2024 10:24
Dataview to get a list of files that are updated in the last 7 days
```dataview
TABLE file.name, file.ctime AS "Created"
WHERE file.ctime >= date(<% tp.date.now("YYYY-MM-DD", -7) %>) and file.ctime < date(<% tp.date.now("YYYY-MM-DD") %>)
sort file.ctime
```
@frankmeeuwsen
frankmeeuwsen / dataview
Created January 21, 2024 10:17
Dataview to get the output under a specific heading in your notes
```dataview
TABLE L.text AS "Articlelist"
FROM #weeknotes
FLATTEN file.lists as L
WHERE meta(L.section).subpath = "Articles"
SORT file.ctime DESC
LIMIT 25
```
<?php
/**
* Adds a "copy" of your site's "blog" page at `/stream/`. Visit "Settings >
* Permalinks" to flush rewrite rules after adding this code.
*/
add_action( 'init', function() {
add_rewrite_rule( '^stream/feed/?', 'index.php?feed=rss2', 'top' );
add_rewrite_rule( '^stream/page/([0-9]{1,})/?', 'index.php?paged=$matches[1]', 'top' );
add_rewrite_rule( '^stream/?', 'index.php', 'top' );
@kepano
kepano / obsidian-web-clipper.js
Last active June 21, 2024 07:20
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@frankmeeuwsen
frankmeeuwsen / linkedin-unfollow-everyone.js
Created September 8, 2020 19:40 — forked from brunolemos/linkedin-unfollow-everyone.js
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@novoid
novoid / vkbackup-system-config.sh
Created August 24, 2020 09:41
vkbackup-system-config.sh
#!/bin/sh
VERSION="Time-stamp: <2019-10-10 17:18:58 vk>"
## This script backups several things to a given target directory
## Initial tings to backup are taken from:
## https://www.debian.org/releases/stretch/amd64/release-notes/ch-upgrading.en.html
## -> "4.1.1. Back up any data or configuration information"
## «The main things you'll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active June 14, 2024 01:30
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@brunolemos
brunolemos / linkedin-unfollow-everyone.js
Last active February 3, 2024 05:47
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@novoid
novoid / vkorgheadingstats.sh
Created May 2, 2020 09:08
A shell script that derives basic statistics on one or more Org mode files
#!/bin/sh
FILES="${@}"
USERTAG="@KarlVoit"
no_files_found()
{
echo "No files found. Please do give me some Org-mode files as parameter" >&2
exit 1
}
@gvenk
gvenk / convert-all-youtube-urls-to-nocookie-bookmarklet.js
Last active May 21, 2024 08:57
Convert all youtube urls on a webpage to youtube-nocookie.com urls
javascript:void%20function(){const%20a=document.querySelectorAll(%22a%22);a.forEach(a=%3E{if(-1!==a.href.indexOf(%22youtube.com%22)){const%20b=new%20URL(a.href).searchParams,c=b.get(%22v%22);c%26%26(a.href=%22https://www.youtube-nocookie.com/embed/%22+c)}else-1!==a.href.indexOf(%22youtu.be%22)%26%26(a.href=a.href.replace(%22//youtu.be/%22,%22//www.youtube-nocookie.com/embed/%22))});const%20b=document.querySelectorAll(%22iframe%22);b.forEach(a=%3E{-1===a.src.indexOf(%22//www.youtube.com%22)%3F-1!==a.src.indexOf(%22//youtube.com%22)%26%26(a.src=a.src.replace(%22//youtube.com/%22,%22//www.youtube-nocookie.com/%22)):a.src=a.src.replace(%22//www.youtube.com/%22,%22//www.youtube-nocookie.com/%22)})}();