Skip to content

Instantly share code, notes, and snippets.

View Cloudxtreme's full-sized avatar

Kevin Hatfield Cloudxtreme

  • CloudCDN
View GitHub Profile
set -g default-terminal "rxvt-256color"
set -g status-right '%H:%M'
set -g status-left ''
set -g renumber-windows on
set -g automatic-rename on
set-option -g -q mouse on
set -g default-command "reattach-to-user-namespace -l bash"
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@Cloudxtreme
Cloudxtreme / Kwm: binds
Created June 2, 2016 01:28
Kwm related scripts
/* create variables */
define MODE_MANAGER BindingModeSwitcher
define YTD_MODE BindingModeYtd
define SWAP_MODE BindingModeSwap
define TREE_MODE BindingModeTree
define SPACE_MODE BindingModeSpace
define ytc /usr/local/bin/ytc
define ~ /Users/Koe
define terminal open -na /Applications/iTerm2.app
@Cloudxtreme
Cloudxtreme / move&focus
Created June 2, 2016 01:28
Move the focused window to a new space and give it focus
kwmc=/usr/local/bin/kwmc
dir=$1
if [ "$dir" = "previous" ]
then
dir=$(kwmc query space previous)
$kwmc window -m space previous
else
$kwmc window -m space $dir
fi
sleep 0.25
@Cloudxtreme
Cloudxtreme / ard-pub-cmd.sh
Created June 1, 2016 22:15 — forked from gjpalau/ard-pub-cmd.sh
ard commands for public setup
dscl . create /Users/Public
dscl . create /Users/Public UserShell /bin/bash
dscl . create /Users/Public RealName "Public User"
dscl . create /Users/Public UniqueID 503
dscl . create /Users/Public PrimaryGroupID 1000
dscl . create /Users/Public NFSHomeDirectory /Users/Public
dscl . passwd /Users/Public Public
@Cloudxtreme
Cloudxtreme / TurnOnSSHAddAdminGroup.sh
Created June 1, 2016 22:14 — forked from gjpalau/TurnOnSSHAddAdminGroup.sh
Script that activates ARD to use a specific user with specific access, and turns on SSH.
#!/bin/bash
# TurnOnSSHAddAdminGroup.sh
#
# Turn on remote login ## Create the com.apple.access_ssh group ## Add the admin group to com.apple.access_ssh ## unload and load the SSH Service
sudo systemsetup -setremotelogin on && dseditgroup -o create -q com.apple.access_ssh && dseditgroup -o edit -a admin -t group com.apple.access_ssh && sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist && sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -specifiedUsers && sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -users nameofadmin -activate -access -on -privs -all -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw p@55w0rd -quiet
/usr/libexec/PlistBuddy -c ‘Set :com.apple.screensharing:Disabled NO’ /private/var/db/launchd.db/com.apple.launchd/overrides.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.site.steguestlogin</string>
<key>ProgramArguments</key>
<array>
<string>Users/Shared/Scripts/SteGuestlogin.sh</string>
</array>
#!/bin/bash
AIRPORT="en1"
USER="$USER"
if [ "$USER" = Public ]; then
networksetup -removeallpreferredwirelessnetworks
ifconfig en0 down
networksetup -setairportpower en1 on
echo "Airport is now turned on."
networksetup -addpreferredwirelessnetworkatindex en1 STE-Guest 0 OPEN
echo "You are now connected to the STE-Guest Network."
#!/bin/bash
AIRPORT="en1"
USER="$USER"
if [ "$USER" = Public ]; then
networksetup -removeallpreferredwirelessnetworks
ifconfig en0 up
echo "Ethernet is now turned on"
networksetup -setairportpower en1 off
echo "Airport is now turned off."
exit 0
@Cloudxtreme
Cloudxtreme / nfs-automount.sh
Created June 1, 2016 22:13 — forked from gjpalau/nfs-automount.sh
nfs mount script
#!/bin/sh
# NFS Auto-Mount for Mavericks/Yosemite
# Scripted by Gilbert Palau
# November 2014 v1.0
#
FILE_DATE=`date +%Y%m%d`
if [ -f /etc/auto_master ]; then
sudo mv /etc/auto_master /etc/auto_master_backup-$FILE_DATE
fi