This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if the current directory starts with /mnt/ | |
if pwd -P | grep -q "^/mnt/"; then | |
# Use git.exe for directories under /mnt/ | |
exec git.exe "$@" | |
else | |
# Use /usr/bin/git for other directories | |
exec /usr/bin/git "$@" | |
fi |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var obsidian = require("obsidian"); | |
/****************************************************************************** | |
Copyright (c) Microsoft Corporation. | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Start Python REPL and setup rich | |
# https://rich.readthedocs.io/en/latest/introduction.html#rich-in-the-repl | |
""":" | |
PYTHON=${PYTHON:-python} | |
if command -v python3 &>/dev/null; then | |
PYTHON=python3 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
from Crypto.Hash import SHA256 | |
from Crypto.PublicKey import ECC | |
from Crypto.Signature import DSS | |
from Crypto.Util.asn1 import DerSequence | |
response = { | |
"signature": "MEUCICF25qdO6nLreEoBHnyaw-9R6XFHbIu-NwsAI53t016qAiEAgmhlwTEMxoWx" | |
"Kj79R1rUkB_6nrhJfws82DqHkY_HnqQ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openrpc": "1.0.0-rc1", | |
"info": { | |
"version": "1.0.0", | |
"title": "Petstore", | |
"license": { | |
"name": "MIT" | |
} | |
}, | |
"servers": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"[javascript]": { | |
"editor.defaultFormatter": "vscode.typescript-language-features" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "vscode.json-language-features" | |
}, | |
"[jsonc]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Input { | |
PromptModal = class extends customJS.obsidian.Modal { | |
title = "Input"; | |
value = ""; | |
submitted = false; | |
placeholder = "Type text here"; | |
constructor(opts = {}) { | |
super(app); | |
Object.assign(this, opts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://json.schemastore.org/lazygit.json | |
promptToReturnFromSubprocess: false | |
os: | |
editPreset: "nvim" | |
customCommands: | |
- key: E | |
context: commitFiles | |
subprocess: true | |
# - When a file is selected, open the file before the commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys | |
import subprocess | |
import json | |
from collections import namedtuple, OrderedDict | |
import requests | |
from requests.auth import HTTPBasicAuth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function htmlToMarkdown(input: string) { | |
const linkRegex = /<a\s+[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/gi; | |
return input.replace(linkRegex, '[$2]($1)'); | |
} | |
const TZ = 8*60*60; | |
function formatDiscordTimestamp(input: string) { | |
const ts = moment.utc(input, "MMMM D, YYYY at hh:mmA", "MMMM D, YYYY").unix() - TZ; | |
return `<t:${ts}>`; | |
} |
NewerOlder