Skip to content

Instantly share code, notes, and snippets.


Will B Chang willbchang

  • Capvision
  • Shanghai, China
View GitHub Profile

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

View sea-view.el
(require 'svg)
(defun replace-text (start end)
(interactive "r")
(let* ((str (buffer-substring start end))
(scale (cadr (assoc :height (assoc 'default face-remapping-alist))))
(width (float (car (window-text-pixel-size nil start end))))
(height (float (cdr (window-text-pixel-size nil start end))))
(family (face-attribute 'default :family))
(ascent (* (aref (font-info family) 8) (if scale scale 1)))
(img (format "<?xml version='1.0' encoding='UTF-8'?>
karthink / fast-latex-input.el
Last active May 4, 2022
Configuration for super-fast Latex input using AucTeX, CDLatex and a bit of YaSnippet. See
View fast-latex-input.el
;; This elisp code uses use-package, a macro to simplify configuration. It will
;; install it if it's not available, so please edit the following code as
;; appropriate before running it.
;; Note that this file does not define any auto-expanding YaSnippets.
;; Install use-package
(package-install 'use-package)
;; AucTeX settings - almost no changes
radiantly / noMangleGoogle.user.js
Last active May 3, 2022
Prevent Google from mangling links on the search results when clicking or copying on Firefox
View noMangleGoogle.user.js
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
View RemoveBackgroundCoreML_Final.swift
// Don't forget to add to the project:
// 1. DeepLabV3 -
// 2. CoreMLHelpers -
enum RemoveBackroundResult {
case background
case finalImage
extension UIImage {
Akhu / .gitignore
Last active May 12, 2022
Xcode 12 + Swift UI Gitignore
View .gitignore
# Created by,swift,xcode,macos
# Edit at,swift,xcode,macos
### macOS ###
# General
View boilerplate.swift
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI {
VStack {
Text("Hello, World")
talkingmoose / Manage App Notifications.bash
Last active Dec 20, 2021
macOS Catalina will prompt users to allow Notifications from each app that makes a request. Administrators can manage these prompts using a Configuration Profile. If running Jamf Pro 10.19 or later, I suggest instead using this manifest:…
View Manage App Notifications.bash
Written by:William Smith
Professional Services Engineer
maxandersen / init.lua
Created Aug 25, 2019 — forked from fmaiabatista/hs-text-expander.lua
HammerSpoon Text Expansion Feature
View init.lua
=== HammerText ===
Based on:
How to "install":
- Simply copy and paste this code in your "init.lua".
How to use:
- Add this init.lua to ~/.hammerspoon/Spoons/HammerText.spoon
- Add your hotstrings (abbreviations that get expanded) to the "keywords" list following the example format.
pirate /
Last active May 20, 2022
Script to manage searching, backing up, and collecting infinite clipboard history from the Alfred Clipboard History on macOS.
#!/usr/bin/env bash
# This is a script that provides infinite history to get around Alfred's 3-month limit.
# It works by regularly backing up and appending the items in the alfred db to a
# sqlite database in the user's home folder. It also provides search functionality.
# Example Usage:
# backup