I hereby claim:
- I am cdosborn on github.
- I am cdosborn (https://keybase.io/cdosborn) on keybase.
- I have a public key whose fingerprint is 984F 20A7 9F62 E06E FC94 4BB7 3894 82F7 C056 4A76
To claim this, I am signing this object:
| A story to motivate/understand the Address Resolution Protocol (ARP). | |
| | |
| Connor Osborn | |
| 04/09/16 | |
So you want to send a packet to your friend on your local ethernet. They are | |
blah.coolsite.org and you use DNS to find out which internet address maps to | |
that name. It's 1.2.3.4, ho-okay. You're fillin out this packet according to | |
the Internet Protocol (IP). You throw in you're address, their address, blah | |
blah some more bits. This packet is going over ethernet so you have to wrap |
diff --git a/config.mk b/config.mk | |
index 81e3e47..8f2352a 100644 | |
--- a/config.mk | |
+++ b/config.mk | |
@@ -14,7 +14,7 @@ X11LIB = /usr/X11R6/lib | |
INCS = -I. -I/usr/include -I${X11INC} \ | |
`pkg-config --cflags fontconfig` \ | |
`pkg-config --cflags freetype2` | |
-LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXft \ | |
+LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lX11 -lutil -lXft \ |
I hereby claim:
To claim this, I am signing this object:
#! /bin/bash | |
# Truncate to last 100 lines of each file. | |
# logtrunc file1 file2 file3 | |
# Truncate to last 50 lines of each file. | |
# logtrunc -n 50 file1 file2 file3 | |
# WARNING * WARNING * WARNING | |
# This script is not highly tested |
curl -L -O http://www.nano-editor.org/dist/v2.4/NT/nano-2.4.2.zip | |
unzip -d nano-temp *nano*.zip | |
mkdir ~/bin &> /dev/null | |
cp -r nano-temp/nano*/* ~/bin | |
rm -r ~/bin/nano/ |
| Alter your firefox | |
| | |
| Connor Osborn | |
| 07/05/15 | |
Firefox supports users customizing the gui beyond what you might imagine. With | |
a little snooping around, you can implement a pretty unique interface. For my | |
interests I wanted to clean up my tab bar (see gif below). Here are the steps to begin | |
customizing. |
| Solutions from https://github.com/jpalardy/Command-line-one-liner-challenges | |
| | |
| Connor Osborn | |
| 06/25/15 | |
Number 12 is gone, because I thought the challenge was lame (and I like | |
unicode.) | |
1) gawk '{ wow[$1] += 1;} END { for (key in wow) print key, wow[key]; }' < $1 | |
2) gawk '{ wow[$1] += 1;} END { for (key in wow) print key, wow[key]; }' < $1 |
| Musings on the Monty Hall problem | |
| | |
| Connor Osborn | |
| 06/20/15 | |
The problem: | |
Suppose you're on a game show, and you're given the choice of three doors: | |
Behind one door is a car; behind the others, goats. You pick a door, say No. 1, | |
and the host, who knows what's behind the doors, opens another door, say No. 3, |
# Big ideas | |
# | |
# - 2 types of shell tools | |
# - Compute (ls, rm, find, grep, vim ..) | |
# - Format (sort, tail, cut, uniq, sed, ..) | |
# - awk is the ultimate formatting tool | |
# - a complete prog lang for text processing | |
# - handle state on the cmd line | |
# - 2 major datatypes |
#!/usr/local/bin/gawk -f | |
BEGIN { | |
for (i in ARGV) { | |
if (ARGV[i] == "--sep") { | |
sep = ARGV[i + 1]; | |
"echo \'" sep "\'" | getline sep | |
} | |
ARGV[i] = ""; | |
} |