Skip to content

Instantly share code, notes, and snippets.

/* Overriding text highlight color */
.CodeMirror.CodeMirror.CodeMirror .CodeMirror-line::selection, .CodeMirror.CodeMirror.CodeMirror .CodeMirror-line > span::selection, .CodeMirror.CodeMirror.CodeMirror .CodeMirror-line > span > span::selection {
background: #f63f05 !important;
}
/* Fixes a display bug where the last few letters of a full-width line can't be seen */
.CodeMirror-lines {
/* width: 96% !important */
width: 96% !important;
awk 'match($0, /dvchost=\w+/ {k = split(substr($0, RSTART, RLENGTH), m, "="); i = m[2]; count[i]++; } END {for(x in count) print count[x],x]}' logfile
awk '!x[$4]++ {printf t $4} {t=", "}' logfile
awk '{count[$4]++}END{for(x in count) print count[x],x}' logfile
awk '$4 ~ /10.0.0.1/{last=$0} END {print last}' logfile
awk '{if (substr($0,length($0),1) !="}") { print $0 }}' logfile
awk '{print NR": "$0; for(i=1;i<=NF;++i)print "\t"i": "$i}' logfile
awk '{print substr($0, 0, 12)}' logfile | uniq -c | sort -nr | awk '{printf("\n%s ",$0); for (i=0;i<$1; i++) {printf("*")};}'
(* This AppleScript will resize the current application window to the height specified below and center it in the screen. Compiled with code from Natanial Wools and Amit Agarwal *)
set the_application to (path to frontmost application as Unicode text)
set appHeight to 1080
set appWidth to 1920
tell application "Finder"
set screenResolution to bounds of window of desktop
end tell

Keybase proof

I hereby claim:

  • I am kristophercrawford on github.
  • I am kcrawford (https://keybase.io/kcrawford) on keybase.
  • I have a public key whose fingerprint is 0CAD 3CA5 72CF 5F14 F89A 5C1B 7B9C 06C3 9390 6334

To claim this, I am signing this object: