Skip to content

Instantly share code, notes, and snippets.

View kenanigans's full-sized avatar

Kenneth Dait kenanigans

View GitHub Profile
@kenanigans
kenanigans / .bashrc
Created June 5, 2016 14:01
Bash Shell Configuration (~/.bashrc) – 20150605
PATH="/usr/local/sbin:$PATH"
echo -n "Uptime: "; uptime
echo ""
PS1="[\W] \u >"
MYNAME='Kenneth Dait'
export MYNAME
export LESS='-R'
@kenanigans
kenanigans / .bash_profile
Last active June 5, 2016 14:04
Bash Shell Configuration (~/.bash_profile) – 20150605
#This loads in the configuration in ~/.bashrc
#Store all configuration in ~/.bashrc
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
@kenanigans
kenanigans / morningCoffee
Created June 2, 2016 00:05
A batch script file (plus a supplemental VB script) that opens all of the apps we use at work at the beginning of each shift.
@echo off
rem THIS LINE OPENS MULTIPLE INTERNET EXPLORER LINKS (IN TABS), USING A SEPARATE VB SCRIPT
cscript //nologo ie_tabs.vbs
rem OPEN AGENT AND RESOURCE MANAGER
start "" "C:\Program Files (x86)\Syntellect\Agent\agent.exe"
start "" "C:\Program Files (x86)\Syntellect\RsrcMgr\resman.exe"
@kenanigans
kenanigans / sys_info Geeklet
Last active June 1, 2016 05:29
GeekTool Geeklet for System Info (using iStats)
#!/bin/bash
#Find time since last boot.
then=$(sysctl kern.boottime | awk '{print $5}' | sed "s/,//") now=$(date +%s) diff=$(($now-$then))
#Convert time to human readable stuff.
days=$(($diff/86400)) diff=$(($diff-($days*86400))) hours=$(($diff/3600)) diff=$(($diff-($hours*3600))) minutes=$(($diff/60))
#Find current bandwith in each pipe
var1=$(netstat -bI en0 | awk "/en0/"'{print $7;exit}')
--direct access to keyboard shortcuts in system preferences
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.keyboard"
reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
--get properties of anchors of pane id "com.apple.preference.keyboard"
delay 1
tell application "System Events"
key code 48
key code 48
--direct access to keyboard shortcuts in system preferences
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.keyboard"
reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
--get properties of anchors of pane id "com.apple.preference.keyboard"
delay 2
tell application "System Events"
key code 48
key code 48
--access default resolution option
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.displays"
delay 1
tell application "System Events"
key code 48
key code 48
key code 125
key code 48
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.displays"
delay 1
tell application "System Events"
key code 48
key code 48
key code 48
key code 48
key code 48
Option Explicit
Const navOpenInNewWindow = &h1
Const navOpenInNewTab = &h800
Const navOpenInBackgroundTab = &h1000
Dim intLoop : intLoop = 0
Dim intArrUBound : intArrUBound = 0
Dim navFlags : navFlags = navOpenInBackgroundTab
@echo off
cscript //nologo open_mult_tabs.vbs
start "C:\Program Files (x86)\Microsoft Office\Office14\ONENOTE.EXE" "G:\Patient_Throughput\~Departments\Transfer Center and Bed Board\Open Notebook.onetoc2" "G:\Patient_Throughput\~Departments\Transfer Center and Bed Board\Open Notebook.onetoc2"
start "" "C:\Program Files\Healthware Systems\ActiveDASHBOARD\Dashboard.exe"
start "" "C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE"
start chrome https://console.inquicker.com/ascensionhealth