Skip to content

Instantly share code, notes, and snippets.

@DewaldDeJager
DewaldDeJager / README.md
Last active January 31, 2025 17:50
Easy GitHub workflow for keeping a fork in sync with upstream

Sync Fork

This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml.

It runs daily to sync the default branch and can be triggered manually for any branch.

@kepano
kepano / obsidian-web-clipper.js
Last active February 21, 2025 06:32
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/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@zsviczian
zsviczian / MindmapInput.md
Created May 7, 2021 18:56
This is an Obsidian Templater script that genrates a mindmap drawing from a tabulated outline, similar to the sample outline attached.
  • Test 1
    • Test 1.1
  • Test 2
    • Test 2.1
    • Test 2.2
      • Test 2.2.1
      • Test 2.2.2
      • Test 2.2.3
        • Test 2.2.3.1
  • Test 3
@tdalon
tdalon / Teams_GetMainWindow.ahk
Last active October 13, 2023 12:18
AutoHotkey Script to Get Main Microsoft Teams Window
Teams_GetMainWindow(){
; See implementation explanations here: https://tdalon.blogspot.com/get-teams-window-ahk
; Syntax: hWnd := Teams_GetMainWindow()
WinGet, WinCount, Count, ahk_exe Teams.exe
If (WinCount = 0)
GoTo, StartTeams
If (WinCount = 1) {
@kmhofmann
kmhofmann / installing_nvidia_driver_cuda_cudnn_linux.md
Last active January 10, 2025 22:30
Installing the NVIDIA driver, CUDA and cuDNN on Linux

Installing the NVIDIA driver, CUDA and cuDNN on Linux (Ubuntu 20.04)

This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software

on an Ubuntu Linux system, in particular Ubuntu 20.04.

@reginadiana
reginadiana / README-TEMPLATE.md
Last active February 25, 2025 22:15
Template sugestivo para documentação de projetos

Titulo ou Arte do Projeto

# /root/.unison/10Documents.prf
# Create one config file for each folder, or add one per
# root folder and add subfolders via
# path = 10Documents
# path = 20Media
# To make this unison job load at machine startup use an init-script
# or systemd service such as
# https://gist.github.com/thunfischbrot/0b6a21a84f166c4fa74fc5df4a470b17
# local root to sync
@arikfr
arikfr / README.md
Last active August 29, 2024 05:28
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@maxrodrigo
maxrodrigo / git-split-and-push.sh
Last active August 28, 2024 08:29
Split a repository into batches to avoid `pack exceeds maximum allowed size` on push
# Split a repository into batches to avoid `pack exceeds maximum allowed size` on git push
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD