All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

melanie / johnny-decimal-index-for-obsidian-with-dataview.md

0 likes
0 forks
1 files
Last active 8 months ago
obsidian

Johnny Decimal Index Generator for Obsidian with Dataview

You will need to enable JavaScript Queries in the Dataview settings.

let areas = dv.pages("").file.folder.groupBy(g=>g.split("/")[0]).filter(({ key }) => /^\d{2}-\d{2} /.test(key))
let output = ''
areas.forEach(({ key: areaKey, rows: areaRows }) => {
  output += `\n- ${areaKey}`
  areaRows.groupBy(g => g.split("/")[1]).forEach(({ key: categoryKey, rows: categoryRows }) => {

melanie / mullvad-to-tailscale-ip.txt

0 likes
0 forks
1 files
Last active 8 months ago
mullvad tailscale
1 nl-ams-wg-006.mullvad.ts.net=100.85.175.95
2 pl-waw-wg-101.mullvad.ts.net=100.103.142.113
3 se-sto-wg-014.mullvad.ts.net=100.89.86.10
4 no-osl-wg-002.mullvad.ts.net=100.118.245.125
5 us-chi-wg-002-1.mullvad.ts.net=100.125.155.75
6 us-lax-wg-502.mullvad.ts.net=100.64.195.159
7 ca-mtr-wg-004.mullvad.ts.net=100.127.183.1
8 br-sao-wg-201.mullvad.ts.net=100.66.247.50
9 us-lax-wg-403.mullvad.ts.net=100.104.61.115
10 de-ber-wg-005.mullvad.ts.net=100.104.136.32

melanie / bulk-nslookup.sh

0 likes
0 forks
1 files
Last active 11 months ago
1 #!/bin/bash
2
3 if [ $# -ne 1 ]; then
4 echo "Usage: $0 <file>"
5 exit 1
6 fi
7
8 input_file="$1"
9
10 if [ ! -f "$input_file" ]; then

melanie / tailscale-mullvad-exit-node-ips.txt

0 likes
0 forks
1 files
Last active 8 months ago
mullvad tailscale
1 100.85.175.95
2 100.103.142.113
3 100.89.86.10
4 100.118.245.125
5 100.125.155.75
6 100.64.195.159
7 100.127.183.1
8 100.66.247.50
9 100.104.61.115
10 100.104.136.32

melanie / fetch-for-osascript.js

0 likes
0 forks
1 files
Last active 8 months ago
osascript
1 /*
2 Try it from the command line on Mac:
3 `osascript -l JavaScript fetch-for-osascript.js`
4 */
5 function fetch(url) {
6 const queryURL = $.NSURL.URLWithString(url);
7 const requestData = $.NSData.dataWithContentsOfURL(queryURL);
8 const requestString = $.NSString.alloc.initWithDataEncoding(
9 requestData,
10 $.NSUTF8StringEncoding,

melanie / fetch-for-alfred.js

0 likes
0 forks
1 files
Last active 8 months ago
alfred osascript
1 function fetch(url, useJson = true) {
2 const queryURL = $.NSURL.URLWithString(url);
3 const requestData = $.NSData.dataWithContentsOfURL(queryURL);
4 const requestString = $.NSString.alloc.initWithDataEncoding(
5 requestData,
6 $.NSUTF8StringEncoding,
7 ).js;
8 if (useJson) {
9 return JSON.parse(requestString);
10 } else {

melanie / audio-cast.php

0 likes
0 forks
1 files
Last active 8 months ago
rss
1 <?php
2
3 $YOUR_NAME = 'Melanie';
4 $WEBSITE_PATH = 'http://ds423/audio-cast';
5
6 $audioDirectory = '.';
7
8 $audioFiles = glob($audioDirectory . '/*.{mp3,m4a}', GLOB_BRACE);
9 usort($audioFiles, function ($a, $b) {
10 return filemtime($b) - filemtime($a);

melanie / unpkg.js

0 likes
0 forks
1 files
Last active 8 months ago
scriptable
1 // Variables used by Scriptable.
2 // These must be at the very top of the file. Do not edit.
3 // icon-color: green; icon-glyph: archive;
4 // unpkg: like NPM but not as good
5 // and available in Scriptable
6 //
7 // Examples:
8 // - const _ = await unpkg('lodash')
9 // - const CryptoJS = await unpkg('crypto-js')
10 // - const OAuth = await unpkg('oauth-1.0a')

melanie / no-masters.md

0 likes
0 forks
1 files
Last active 8 months ago
docs

Make Git always use main as default branch

Git 2.28.0

git config --global init.defaultBranch main

Pre-Git 2.28.0

melanie / verify-commits.md

0 likes
0 forks
1 files
Last active 8 months ago
docs

How to Verify Your Commits with GPG, but you probably shouldn't. Just use SSH now.

Anyone can be anyone when it comes to commits. For example, here is a commit where ""Linus Torvalds"" deletes Linux. I put this document together for myself a while back, but I thought I would share it with other people who want a straightforward guide to setting up commit signing with GPG.

Instructions

  1. Install gpg brew install gnupg2 (or sudo apt-get install gnupg2, etc)
  2. Generate the key with gpg --full-generate-key (the default type is probably fine)
  3. Make sure it is at least 4096 bits
  4. Make sure you use your Github no-reply email or an email provided to your Github account.
Newer Older

Powered by Opengist ⋅ Load: 296ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ melkat.dev