Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
#!/bin/bash
# Original: https://jamfnation.jamfsoftware.com/discussion.html?id=14467
# Useful script for deploying printers in a Casper Environment
# Originally by Lwindram on JAMF Nation forums
# https://jamfnation.jamfsoftware.com/viewProfile.html?userID=11026
# Edited to use JSS Script Parameters to make the script portable to all Models. Define $vars in JSS Policy.
# Variables

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
//#define WITH_DEBUG_CONSOLE
#ifndef UNICODE
# define UNICODE
#endif
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
; Remap Super key to CTRL
LWIN::Ctrl
RWin::Ctrl
Ctrl::LWIN
; Remap Virtual Desktop keys
^Right::^#Right
^Left::^#Left
^Tab::Send #{Tab}
@pythoninthegrass
pythoninthegrass / gitkraken.sh
Created August 9, 2016 09:28
Install GitKraken on Fedora 24
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken
tar -xvzf gitkraken-amd64.tar.gz
# Move the Kraken
# Finally able to keep a main configuration that transfers across computers.
@pythoninthegrass
pythoninthegrass / Documentation.md
Created September 6, 2016 23:49 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@pythoninthegrass
pythoninthegrass / Rsync Backup to Network Share on OS X
Created October 3, 2016 16:36
Painfully constructed rsync switches and exclusions to backup to an SMB share from a local drive.
# SMB Mounted in /Volumes
## Rsync to \\network-share
rsync -aPW -r --progress --exclude='.DocumentRevisio*' --exclude='.Spotlight*' /Volumes/Mac/Backups.backupdb /Volumes/Time-Machine-Backups/
## Copy to external HDD
rsync -aPW -r --progress --exclude='.DocumentRevisio*' --exclude='.Spotlight*' /Volumes/My\ Passport /Volumes/Mac/
## Verify transfer
diff <( tree /Volumes/My\ Passport/ ) <( tree /Volumes/Mac )
@pythoninthegrass
pythoninthegrass / cask_gist.txt
Last active May 2, 2020 18:17 — forked from jitendravyas/gist:8d35b092dd9102a05ea3
Brew Cask installation with Laptop script
#!/bin/sh
# homebrew taps
brew tap caskroom/cask
brew tap caskroom/versions
brew tap homebrew/boneyard
brew tap caskroom/fonts
# Updated grep
#!/bin/bash
# ¯\_(ツ)_/¯
REMOVE_PATHS=( "/Applications/Microsoft Office 2011/" \
"/Library/Preferences/com.microsoft.office.licensing.plist" \
"/Library/LaunchDaemons/com.microsoft.office.licensing.helper.plist" \
"/Library/PrivlegedHelperTools/com.microsoft.office.licensing.helper" \
#"/Users/*/Library/Application Support/Microsoft/Office/" \
#"/Users/*/Library/Preferences/com.microsoft*" \
#"/Users/*/Library/Preferences/ByHost/com.microsoft*" \