Skip to content

Instantly share code, notes, and snippets.

View corysolovewicz's full-sized avatar

Cory Solovewicz corysolovewicz

View GitHub Profile
// ==UserScript==
// @name Alternating Clicks Script
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Clicks one element, waits 5 minutes, clicks another element, and repeats
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
############ gist usage instructions ############
# clone gist
# git clone https://gist.github.com/corysolovewicz/c1c8cf4394dc2988fcd9f23cd4a62a99.git
# cd c1c8cf4394dc2988fcd9f23cd4a62a99
# chmod 755 shairport-sync_install.sh
# ./shairport-sync_install.sh
#################################################
###############################################################
# Steps for building and installing shairport-sync on a raspi 3
@corysolovewicz
corysolovewicz / Restart_Wifi_Connection_on_macOS.md
Created February 5, 2020 06:18
Restart Wifi Connection macOS
# http://osxdaily.com/2011/05/31/enable-disable-airport-wireless-connections-command-line/
# Quickly restart wifi on macOS
networksetup -setairportpower airport off; networksetup -setairportpower airport on
@corysolovewicz
corysolovewicz / Build_OpenALPR.txt
Created December 20, 2019 00:30
Brew instructions for building OpenALPR on MacOS using opencv v3
brew install tesseract opencv@3 log4cplus
git clone https://github.com/openalpr/openalpr.git
cd openalpr/src
mkdir build
cd build
export OpenCV_DIR="/usr/local/opt/opencv@3/"
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_MACOSX_RPATH=true -DCMAKE_CXX_FLAGS="-std=c++11"
make
sudo make install
@corysolovewicz
corysolovewicz / CreateBootableISOfromMacOSCatalinaInstaller.sh
Created October 9, 2019 17:08
Create bootable ISO from macOS Catalina Installer
# https://support.apple.com/en-us/HT201372
# download macOS Catalina
# https://itunes.apple.com/us/app/macos-catalina/id1466841314?ls=1&mt=12
# create blank image and put in /tmp directory
hdiutil create -o /tmp/Catalina.cdr -size 7000m -layout SPUD -fs HFS+J
# mount blank image at install_build
hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
@corysolovewicz
corysolovewicz / Install_or_Update_shairport-sync.md
Last active September 23, 2019 05:20
Install or Update shairport-sync on raspbian
@corysolovewicz
corysolovewicz / connectvpn.sh
Last active September 6, 2019 19:02
macOS Mojave connect to vpn via commandline
#!/bin/bash
# Call with <script> "<VPN Connection Name>"
set -e
#set -x
vpn="$1"
echo "$vpn"
@corysolovewicz
corysolovewicz / .macos
Created August 21, 2019 20:05
Very useful macOS tweaks you can do via the command line
# copied from https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
@corysolovewicz
corysolovewicz / converting_dmg_iso.md
Created August 21, 2019 17:27
Converting DMG to ISO or CDR to ISO on macOS
@corysolovewicz
corysolovewicz / sha1_hash.sh
Created August 1, 2019 00:32
Get SHA1 hash of text using openssl command
# pipe text to openssl command
echo -n "<text>" | openssl sha1
# example using the word 'password' as text
echo -n "password" | openssl sha1
# (stdin)= 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
# check out https://hashes.org/hashlists.php