.HyperMD-codeblock {
--code-background: #0003;
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 | |
# Verifies the SHA-256 hash of a downloaded file from (https://gitflic.ru/project/magnolia1234/bpc_uploads) against the hash in [release-hashes.txt](https://gitflic.ru/project/magnolia1234/bpc_uploads/blob/raw?file=release-hashes.txt). | |
# 1. Downloads the hash file from the [HASH_URL] and extracts the expected hash for the correspondent [FILENAME]. | |
# 2. Downloads the zip-file [FILENAME] from [DOWNLOAD_URL] and calculates its SHA-256 hash. | |
# 3. Compares the calculated hash with the expected hash. | |
# 4. On match, prompts the user to move the file to a permanent location [DOWNLOAD_DIR]. | |
# 5. Moves and extracts the file if confirmed; otherwise, deletes the temporary file. | |
# Note: Before running script, replace [DOWNLOAD_DIR] with permanent location on your computer that you use for your extension, excluding the extracted folder name [EXTRACT_DIR_NAME]. | |
import requests |
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
# Run without arguments to see what is found. | |
# Run with a path as an argument to create links to ollama models there. | |
# This will remove any files that follow the exact filename as the new link file, so use with caution! | |
import os | |
import sys | |
import json | |
import platform |
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/sh | |
# Scenario: | |
# - you have a local checkout of a github repo | |
# - you're looking at public forks of that repo | |
# - you want to add a remote to your local checkout for one of the forks | |
set -e | |
set -o pipefail |
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
/* --------------compact tabs--------------------*/ | |
.workspace .mod-root .workspace-tab-header { | |
width: unset; | |
max-width: var(--tab-width); | |
border: 1px solid var(--color-base-50); | |
} | |
/*.workspace-tab-header-inner { | |
width: unset; | |
}*/ |
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 node | |
/* | |
Usage: ./to-netscape-bookmarks.sh urls | tee bookmarks.html | |
urls is a simple textfile with urls separated by breakline | |
Titles are pulled with pup tool | |
*/ | |
const { exec } = require('child_process'), fs = require('fs'), readline = require('readline') | |
const file = process.argv[2] |
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 toggleFocus(focus) { | |
const app = Application("System Preferences") | |
const pane = app.panes.byId("com.apple.preference.notifications").anchors.byName("Focus") | |
app.reveal(pane) // Open the preference pane | |
// Useful way of inspecting the UI hierarchy of an open app: | |
// Application("System Events").applicationProcesses.byName("System Preferences").entireContents() | |
const ui = Application("System Events").applicationProcesses.byName("System Preferences").windows.byName("Notifications & Focus").tabGroups.at(0) |
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
:root { | |
/* #7159de (similar to Obsidian purple) */ | |
--block-ref-line-color: grey; | |
--block-ref-line-type: solid; | |
--block-ref-line-size: 2px; | |
/* Set to "inherit" for no bg color */ | |
--block-ref-hover-bg-color: #d4d0d026; | |
} | |
/* |
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
const app = Application.currentApplication() | |
app.includeStandardAdditions = true | |
function getJSON(path) { | |
const fullPath = path.replace(/^~/, app.pathTo('home folder')) | |
const contents = app.read(fullPath) | |
return JSON.parse(contents) | |
} | |
function run() { |
I’ve tried multiple solutions to browse SqlCipher
Databases and the only one that seemed to work properly was [DB Sqlite Browser](DB Browser for SQLite (sqlitebrowser.org)) with easy GUI to get into the db. but … the overall experience of that application didn’t really satisfy me!
I knew DBeaver from long time ago, and i wondered if i can use it with SQLCipher, but it was surprisingly a shock that it doesn’t work directly, but with a couple of hours of researching and trying different methods i finally came up with a way to configure it Out-of-the box to make it work!
The reason I wrote this gist was to help others who have the same issue as it seems there is no guide to show how to do so!
NewerOlder