Skip to content

Instantly share code, notes, and snippets.

@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
#!/usr/bin/env zsh
# Options ###################################################################
cp_options='-iv'
editor="$EDITOR"
push_options="-u origin master"
commit_message="Update $gitfile"
# End Options ###############################################################
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.
@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

sda1 boot
sda2 root
sda3 home reiserfs
sda4 extended
sda5 swap
sda6 var reiserfs
sda7 data
@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">
@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 / 00fomex3.markdown
Last active August 29, 2015 14:06
607 FOM Exam 3 practice tests
var data = {"lootVersion": "0.6.0", "masterlist": {"updaterEnabled": "Enabled", "revision": "35ed1ea8f", "date": "2014-10-14"}, "plugins": [{"name": "Skyrim.esm", "isActive": true, "crc": "C665FD56", "isDirty": false}, {"name": "Update.esm", "isActive": true, "crc": "E5B67BDA", "tagsAdd": ["C.Location", "Delev", "Invent", "Relev"], "isDirty": true, "messages": [{"type": "warn", "content": "Warning: Contains 92 ITM records and 3 UDR records. Clean with <a href=\"http://www.nexusmods.com/skyrim/mods/25859\">TES5Edit</a>."}]}, {"name": "Unofficial Skyrim Patch.esp", "isActive": true, "crc": "23BBAC1C", "version": "Version: 2.0.7", "tagsAdd": ["C.Acoustic", "C.Climate", "C.Encounter", "C.ImageSpace", "C.Light", "C.Location", "C.LTemplate", "C.Music", "C.Name", "C.Owner", "C.Water", "Delev", "Graphics", "Invent", "Names", "Relev", "Sound", "Stats"], "isDirty": false}, {"name": "Dawnguard.esm", "isActive": true, "crc": "BD72CCF3", "tagsAdd": ["C.Location", "Delev", "Graphics", "Invent", "Names", "Sound"], "isDirty"