Skip to content

Instantly share code, notes, and snippets.

View lepinkainen's full-sized avatar
💭
Hmm?

Riku Lindblad lepinkainen

💭
Hmm?
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active May 3, 2024 07:21
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/" */
@Geritz
Geritz / LancerCoreHelper.js
Last active November 7, 2023 14:34
Lancer Core Helper Script for Roll20
// LancerCoreHelper.js by Spencer Moran
// V. 1.5.01 - 6/6/2023
// This script created to help automate some of the more tedious aspects of the LANCER system.
//PREREQUISITES AND DEPENDENCIES
// 1. 'Lancer status icons for Roll20' pack by Hayley - https://drive.google.com/drive/folders/1bY1GPvCP3jNajtXSElm40VM_REH5eQ6i
// is required to use the set-status buttons on the UI. Not having the correctly named token markers will cause
// the script to crash. A fix is in progress. Note that if you want to use a different set of markers an example macro has
// been created so you can still have access to the functionality. The get-status macro is token-agnostic.
// SEE WARNINGS->STATUS ICONS
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mplewis
mplewis / flask-uwsgi-nginx-primer.md
Last active October 24, 2022 19:20
Flask + uWSGI + nginx Primer. I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@akheron
akheron / remote-emacs.sh
Created March 2, 2011 11:28
Use emacsclient for editing remote files by setting this script as EDITOR in the remote machine
#!/bin/sh
#
# Use this script as your EDITOR to allow editing remote files with emacsclient.
# Works by connecting to the Emacs machine with SSH and using a suitable tramp prefix.
# How to reach this machine from the one that's running Emacs
ME=user@remote-host
# How to reach the machine that's running Emacs from this machine
THEY=user@host-running-emacs