Skip to content

Instantly share code, notes, and snippets.

@spencerwooo
spencerwooo / termiWidget.js
Last active September 22, 2024 21:46
🍋 TermiWidget - Terminal-like Widget for iOS 14, made with Scriptable.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: quote-right;
// Change these to your usernames!
const user = "spencer"
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E"
const telegram = "realSpencerWoo"
const github = "spencerwooo"
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@deathau
deathau / Readme.md
Last active September 21, 2024 03:05
Obsidian scss

Obsidian SASS theme switching tools

I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.

Instructions

For my purposes, I created a subfolder in my Obsidian vault called ./.themes where my obsidian.scss file lives. I also created a subfolder for mixins (./.themes/mixins) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)

@maxrodrigo
maxrodrigo / details.html
Created April 29, 2020 16:01
Details disclosure and summary elements hugo shortcode.
{{ .Scratch.Set "lastp" (sub (.Params | len) 1) }}
<details {{ if .Get 0 | eq "open"}} open {{ end }}>
<summary>
{{ .Get (.Scratch.Get "lastp") }}
</summary>
{{ .Inner | markdownify }}
</details>
@sicarul
sicarul / distracted_bf.Rmd
Last active April 23, 2020 15:38
Distracted BF
``` r
library(tidyverse)
dbf = data.frame(color=character(0), x=numeric(0), y=numeric(0), stringsAsFactors = F)
## Distractive woman
# Left arm
dbf = bind_rows(dbf, crossing(color='skin', x=seq(4,5), y=seq(1,9)))
dbf = bind_rows(dbf, data.frame(color='skin', x=5, y=10))
@kfur
kfur / darkreader.js
Last active September 23, 2024 17:51
Dark Reader userscript for Safari browser
// ==UserScript==
// @name DarkReader
// @match *://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
// MIT License
// Copyright (c) 2019 Alexander Shutau
@matthieuheitz
matthieuheitz / djvu2pdf.sh
Last active June 12, 2023 12:47
djvu2pdf, a conversion script using ocrodjvu and pdfbeads
#!/bin/bash
# Method found here https://askubuntu.com/a/122604/423332
# Dependencies:
# On ubuntu, you can install ocrodjvu and pdfbeads with:
# sudo apt install ocrodjvu
# gem install pdfbeads
# The path and filename given can only contain ascii characters
@ysimonson
ysimonson / bluetooth_sleep.lua
Last active October 15, 2024 15:43
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
require "string"
function checkBluetoothResult(rc, stderr, stderr)
if rc ~= 0 then
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout))
end
end
function bluetooth(power)
print("Setting bluetooth to " .. power)
@jozsefsallai
jozsefsallai / GoHTML.sublime-syntax
Last active July 26, 2024 19:17
Go HTML template syntax highlighting for Sublime Text
%YAML 1.2
---
name: 'GoHTML'
file_extensions:
- gohtml
- html.go
scope: text.html.gohtml
contexts:
main:
- match: ''
@endolith
endolith / finite_scroll.txt
Last active January 8, 2024 12:31
Adblock ublock kill infinite scrolling
! Title: Finite Scroll (kills infinite scrolling)
! Last modified: 2017-10-24
! Homepage: https://gist.github.com/endolith/72ac5e69e037be02b118adbedcdeac59
! This URL: https://gist.githubusercontent.com/endolith/72ac5e69e037be02b118adbedcdeac59/raw/finite_scroll.txt
! TODO: Add these scripts: https://infinite-scroll.com/
! Forbes infinite scroll (and all other AJAX)