This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
collar=myCollarId # replace this! | |
days=1 | |
charging=no | |
if [[ $1 = "gsm" ]]; then | |
script="db_output_gsm.php" | |
else | |
script="db_output.php" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://lucene.apache.org/solr/guide/7_5/making-and-restoring-backups.html explains that | |
# SolrCloud Backup/Restore requires a shared file system mounted at the same path on all nodes. | |
# | |
# This script uses the old Solr Backup/Restore procedure, which is useful if you don't have | |
# access to a shared disk. | |
# | |
# Requires that the target collection is already set up, with identical number of shards/replicas. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void disableCertificateValidation() { | |
// Create a trust manager that does not validate certificate chains | |
TrustManager[] trustAllCerts = new TrustManager[] { | |
new X509TrustManager() { | |
public X509Certificate[] getAcceptedIssuers() { | |
return new X509Certificate[0]; | |
} | |
public void checkClientTrusted(X509Certificate[] certs, String authType) {} | |
public void checkServerTrusted(X509Certificate[] certs, String authType) {} | |
}}; |
Scuba tank size and buoyancy calculator, hosted at https://henrik.synth.no/scuba/tanks.html
- Install software
brew install yabai
brew install displayplacer
- Create hotkey
- Use Automator --> Quick Action --> Library --> Utilities --> Run Shell Script
- Set Workflow recieves: no input and Shell: /bin/bash
- Add script and save
- Assign shortcut in System preferences --> Keyboard --> Shortcuts -> Services -> General
- Install Shpotify:
brew install shpotify
- Unzip spotify-workflows.zip into
$HOME/Library/Services/
- Go to System Preferences -> Keyboard -> Shortcuts -> Services -> General
- Set hotkeys for each of your actions (I use control-cmd-option plus arrow keys or P)
You're done!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/P4Merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 3 ]; then | |
echo "Usage: maven-deploy-file groupId artifactId version [packaging] [repository]" | |
exit 1 | |
fi | |
GROUP=$1 | |
ARTIFACT=$2 | |
VERSION=$3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Make this file executable with `chmod +x run-script-in-background.command`, and add it to | |
# System Preferences --> Users and Groups --> Startup Items. It needs to have the `.command` suffix. | |
# | |
tmux new-session -d -s ostepop \; send -t ostepop.0 "echo Let\'s do this\!; echo More stuff." ENTER |