Skip to content

Instantly share code, notes, and snippets.

@dbb
dbb / 00fomex3.markdown
Last active August 29, 2015 14:06
607 FOM Exam 3 practice tests
@dbb
dbb / Disks.markdown
Last active August 29, 2015 14:05
Persephone configs/sys info (sid 2014)

fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
@dbb
dbb / gist:97d21c0ee26173805758
Created June 12, 2014 22:33
attr-skill.html
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link rel=File-List href="Book2_files/filelist.xml">
<link rel=Edit-Time-Data href="Book2_files/editdata.mso">
sda1 boot
sda2 root
sda3 home reiserfs
sda4 extended
sda5 swap
sda6 var reiserfs
sda7 data
@dbb
dbb / gist:edfc0a216d8d7c4ba172
Last active August 29, 2015 14:01
Git website notes

Problem 1: couldn't use the host defined in my ~/.ssh/config. Had to be explicit path to server including port.

Problem 2: git-receive-pack wasn't in $PATH on my server. This was fixed with:

git config remote.web.receivepack /usr/local/cpanel/3rdparty/bin/git-receive-pack

with origin as the default GitHub remote, and web the host server.

Problem 3: "refusing to update checked out branch". This is fixed by pushing to a bare repo on the server, then creating a post receive hook to check out the branch with your site's root as the work tree, detailed here: http://toroid.org/ams/git-website-howto

Out of curiosity, does anyone know why they decided to use capital letters in directory names?
I suppose camel case makes sense for readability with multi-word names, but to me it would also be kind of a pain on the command line. I see myself constantly typing, for instance, /pro<TAB> only to have zsh's correction ask me if I meant Programs.
Whenever I create directories, I always try to use digits and lowercase letters *only*, unless it's absolutely necessary. I think this habit was ingrained in me by TLDP or something similar when I first started using Linux.
#!/usr/bin/env zsh
# Options ###################################################################
cp_options='-iv'
editor="$EDITOR"
push_options="-u origin master"
commit_message="Update $gitfile"
# End Options ###############################################################
@dbb
dbb / gist:9928612
Last active August 29, 2015 13:58

I was using pscp (PuTTY scp) to copy a tar backup from a Windows machine to a Linux one. I wanted to check on the progress periodically, but didn't want a scrolling wall of text (which is distracting when you're trying to play Skyrim on another display) and didn't want to have to keep running a command over and over (having to take your hands off the controller is also annoying).

This is the best I could come up with for the time being:

for i in {1..10000}; do
    clear; 
    print $( du -hs /data/dbb_persephone_20140401.tar ); 
    sleep 10s; 
done
@dbb
dbb / rockefeller.md
Last active December 28, 2015 15:19
Jay Rockefeller's official response on NSA spying (emphasis added)

Thread-Topic: Letter from Senator Jay Rockefeller From: "Senator Jay Rockefeller" [email protected] To: <> Subject: Letter from Senator Jay Rockefeller Date: Tue, 12 Nov 2013 17:56:05 -0500 Message-ID: <@senate.ussenate.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=NextPart_000" X-Mailer: Microsoft CDO for Windows 2000