This file contains hidden or 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
# you can add these as needed | |
alias ping_test_xyz="while true ; do echo -n \"\`date | tr -d '\n'\` \" ; ping -c 1 -A xyz | head -n 2 | tail -n 1 ; sleep 1 ; done" | |
# if you are running on macOS the following can be useful | |
ping --apple-time xyz |
This file contains hidden or 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
# macOS xargs has no -d (delimiter) option. But you can use BASH to do something similar : | |
cat myfile.txt | grep \n | while read -r line ; do echo "$line"; done |
This file contains hidden or 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
# This lines below are able to be placed into a script and then used to allow switching a system to a specific network interface at a specific time | |
# If you are looking to have this as an alias then visit this page : http://henri.shustak.org/github/handy-alias/ | |
# | |
priority_interface_name="name_of_interface_to_prioritize" | |
echo sudo /usr/sbin/networksetup -ordernetworkservices \\\"${priority_interface_name}\\\" `/usr/sbin/networksetup -listallnetworkservices | grep -v 'An asterisk ' | sed s/\^'*'// | grep -xv "${priority_interface_name}" | sed 's/.*/\"&\"/' | tr '\n' ' ' | sed 's/.$//' | sed 's/\"/\\\\\"/g'` | tr -d "\\" | bash | |
exit 0 |
This file contains hidden or 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
# hfs+ conversion notes | |
# 1. df -h (find the disk partition information | |
# 2. diskutil cs convert <disk0s2> -passphrase <my_super_secret_passphrase> | |
# 3. diskutil cs list | grep -i progress |
This file contains hidden or 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
# One approach to the transfer of entire calendars or even multiple calendars | |
# between iOS devices (or from an iOS device to another device using an .ics file) | |
# is to backup the iOS device using iMazing <https://imazing.com>, then click on | |
# the calendar and select the calendar(s) and events to export, then select export. | |
# You will now have an .ics file which will be able to be imported into almost | |
# any modern calendar system. | |
# | |
# I like using Calanders 5 <https://readdle.com/calendars5> it is a nice iOS | |
# Calnders App. I origionally started using because it would show multi | |
# day events as a line over those days which the built in iOS calander app |
This file contains hidden or 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
# Approach 1 | |
sudo nvram StartupMute=%00 | |
# Approach 2 | |
sudo nvram -d StartupMute |
This file contains hidden or 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 ruby | |
# Copyright, All Rights Reserved Henri Shustak 2020 | |
# Released under the GNU/GPL v3 or later licence | |
# | |
# requirements: | |
# - node.js - for hueadm - just install via package macnageer - eg brew.sh | |
# - hueadm - https://github.com/bahamas10/hueadm | |
# - datezone - http://www.fresse.org/dateutils/#datezone | |
# |
This file contains hidden or 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 | |
# | |
# RELEASED UNDER MIT LICENCE : https://mit-license.org | |
# Copyright Allrights Reserved 2020, Henri Shustak | |
# This Script Works With the PushOver <http://pushover.net> service and is capable of sending notifcations to your phone. | |
# | |
# Usage: ./pushover.bash message title url url_title priority device' | |
# | |
# Example: ./pushover.sh "this is a test" "test title" "http://mylink.com" "my url title" 0 "iPhone"' | |
# Note: All parameters except message are optional' |
This file contains hidden or 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/ruby | |
# | |
# RELEASED UNDER MIT LICENCE : https://mit-license.org | |
# Copyright Allrights Reserved 2020, Henri Shustak | |
# | |
# This is a script which is designed to be called to pull barcode data from a webserver. This specifically relates to QRBot iOS App. | |
# This is great if you use mobile phones or other barcode scannning devices to feed barcodes to a centalised webserver | |
# | |
# Released under MIT Licence | |
# |
This file contains hidden or 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/sbin/ioreg -c IOPlatformExpertDevice | grep IOPlatformSerialNumber | tr -d "\"" | awk -F " = " '{print $2}' |