This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/dash | |
#--+++-- cpan-grabdist.sh | |
# NODBG=ON # comment out after debugging | |
#--+++-- | |
export HO_ME=$(echo ~) | |
TO_SUDO_OR_NOT="" | |
BEST=$(echo ~Public/Downloads) | |
TARGET=${BEST:+"$BEST/CPAN-SRC"} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# | |
# sources.list setting for google-chrome updates. | |
REPOCONFIG="deb http://dl.google.com/linux/chrome/deb/ stable main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GNU Makefile | |
## GMakefile-std-lib-foo | |
THIS_MAKEFILE := $(firstword $(MAKEFILE_LIST)) | |
PROGRAM = testargv | |
CODE := $(CURDIR)/code/ | |
PROGRAM_FILES = testinput.cc | |
_CODEF := $(wildcard $(CODE)*.cc) | |
_CODEF ||= None | |
LIB_Called_WHAT = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"^-^" vim: set filetype=vim et sw=4 | |
" This file contains free software: you can redistribute it and/or modify | |
" it under the terms of the GNU General Public License as published by | |
" the Free Software Foundation, either version 3 of the License, or | |
" (at your option) any later version. | |
" | |
" The code herein is published informally in the hope that it will be useful, | |
" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
" GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -x TOPDIR_STORAGE=${HOME:-"/home/retread"}/.config/virt/virtualdisks | |
declare CLOO=$1 # e.g. "SANDISK" | |
declare -a DISK_GRP=(\ | |
$(awk --sandbox -F : '/disk/{print $1,$3}' /etc/group)\ | |
) | |
declare DISK_GID=${DISK_GRP[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# usage: rx11vnc [-s] <host>:<xdisplay> | |
# rx11vnc [-s] <host> (assumes xdisplay is 0) | |
# | |
# -s means use ssh instead of rsh. | |
# -S tries to tunnel the vnc traffic thru ssh. (experimental...) | |
# | |
#set -xv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blkid -s TYPE|egrep vfat | cut -d \: -f 1| xargs /sbin/blkid -c value| | |
xargs perl -MCarp -MFile::Util="" -e '$it=File::Util->new();' \ | |
-e 'my($lab)= grep{$_} map{/LABEL=([^=]+)(?=[[:space:]][[:upper:]]+[=])*/;' \ | |
-e '($1 ? do{($_=$it->escape_filename($1))=~s{[[:space:]]}{_}g and qq[/media/byLABELISH/$_]}' \ | |
-e ': q[])} grep {LABEL} @ARGV; print qq[We shall try to make $lab if it does not exist.\n];' \ | |
-e 'unless (-d $it){$it->make_dir($lab) || croak qq[Well, that failed somehow.\n]}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blkid -s TYPE|egrep vfat | | |
cut -d \: -f 1| | |
xargs /sbin/blkid -c value| | |
xargs perl -MFile::Util="" \ | |
-e '$it=File::Util->new();' \ | |
-e 'print for map{/LABEL=([^=]+)(?=[[:space:]][[:upper:]]+[=])*/;' \ | |
-e '($1 ? do{($_=$it->escape_filename($1))=~s{[[:space:]]}{_}g and qq[/media/byLABELISH/$_\n]}' \ | |
-e ' : q[])} grep {LABEL} @ARGV' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get some metadata about present disk devices. | |
function disklookup | |
{ | |
if [[ x"$1 " != x"" ]] | |
then | |
PATT="$1" | |
for LOL in `blkid -o device -t TYPE=ext4` | |
do blkid -o full -s 'UUID' -s 'LABEL' $LOL | |
done | | |
sed -n "/$PATT/{p}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## earlier version was fubar | |
function diskmounts { | |
cat /proc/mounts | perl -nawl \ | |
-e 'if ($F[0]=~ m{/dev/(loop[[:digit:]]+ | sd[a-z][[:digit:]]? | sr[[:digit:]]+) | UUID= | LABEL=}x) {' \ | |
-e ' push @dp=>[@F[0,1]]' \ | |
-e '} END {print for map { $_->[1] } sort {$a->[0] cmp $b->[0]} map { [$_->[0], join (qq[\t\t],@$_)] }@dp}' | |
} |