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:
| 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, |
| 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 |
| 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. |
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/ |
#! /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 |
I hereby claim:
To claim this, I am signing this object:
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 \ |
| 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 |
# | |
# ve NAME creates and activates venv | |
# ve wipe remove and deactivate current venv | |
# ve wipe NAME... remove multiple venvs | |
# ve list print all venvs | |
# | |
function ve { | |
local VE_DIR="$HOME/.ve" | |
if [ ! -x "$(which virtualenv)" ]; then |
> from core.models import Application | |
> from django.db.models import Q | |
> test = Q(tags__name__startswith='a') | |
> # Below are two queries that are appear to be the same but are /very/ different | |
> print Application.objects.filter(test).filter(test).filter(test).query | |
SELECT * | |
FROM "application" | |
INNER JOIN "application_tags" ON ( "application"."id" = " application_tags"."application_id") | |
INNER JOIN "tag" ON ("application_tags"."tag_id" = "tag"."id") |