- To provide clarity and guidance to product teams around the formatting of SQL statements and Stored Procedures in PostgreSQL databases
- To provide a common language for discussion of related topics
This gist contains an instruction to configure SwiftBar and launchd to show a network interface indicator on the macOS menu bar. This allows you to tell when an ethernet connection is used over a wireless connection (a feature that is not provided by macOS).
First, put the files attached below in the following locations:
network-interface.shin your SwiftBar plugin folder (e.g.,~/.swiftbar_plugins/network-interface.sh(change the permission octal to755).org.jazali.network-listener.plistin/Library/LaunchAgents/org.jazali.network-listener.plist(change the permisson octal to600).refresh_swiftbar_network_interface.shin the directory where you put your scripts; e.g.,~/scripts/refresh_swiftbar_network_interface.sh(change the permission octal to755).
Note that you can change the identifier org.jazali into any unique identifier you desire, such as com.user. Also, the icons in network-interface.sh are SF Symbols icons, which should b
| // | |
| // FreeSpaceViewController.swift | |
| // Free Space | |
| // | |
| // Created by Kyle Howells on 04/05/2022. | |
| // | |
| import UIKit | |
| class FreeSpaceViewController: UIViewController { |
| // ==UserScript== | |
| // @name Admiral AntiAdblock Killer | |
| // @version 0.3 | |
| // @description Admiral AntiAdblock Killer | |
| // @author Zekfad | |
| // @match https://*/* | |
| // @match http://*/* | |
| // @grant none | |
| // @updateURL https://gist.github.com/Zekfad/ed4f846bd51c8aff41f2cdaad24b21dd/raw/Admiral-AntiAdblock-Killer.user.js | |
| // ==/UserScript== |
| # MIT No Attribution | |
| # | |
| # Copyright 2022 Ben Kehoe | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| # software and associated documentation files (the "Software"), to deal in the Software | |
| # without restriction, including without limitation the rights to use, copy, modify, | |
| # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| # permit persons to whom the Software is furnished to do so. | |
| # |
| public class LookasideCache { | |
| private CacheCluster cacheCluster; | |
| private LeaseUtils leaseUtils; | |
| /** | |
| * Read a value utilizing a lookaside cache. | |
| * | |
| * @param key whose value is to be returned | |
| * @param sourceOfTruthComputation the function to use to fetch the value from the | |
| * source of truth if that should become necessary. |
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
The Zoom install package for macOS is mad. Rather than actually using the installer to install things, it does everything in the preinstall script. That's bonkers, and also means that the system won't have a list of the files it installed, because it's doing it using shell script.
The script appears to install two items, namely:
/Applications/zoom.us.app
~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin
If the user opening the package isn't an administrator, it looks like it will install the app in the user's home folder instead. If they are an administrator, Zoom will delete the ZoomUsPlugIn.plugin from /Library if it's there, but it still installs to ~/Library.
It also adds Zoom to your Dock automatically, without asking.
| #!/bin/bash | |
| # Fork of CHOCK's original tot.sh to add support for dot "0" to target | |
| # the first empty dot. | |
| # https://gist.github.com/chockenberry/d33ef5b6e6da4a3e4aa9b07b093d3c23 | |
| # | |
| # 2 Mar 2020 | |
| # + Incorporated suggestions from ShellCheck (https://www.shellcheck.net). | |
| # Thanks to Ramsey Dow. | |
| # + Changed call to `python` to `/usr/bin/python` to get Python 2, avoiding |
| #!/bin/sh | |
| basename=`basename $0` | |
| if [ -z "$*" ]; then | |
| echo "usage: ${basename} <dot> [ -o | -r | <file> | - ]" | |
| echo "" | |
| echo "options:" | |
| echo " -o open dot in window with keyboard focus" | |
| echo " -r read contents of dot" |