Skip to content

Instantly share code, notes, and snippets.

@digitalsignalperson
digitalsignalperson / tabs.css
Created January 23, 2024 09:18
obsidian tabs in multiple rows
/* --------------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;
}*/
@m0rtyn
m0rtyn / obsidian-fix-for-nested-code-blocks.md
Last active January 24, 2024 18:28
obsidian-fix-for-nested-code-blocks.css

Fix for codeblocks nested in list items in Obsidian app

Result: image

.HyperMD-codeblock {
  --code-background: #0003;
@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active February 4, 2024 13:31
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
: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;
}
/*
@thecodingcod
thecodingcod / dbeaver_sqlcipher.md
Last active March 23, 2024 12:55
Setting up Dbeaver (The Universal DBMS) to work with SqlCipher Databases

Setting up Dbeaver (The Universal DBMS) to work with SqlCipher Databases

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!

@kepano
kepano / obsidian-web-clipper.js
Last active April 23, 2024 16:40
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/" */
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@SiccarPoint
SiccarPoint / fix_html_xml.sh
Last active October 12, 2022 09:09
Clean up an imported reference xml in Zotero that contains bad html tags from e.g. Papers3 export
# Guaranteed for mac only due to syntax of sed function, but changes for
# other OS should be minor.
# Ensure you have sqlite3 on your machine.
# Remember to set unix permissions on this file before running:
# chmod 755 fix_html_xml.sh
# and run:
# ./fix_html_xml.sh
# This script should run clean! If you see errors, it won't have worked.
# Will probably take a while to run (mins)
@lukestanley
lukestanley / termux-sshd-wormhole.sh
Last active March 27, 2023 20:29
Access Android's files remotely with SSH server on Termux, and magic-wormhole for key exchange
# With Termux installed, something like this should work
# to type less, you might be able to copy and paste this,
# or use Curl / wget
# First enable file access permission:
termux-setup-storage # accept file access as prompted
pkg install clang cmake python openssh libsodium
SODIUM_INSTALL=system pip install pynacl # skip building bundled version
pip install magic-wormhole
sshd
wormhole ssh invite # follow directions
@Vartkat
Vartkat / buildresticexcludes.sh
Last active December 23, 2023 05:29
Bash script to build a restic exclude list that mimics Apple TimeMachine exclude list
#!/bin/bash
# This script intend to mimic TimeMachine exclude list.
# As the exclude list can evolve between backups it has to be rebuilt before every backup
# Apple uses 5 types of excludes, four from the /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist file
# and files from applications where metadata says to not backup, these can be found usinf
# sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
SYSLOG=/usr/bin/syslog;
TEMPFILE=$1;
<!DOCTYPE html>
<html>
<head>
<title>First React App</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script>
</head>
<body>
<div id='app'></div>