Note: You are viewing an old version of this page. View the current version.

Differences between version 57 and previous revision of CyberLeo.

Other diffs: Previous Major Revision, Previous Author

Newer page: version 57 Last edited on Sunday, 11 December 2011 22:54:38 by CyberLeo Revert
Older page: version 56 Last edited on Saturday, 3 December 2011 22:43:02 by CyberLeo Revert
@@ -49,13 +49,14 @@
 <verbatim> 
 /bin/sh -c 'fifo="/tmp/ldd-$$"; mkfifo -m 600 ${fifo}; ldd /usr/sbin/sshd | cut -f2 | cut -d" " -f3 | tee ${fifo} | tail -n $(( $( cat ${fifo} | wc -l ) - 1 )); rm -f ${fifo}' | cpio --pass-through --make-directories /root/chroot/sshd/ 
 </verbatim> 
  
-Console Progress Bar for FreeBSD is in misc/clpbar  
-  
-I've forgotten this three times already: [DVDisaster|http://dvdisaster.net]<br>  
-This looks interesting: [Tarsnap|http://www.tarsnap.com]<br>  
-TRIM ext4 on RAID1: [http://www.kerneltrap.org/mailarchive/linux-raid/2010/5/25/6885148] 
+* Console Progress Bar for FreeBSD is in misc/clpbar  
+* Although misc/pv is probably better, now that I think about it  
+* I've forgotten this three times already: [DVDisaster|http://dvdisaster.net]  
+* This looks interesting: [Tarsnap|http://www.tarsnap.com]  
+* TRIM ext4 on RAID1: [http://www.kerneltrap.org/mailarchive/linux-raid/2010/5/25/6885148]  
+* lzjb compression in javascript: [Iuppiter|http://code.google.com/p/jslzjb/source/browse/trunk/Iuppiter.js
  
 <code brush="bash"> 
 # Convert sha1(1)-compatible into cfv's sha1sum-format 
 sed -e 's#^SHA1 (\./\(.*\)) = \(.*\)$#\2 *\1#g' shas 

version 57

http://friends.cyberleo.net/cyberleo/pub-ssh.txt

Teams

Copyright

Tasks

Bugs

Notes

Scrapbin

Machines

Copy dependent libraries into a chroot jail:

/bin/sh -c 'fifo="/tmp/ldd-$$"; mkfifo -m 600 ${fifo}; ldd /usr/sbin/sshd | cut -f2 | cut -d" " -f3 | tee ${fifo} | tail -n $(( $( cat ${fifo} | wc -l ) - 1 )); rm -f ${fifo}' | cpio --pass-through --make-directories /root/chroot/sshd/
# Convert sha1(1)-compatible into cfv's sha1sum-format
sed -e 's#^SHA1 (\./\(.*\)) = \(.*\)$#\2 *\1#g' shas

# Convert cfv's sha1sum-format into sha1(1)-compatible
sed -e 's#^\([0-9A-Fa-f]\{40\}\) [* ]\(.*\)$#SHA1 (./\2) = \1#g' stuff.sha1
# Convert a list of strings into a sed script to filter said strings from another file
# Developed to filter a sha1 hashlist of all symlink-type files, which were computed separately
sed -e 's/[][\.*^$/]/\\&/g; s/^/\//; s/$/\/d/'

FreeBSD misdetects the amount of installed memory on a K7S5A Pro board with 1GB PC3200. Force it:

hw.physmem="1073741824"

Commonly used mkisofs options

mkisofs            # Command
 -v                # Verbose
 -gui              # Format output messages for use by GUI tools
 -iso-level 4      # ISO-9660:1999
 -D                # No deep directory relocation for ISO-9660:1999
 -J                # Generate Joliet records for Win32 systems
 -R                # Generate SUSP/RR records, using the Rock Ridge protocol, for Unix systems
 -r                # As -R, but normalizes certain values (uid/gid are 0, all entries are ugo+r-w, etc)
 -no-pad           # Do not pad ISO to 150 sectors (useful for DVDisaster or uzip images)
 -p CyberLeo       # Specify string for 'Preparer' volume header field
 -V FS-Label       # Specify string for 'Volid' (label) volume header field
 -o <file>.iso     # Name of file to hold resultant image
 <sourcedir> ...   # One or more directories whose contents will be shoved into the image root

Rubygems will no longer fall back to installing into ~/.gem if running as non-root. Provide --user-install on the gem command line to fix.

diskinfo(8)

Random

This'll work for zfs-fuse on linux. FreeBSD needs camcontrol or atacontrol instead of hdparm.

# Standby pool
sudo zpool status data | sed -e '/disk\/by/!d; s/^\W*//; s/  .*$//; s/^/\/dev\//' | sudo xargs /sbin/hdparm -y
# Check pool drive states
sudo zpool status data | sed -e '/disk\/by/!d; s/^\W*//; s/  .*$//; s/^/\/dev\//' | sudo xargs /sbin/hdparm -C
# Wake pool
sudo zpool status data | sed -e '/disk\/by/!d; s/^\W*//; s/  .*$//; s/^/\/dev\//' | sudo sh -c 'while read dev; do dd iflag=direct if="${dev}" of=/dev/null bs=512 count=1 & done; wait'

Other

Lyrics

Disk Serial Numbers

den-subnet