Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@confluencepoint
confluencepoint / appinfo.md
Created December 20, 2021 10:37 — forked from ttscoff/appinfo.md
appinfo: A quick ruby script for Mac that returns some information for a specified Mac app in Terminal. Includes icon display if using imgcat or chafa are available.

appinfo

A script for getting details of installed Mac apps. Like Get Info but faster and cooler.

Save the script below as appinfo somewhere in your path. Make it executable with chmod a+x appinfo. Then just run appinfo APPNAME to get info on any installed app.

@confluencepoint
confluencepoint / init.lua
Created December 13, 2021 14:16 — forked from blalor/init.lua
Hammerspoon config for auto-typing passwords from the macOS Keychain
function password_from_keychain(service)
-- 'service' should be saved in the login keychain
local cmd = "/usr/bin/security 2>&1 >/dev/null find-generic-password -gs '" .. service .. "' | sed -En '/^password: / s,^password: \"(.*)\"$,\\1,p'"
local handle = io.popen(cmd)
local result = handle:read("*a")
handle:close()
return (result:gsub("^%s*(.-)%s*$", "%1"))
end
@confluencepoint
confluencepoint / init.lua
Last active December 13, 2021 13:59 — forked from amirrajan/init.lua
Full Hammerspoon File
require("hs.ipc")
function shell(command)
hs.execute(command .. ' &', true)
end
--- ==========================================
--- Terminal <> Browser ctrl+t
--- ==========================================
-- I spend all my time in chrome and terminal, ctrl+t swaps between the two
@confluencepoint
confluencepoint / mac-wipri.sh
Created December 8, 2021 13:19 — forked from mrpnelson/mac-wipri.sh
Mac WiFi Preferred Network Refresh Script
#!/bin/bash
# ------------------------------------------------------------------------------------------
# May 4, 2021 Update
# This is maintained here for reference, but it seems like the networksetup script
# is capable of doing this, at least in Big Sur. I haven't tested this on older versions.
# See https://gist.github.com/mrpnelson/c65302efed6c18300fb28c8da87bc69a#gistcomment-3731567
# for details on using the native tooling
# ------------------------------------------------------------------------------------------
@confluencepoint
confluencepoint / gist:4d47c587ab89309414fd9672e8c054f0
Created November 11, 2021 15:41 — forked from ctanis/gist:70a2ef077528e5a5c71f8d8473af3e5b
use hammerspoon to avoid triggering the menu bar, unless you hold alt
-- don't trigger menubar in fullscreen mode unless you hold alt
stopmenu=hs.eventtap.new({ hs.eventtap.event.types.mouseMoved }, function(e)
local flags=e:getFlags()
if not flags.alt then
if e:location().y<1 then
e:location().y=1
return e
end
end
return nil
@confluencepoint
confluencepoint / init.lua
Created October 24, 2021 10:46 — forked from RoyalIcing/init.lua
My Hammerspoon config
local math = require("hs.math")
currentSpeech = nil
mouseCircle = nil
mouseCircleTimer = nil
function mouseHighlight()
-- Delete an existing highlight if it exists
if mouseCircle then
@confluencepoint
confluencepoint / hammerspoon_config.lua
Created October 20, 2021 13:09 — forked from dropmeaword/hammerspoon_config.lua
My Hammerspoon configuration
-- Bring all Finder windows to front
function applicationWatcher(appName, eventType, appObject)
if (eventType == hs.application.watcher.activated) then
if (appName == "Finder") then
-- Bring all Finder windows forward when one gets activated
appObject:selectMenuItem({"Window", "Bring All to Front"})
end
end
end
local appWatcher = hs.application.watcher.new(applicationWatcher)
@confluencepoint
confluencepoint / QR-Code-Example
Created October 15, 2021 05:36 — forked from BPScott/QR-Code-Example
QR Code generation and instant preview from the command line
# Generating throwaway QR codes from the command line for shunting URLS to mobile devices
brew install qrencode
qrencode -o - http://www.google.com | open -f -a preview
@confluencepoint
confluencepoint / README.md
Created October 8, 2021 11:32 — forked from 343max/README.md
HammerSpoon script to toggle the mic in google meet meeting in chrome
  • get hammersponn: brew install --cask hammerspoon
  • drop the file into yout init.lua dir
  • import & bind in your init.lua:
local toggleGoogleMeetMic = require('google-meet-mic')
hs.hotkey.bind({"shift"}, "F16", toggleGoogleMeetMic)
@confluencepoint
confluencepoint / n26_ynab.py
Created September 29, 2021 08:07 — forked from dequis/n26_ynab.py
Script I use to send n26 transactions to YNAB. Not documented as it's not really intended to be used by anyone but me but good luck.
import requests
from n26.api import Api as N26Api
from datetime import datetime, timedelta
from pprint import pprint
ENABLE_YNAB = True
YNAB_TOKEN = '...'
BUDGET_ID = '...'
ACCOUNT_ID = '...'