Skip to content

Instantly share code, notes, and snippets.

@goatandsheep
goatandsheep / Texify-Mathjax.js
Last active March 6, 2023 07:57
[Deprecated] A Tampermonkey / Greasemonkey script that turns LaTeX code on page into mathematical symbols using MathJax
// ==UserScript==
// @name TeXify the World MathJax
// @namespace
// @version 1.0
// @description Enables MathJax to process LaTeX on all websites. Based off SOUP (Stack Overflow Unofficial Patch) and http://www.math.ucla.edu/~robjohn/math/mathjax.html.
// @include *
// @copyright
// ==/UserScript==
/*
var mathjaxVersion = "http://cdn.mathjax.org";
@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
@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>
@JamesMarino
JamesMarino / TouchBar
Created May 15, 2017 01:53
Disable the TouchBar
#!/bin/bash
function enableTouchBar() {
local presentationModeProperties="<dict><key>app</key><string>fullControlStrip</string><key>appWithControlStrip</key><string>fullControlStrip</string><key>fullControlStrip</key><string>app</string></dict>"
defaults delete com.apple.touchbar.agent PresentationModeGlobal
defaults write com.apple.touchbar.agent PresentationModeFnModes $presentationModeProperties
launchctl load /System/Library/LaunchAgents/com.apple.controlstrip.plist
@deathau
deathau / Readme.md
Last active August 24, 2023 05:38
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)

@spudbean
spudbean / gist:1558257
Last active August 25, 2023 19:26
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@matthewmccullough
matthewmccullough / .zshrc
Created January 20, 2011 00:00
A configuration to maintain history across sessions and share it across terminals in ZShell
##############################################################################
# History Configuration
##############################################################################
HISTSIZE=5000 #How many lines of history to keep in memory
HISTFILE=~/.zsh_history #Where to save history to disk
SAVEHIST=5000 #Number of history entries to save to disk
#HISTDUP=erase #Erase duplicates in the history file
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
@walesmd
walesmd / IconServiceAgent.md
Last active December 13, 2023 05:06
A lot of people are having issues with com.apple.IconServicesAgent. Since this is a very new issue, Google was no help and `man iconservicesd` is even more hilarious. I eventually fixed it, when I was working on a completely different issue (that is still not fixed). The instructions are below and on the Apple Support Forum, https://discussions.…

I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!

Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.

  1. Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist

  2. I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).

  3. Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook

@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)
@ijy
ijy / sublime-text-3-setup.md
Last active January 15, 2024 14:21
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following: