Other articles
The `-o` option to `grep`
I don't know how I made it this long in my technical career without knowing about the
read more-o
option togrep
, which prints only the part of the line that matches the regular expression, not the entire line. I have spent way too much time post-processing the results withsed …
Exploring Sqlite databases
Some common commands for exploring sqlite databases
read moreRebase warning when running `brew update`
What to do when Homebrew warns that you're in the middle of a rebase.
read moreThe `date` command
Common usages for the
read moredate
commandCareful with those Backslashes!
Brainteaser of the day
Given a MySQL database, what value will be put in the database for each of the following Python statements?
read more# normal string, 4 backslashes db.execute( "INSERT INTO `test` (`text`) VALUES ('x\\\\y');") # raw string, 2 backslashes db.execute(r"INSERT INTO `test` (`text`) VALUES ('x\\y …
ssh-keygen
I always forget the exact syntax and options I need for this. I don't create new keys frequently enough to remember without looking up what to run each time.
The command
ssh-keygen -t rsa -b 2048
[Source: Security StackExchange]
read moreRun Wireshark as non-root user
I frequently get frustrated when Wireshark won't run as a non-root user due to permissions on the dumpcap process. Here's the fix:
read moresudo groupadd wireshark sudo usermod -a -G wireshark $USER sudo chgrp wireshark /usr/bin/dumpcap sudo chmod 754 /usr/bin/dumpcap sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr …
Ubuntu Default Folders
I recently switched my primary machine from Windows 7 to Ubuntu. I'd always used an Ubuntu VM for development. Now I just have a Windows 7 VM for Windows-only applications, and do the majority of my work in Ubuntu. I'm fairly comfortable on the command line, but extremely dislike capital …
read more