$mod
refers to the modifier key (alt by default)
startx i3
start i3 from command line$mod+<Enter>
open a terminal$mod+d
open dmenu (text based program launcher)$mod+r
resize mode ( or to leave resize mode)$mod+shift+e
exit i3
#!/bin/bash | |
# | |
# This removes lines containing passwordAsUTF8String in /var/log/secure.log* | |
templog=`mktemp -t securelog` | |
for logfile in /var/log/secure.log*; do | |
echo "Filtering passwords from $logfile" | |
if [ ${logfile##*.} == "bz2" ]; then |
#!/bin/bash | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |
######################################################################################## | |
### Fish Custom Overrides | |
### Creates a shell prompt in the form of: | |
### | |
### ----------------------------------------------------------------------- 11:56:05 | |
### kevin@kross /S/L/F/C/V/A/F/L/V/A/Support > | |
######################################################################################## | |
set --global fish_prompt_username_color 555555 |
<?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.company.xprotect_re-enable_adobe_flash</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>/Library/Scripts/xprotect_re-enable_adobe_flash.sh</string> |
#!/bin/bash | |
# AccountRenamer.command | |
# | |
# Interactive tool to rename an account from one name to another (like when a teacher gets renamed and their e account changes) | |
# | |
# HISTORY: | |
# | |
# 1.0 2013-03-25 bmp - initial release |
Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.
The original author seems to be Charles Edge, here's the original content, as pointed out by @percisely.
Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s
#!/bin/bash | |
# Cache sudo password | |
sudo -v | |
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/ | |
# v1.1.0 seems to have removed SSLv2/3 support | |
openssl_version=1.0.2k | |
# Install build dependencies |
FROM alpine:latest | |
RUN apk add --update php python py-pip mysql-client \ | |
&& pip install awscli \ | |
&& rm -rf /var/cache/apk/* | |
RUN touch crontab.tmp \ | |
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \ | |
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \ | |
&& crontab crontab.tmp \ |
#!/usr/bin/env ruby | |
# Usage: no_automount /Volumes/My\ Disk | |
diskinfo = `diskutil info '#{ARGV[0]}'`.gsub("\n\n", "\n").split("\n").collect { |b| | |
b.strip.split(/:\s+/) | |
}.to_h | |
disk_uuid = diskinfo['Volume UUID'] | |
disk_type = diskinfo['Type (Bundle)'] |