I hereby claim:
- I am craigmbooth on github.
- I am craigmbooth (https://keybase.io/craigmbooth) on keybase.
- I have a public key ASBj1u_Cb-yjBoBbodMIUghLVapJTHrSKpGYYspDThh2kgo
To claim this, I am signing this object:
#!/bin/bash | |
# Script that switches on and off the keyboard light on my Thinkpad | |
backlight_set() { | |
value="$1" | |
dbus-send --type=method_call --print-reply=literal --system \ | |
--dest='org.freedesktop.UPower' \ | |
'/org/freedesktop/UPower/KbdBacklight' \ | |
'org.freedesktop.UPower.KbdBacklight.SetBrightness' \ | |
"int32:${value}}" |
#!/bin/bash | |
# Usage: change_brightness <device_name> (+/-) | |
# I use this in my i3 config to allow the brightness buttons to work on my Thinkpad | |
set -e | |
get_display_info() { | |
local device=$1 | |
local key=$2 | |
echo $(xrandr --verbose | grep -m 1 -w "$device connected" -A8 | \ |
I hereby claim:
To claim this, I am signing this object:
"""CIDR blocks share the first part of the bit sequence that comprises the | |
binary representation of the IP address | |
We determine the network portion of the address by applying a bitwise AND | |
operation to between the address and the netmask. A bitwise AND operation will | |
basically save the networking portion of the address and discard the host | |
portion. | |
In the CIDR notation 192.0.1.0/24, the prefix is 192.0.1.0, and the total number | |
of bits in the address is 24. The least significant 8 bits are the IP addresses |
"""I wanted a screensaver of Robert Montgomery poems. This script pulls | |
them from the gallery on his website | |
""" | |
import os | |
import sys | |
from bs4 import BeautifulSoup | |
import requests | |
if __name__ == "__main__": |
number | full_name | position | height_in_inches | weight_in_lbs | date_of_birth | team | |
---|---|---|---|---|---|---|---|
23 | Alford, Robert | CB | 70 | 186 | 11/1/1988 | ATL | |
95 | Babineaux, Jonathan | DT | 74 | 300 | 10/12/1981 | ATL | |
72 | Baker, Sam | T | 77 | 301 | 5/30/1985 | ATL | |
59 | Bartu, Joplo | OLB | 74 | 230 | 10/3/1990 | ATL | |
71 | Biermann, Kroy | OLB | 75 | 255 | 9/12/1985 | ATL | |
63 | Blalock, Justin | G | 76 | 326 | 12/20/1983 | ATL | |
5 | Bosher, Matt | P | 72 | 208 | 10/18/1987 | ATL | |
3 | Bryant, Matt | K | 69 | 203 | 5/29/1975 | ATL | |
51 | Chaney, Jamar | LB | 72 | 242 | 10/11/1986 | ATL |
########################################################################## | |
# _ | |
# | |_ _ __ ___ _ ___ __ | |
# | __| '_ ` _ \| | | \ \/ / | |
# | |_| | | | | | |_| |> < | |
# . \__|_| |_| |_|\__,_/_/\_\.conf | |
# | |
########################################################################## | |
#C-o doesn't conflict with too much in Emacs | |
unbind-key C-b |
ATL - Atlanta - FALCONS | |
BUF - Buffalo - BILLS | |
CHI - Chicago - BEARS | |
CIN - Cincinnati - BENGALS | |
CLE - Cleveland - BROWNS | |
BAL - Baltimore - RAVENS | |
DAL - Dallas - COWBOYS | |
DEN - Denver - BRONCOS | |
DET - Detroit - LIONS | |
GB - Green Bay - PACKERS |
-- Join columns to rows, group by rows and columns, then filter to get the cell you want. | |
SELECT A.row_num, B.col_num, SUM(A.value*B.value) | |
FROM A,B | |
WHERE A.col_num=B.row_num | |
GROUP BY A.row_num, B.col_num; |