Skip to content

Instantly share code, notes, and snippets.

View strazto's full-sized avatar

Matthew Strasiotto strazto

View GitHub Profile
@saikotek
saikotek / OBSIDIAN-SYNC-SETUP.md
Last active December 21, 2025 16:32
Easy setup Obsidian Sync (or Livesync or Remotely Save) with Git

Setting Up Obsidian Sync (or Livesync or Remotely Save) with Separate Git Backup

This guide describes how to set up an Obsidian vault that syncs across devices while maintaining a separate Git backup without interfering with the sync mechanism. This guide should work with either official Obsidian Sync solution or with unofficial sync plugins like Obsidian Livesync or Remotely Save.

Prerequisites

  • Git installed on your system
  • Obsidian installed
  • Either Obsidian Sync subscription or LiveSync plugin configured
  • Basic familiarity with command line
@airtonix
airtonix / dataview.d.ts
Created October 25, 2024 01:44
dataview.d.ts
/// <reference types="parsimmon" />
/// <reference types="jest" />
declare module "api/result" {
/** Functional return type for error handling. */
export class Success<T, E> {
value: T;
successful: true;
constructor(value: T);
map<U>(f: (a: T) => U): Result<U, E>;
flatMap<U>(f: (a: T) => Result<U, E>): Result<U, E>;
@jeremy-code
jeremy-code / _Importexport Raycast preferences with GIt history.md
Last active January 23, 2026 00:54
Import/export Raycast preferences with GIt history

Raycast has a feature to import/export preferences in a .rayconfig file format. This isn't ideal for use in a dotfiles-esque Git repository since it would be difficult to compare changes with a compressed file. Also, unfortunately, syncing is only possible on a pro subscription and only through Raycast's cloud service.

To get a more useful JSON file from the .rayconfig (example shown in example.rayconfig.json), you will have to first have to export a decrypted version. Go to Settings > Extensions > Raycast > Export Settings & Data and under "Export Password," which by default is 12345678, you will want to delete that.

After that, run the "Export Settings & Data" command. You should be able to export all of the preferences (Settings, Extensions, Floating Notes, Script Directories, Snippets) except Quicklinks without setting a password.

Then, in terminal, run gzip --decompress --keep --suffix .rayconfig NAME_OF_FILE.rayconfig and you should get a JSON file similar to example.rayconfig.json.

After that,

@dfsnow
dfsnow / json-exporter-config.yaml
Last active October 5, 2025 03:21
Export Jellyfin playback statistics to Prometheus and Grafana. See https://sno.ws/jellyfin-stats for more info
modules:
jellyfin:
headers:
# The Token value here needs to be an API key generated from the
# Jellyfin admin panel. It's hard-coded here but I'm sure there's
# a better way
Authorization: MediaBrowser Token=ADD_TOKEN_HERE
Content-Type: application/json
accept: application/json
@OndraZizka
OndraZizka / GoogleSheets-getCellLink.gs
Created August 27, 2022 09:22
Google Sheets custom function: Get a link from a given cell.
@daehahn
daehahn / wsl2-network.ps1
Last active September 28, 2025 12:00
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@ogazitt
ogazitt / auth.go
Created April 14, 2020 05:53
Auth0 PKCE flow for a CLI built in golang
package auth
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
@johnfink8
johnfink8 / LICENSE
Last active March 10, 2024 16:47
SFTP/SSH Paramiko Wrapper
MIT License
Copyright (c) 2012 John Fink
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: