Skip to content

Instantly share code, notes, and snippets.

@njm2112
njm2112 / getTrueName.c
Created January 1, 2019 19:18
Resolve macOS aliased files and soft links, return the name of the target/actual file
// getTrueName.c
//
// Modified and adapted from https://github.com/GalCohen/dotfiles/blob/master/getTrueName.c
//
// DESCRIPTION
// Resolve HFS and HFS+ aliased files (and soft links), and return the
// name of the "Original" or actual file. Directories have a "/"
// appended. The error number returned is 255 on error, 0 if the file
// was an alias, or 1 if the argument given was not an alias
//
@njm2112
njm2112 / chrome_tabs.osa
Created April 21, 2019 16:01 — forked from samyk/chrome_tabs.osa
applescript to show all url+titles of Chrome tabs along with front window+tab url+title
# shows all url+titles of Chrome along with front window+tab url+title
set titleString to ""
tell application "Google Chrome"
set window_list to every window # get the windows
repeat with the_window in window_list # for every window
set tab_list to every tab in the_window # get the tabs
repeat with the_tab in tab_list # for every tab
@njm2112
njm2112 / jQueryWordcountStyle.html
Created June 18, 2019 03:23 — forked from dansheffler/jQueryWordcountStyle.html
Style Blockquotes based on Wordcount
<script src="/js/jquery-1.8.3.min.js"></script>
// A little clever jQuery styling of blockquotes
<script>
$('blockquote p').each(function(){
var $numWords = $(this).text().split(" ").length;
console.log($numWords)
@njm2112
njm2112 / USAGE.md
Created July 22, 2022 19:24 — forked from mterwill/USAGE.md
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here