imported a bunch of files from the old website
This commit is contained in:
parent
5ad8300cd4
commit
977e37f327
150
AutoHotkey.ahk
Normal file
150
AutoHotkey.ahk
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
; The Double-Alt modifier is activated by pressing
|
||||||
|
; Alt twice, much like a double-click. Hold the second
|
||||||
|
; press down until you click.
|
||||||
|
;
|
||||||
|
; The shortcuts:
|
||||||
|
; Alt + Left Button : Drag to move a window.
|
||||||
|
; Alt + Right Button : Drag to resize a window.
|
||||||
|
; Double-Alt + Left Button : Minimize a window.
|
||||||
|
; Double-Alt + Right Button : Maximize/Restore a window.
|
||||||
|
;
|
||||||
|
; You can optionally release Alt after the first
|
||||||
|
; click rather than holding it down the whole time.
|
||||||
|
|
||||||
|
If (A_AhkVersion < "1.0.39.00")
|
||||||
|
{
|
||||||
|
MsgBox,20,,This script may not work properly with your version of AutoHotkey. Continue?
|
||||||
|
IfMsgBox,No
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; This is the setting that runs smoothest on my
|
||||||
|
; system. Depending on your video card and cpu
|
||||||
|
; power, you may want to raise or lower this value.
|
||||||
|
SetWinDelay,2
|
||||||
|
|
||||||
|
CoordMode,Mouse
|
||||||
|
return
|
||||||
|
|
||||||
|
!LButton::
|
||||||
|
;If DoubleAlt
|
||||||
|
;{
|
||||||
|
; MouseGetPos,,,KDE_id
|
||||||
|
; ; This message is mostly equivalent to WinMinimize,
|
||||||
|
; ; but it avoids a bug with PSPad.
|
||||||
|
; PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
|
||||||
|
; DoubleAlt := false
|
||||||
|
; return
|
||||||
|
;}
|
||||||
|
; Get the initial mouse position and window id, and
|
||||||
|
; abort if the window is maximized.
|
||||||
|
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
|
||||||
|
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
If KDE_Win
|
||||||
|
return
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
; Get the initial window position.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
|
||||||
|
Loop
|
||||||
|
{
|
||||||
|
GetKeyState,KDE_Button,LButton,P ; Break if button has been released.
|
||||||
|
If KDE_Button = U
|
||||||
|
break
|
||||||
|
MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
|
||||||
|
KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
|
||||||
|
KDE_Y2 -= KDE_Y1
|
||||||
|
KDE_WinX2 := (KDE_WinX1 + KDE_X2) ; Apply this offset to the window position.
|
||||||
|
KDE_WinY2 := (KDE_WinY1 + KDE_Y2)
|
||||||
|
WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2% ; Move the window to the new position.
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
!RButton::
|
||||||
|
;If DoubleAlt
|
||||||
|
;{
|
||||||
|
; MouseGetPos,,,KDE_id
|
||||||
|
; ; Toggle between maximized and restored state.
|
||||||
|
; WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
; If KDE_Win
|
||||||
|
; WinRestore,ahk_id %KDE_id%
|
||||||
|
; Else
|
||||||
|
; WinMaximize,ahk_id %KDE_id%
|
||||||
|
; DoubleAlt := false
|
||||||
|
; return
|
||||||
|
;}
|
||||||
|
; Get the initial mouse position and window id, and
|
||||||
|
; abort if the window is maximized.
|
||||||
|
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
|
||||||
|
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
If KDE_Win
|
||||||
|
return
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
; Get the initial window position and size.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
|
||||||
|
; Define the window region the mouse is currently in.
|
||||||
|
; The four regions are Up and Left, Up and Right, Down and Left, Down and Right.
|
||||||
|
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 2)
|
||||||
|
KDE_WinLeft := 1
|
||||||
|
Else
|
||||||
|
KDE_WinLeft := -1
|
||||||
|
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2)
|
||||||
|
KDE_WinUp := 1
|
||||||
|
Else
|
||||||
|
KDE_WinUp := -1
|
||||||
|
; left only
|
||||||
|
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 4 and abs(KDE_Y1 - KDE_WinY1 - KDE_WinH / 2) < KDE_WinH / 4)
|
||||||
|
KDE_WinUp := 0
|
||||||
|
If (KDE_X1 > KDE_WinX1 + 3 * KDE_WinW / 4 and abs(KDE_Y1 - KDE_WinY1 - KDE_WinH / 2) < KDE_WinH / 4)
|
||||||
|
KDE_WinUp := 0
|
||||||
|
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 4 and abs(KDE_X1 - KDE_WinX1 - KDE_WinW / 2) < KDE_WinW / 4)
|
||||||
|
KDE_WinLeft := 0
|
||||||
|
If (KDE_Y1 > KDE_WinY1 + 3 * KDE_WinH / 4 and abs(KDE_X1 - KDE_WinX1 - KDE_WinW / 2) < KDE_WinW / 4)
|
||||||
|
KDE_WinLeft := 0
|
||||||
|
Loop
|
||||||
|
{
|
||||||
|
GetKeyState,KDE_Button,RButton,P ; Break if button has been released.
|
||||||
|
If KDE_Button = U
|
||||||
|
break
|
||||||
|
MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
|
||||||
|
; Get the current window position and size.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
|
||||||
|
If KDE_WinLeft = 0
|
||||||
|
KDE_X2 := 0
|
||||||
|
Else
|
||||||
|
KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
|
||||||
|
If KDE_WinUp = 0
|
||||||
|
KDE_Y2 := 0
|
||||||
|
Else
|
||||||
|
KDE_Y2 -= KDE_Y1
|
||||||
|
; Then, act according to the defined region.
|
||||||
|
WinMove,ahk_id %KDE_id%,, KDE_WinX1 + (KDE_WinLeft+1)/2*KDE_X2 ; X of resized window
|
||||||
|
, KDE_WinY1 + (KDE_WinUp+1)/2*KDE_Y2 ; Y of resized window
|
||||||
|
, KDE_WinW - KDE_WinLeft *KDE_X2 ; W of resized window
|
||||||
|
, KDE_WinH - KDE_WinUp *KDE_Y2 ; H of resized window
|
||||||
|
KDE_X1 += KDE_X2 ; Reset the initial position for the next iteration.
|
||||||
|
KDE_Y1 += KDE_Y2
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
; This detects "double-clicks" of the alt key.
|
||||||
|
;~Alt::
|
||||||
|
;DoubleAlt := A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 400
|
||||||
|
;Sleep 0
|
||||||
|
;KeyWait Alt ; This prevents the keyboard's auto-repeat feature from interfering.
|
||||||
|
;return
|
||||||
|
|
||||||
|
#WheelDown::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinMinimize,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
^!WheelUp::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinMaximize,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
^!WheelDown::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinRestore,ahk_id %KDE_id%
|
||||||
|
return
|
193
JoshsAutoHotKey.ahk
Normal file
193
JoshsAutoHotKey.ahk
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
; JoshsAutoHotKey.ahk
|
||||||
|
; Version 1.1
|
||||||
|
; 2008-12-03
|
||||||
|
;
|
||||||
|
; Original version from
|
||||||
|
; http://www.autohotkey.com/docs/scripts/EasyWindowDrag_(KDE).htm
|
||||||
|
;
|
||||||
|
; The shortcuts:
|
||||||
|
; Alt + Left Button : Drag to move a window.
|
||||||
|
; Alt + Right Button : Drag to resize a window.
|
||||||
|
; Control + Alt + WheelUp : Maximize a window
|
||||||
|
; Control + Alt + WheelDown : Restore a window
|
||||||
|
; Super + WheelDown : Minimize a window
|
||||||
|
; WheelUp : Focus window under cursor, then send wheel up
|
||||||
|
; WheelDown : Focus window under cursor, then send wheel down
|
||||||
|
; Super + Middle Button : Send window to background
|
||||||
|
;
|
||||||
|
; You can optionally release Alt after the first
|
||||||
|
; click rather than holding it down the whole time.
|
||||||
|
|
||||||
|
If (A_AhkVersion < "1.0.39.00")
|
||||||
|
{
|
||||||
|
MsgBox,20,,This script may not work properly with your version of AutoHotkey. Continue?
|
||||||
|
IfMsgBox,No
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; This is the setting that runs smoothest on my
|
||||||
|
; system. Depending on your video card and cpu
|
||||||
|
; power, you may want to raise or lower this value.
|
||||||
|
SetWinDelay,2
|
||||||
|
|
||||||
|
CoordMode,Mouse
|
||||||
|
return
|
||||||
|
|
||||||
|
!LButton::
|
||||||
|
;If DoubleAlt
|
||||||
|
;{
|
||||||
|
; MouseGetPos,,,KDE_id
|
||||||
|
; ; This message is mostly equivalent to WinMinimize,
|
||||||
|
; ; but it avoids a bug with PSPad.
|
||||||
|
; PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
|
||||||
|
; DoubleAlt := false
|
||||||
|
; return
|
||||||
|
;}
|
||||||
|
; Get the initial mouse position and window id, and
|
||||||
|
; abort if the window is maximized.
|
||||||
|
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
|
||||||
|
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
If KDE_Win
|
||||||
|
return
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
; Get the initial window position.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
|
||||||
|
Loop
|
||||||
|
{
|
||||||
|
GetKeyState,KDE_Button,LButton,P ; Break if button has been released.
|
||||||
|
If KDE_Button = U
|
||||||
|
break
|
||||||
|
MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
|
||||||
|
KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
|
||||||
|
KDE_Y2 -= KDE_Y1
|
||||||
|
KDE_WinX2 := (KDE_WinX1 + KDE_X2) ; Apply this offset to the window position.
|
||||||
|
KDE_WinY2 := (KDE_WinY1 + KDE_Y2)
|
||||||
|
WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2% ; Move the window to the new position.
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
!RButton::
|
||||||
|
;If DoubleAlt
|
||||||
|
;{
|
||||||
|
; MouseGetPos,,,KDE_id
|
||||||
|
; ; Toggle between maximized and restored state.
|
||||||
|
; WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
; If KDE_Win
|
||||||
|
; WinRestore,ahk_id %KDE_id%
|
||||||
|
; Else
|
||||||
|
; WinMaximize,ahk_id %KDE_id%
|
||||||
|
; DoubleAlt := false
|
||||||
|
; return
|
||||||
|
;}
|
||||||
|
; Get the initial mouse position and window id, and
|
||||||
|
; abort if the window is maximized.
|
||||||
|
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
|
||||||
|
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
|
||||||
|
If KDE_Win
|
||||||
|
return
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
; Get the initial window position and size.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
|
||||||
|
; Define the window region the mouse is currently in.
|
||||||
|
; The four regions are Up and Left, Up and Right, Down and Left, Down and Right.
|
||||||
|
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 2)
|
||||||
|
KDE_WinLeft := 1
|
||||||
|
Else
|
||||||
|
KDE_WinLeft := -1
|
||||||
|
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2)
|
||||||
|
KDE_WinUp := 1
|
||||||
|
Else
|
||||||
|
KDE_WinUp := -1
|
||||||
|
; left only
|
||||||
|
If (KDE_X1 < KDE_WinX1 + KDE_WinW / 4 and abs(KDE_Y1 - KDE_WinY1 - KDE_WinH / 2) < KDE_WinH / 4)
|
||||||
|
KDE_WinUp := 0
|
||||||
|
If (KDE_X1 > KDE_WinX1 + 3 * KDE_WinW / 4 and abs(KDE_Y1 - KDE_WinY1 - KDE_WinH / 2) < KDE_WinH / 4)
|
||||||
|
KDE_WinUp := 0
|
||||||
|
If (KDE_Y1 < KDE_WinY1 + KDE_WinH / 4 and abs(KDE_X1 - KDE_WinX1 - KDE_WinW / 2) < KDE_WinW / 4)
|
||||||
|
KDE_WinLeft := 0
|
||||||
|
If (KDE_Y1 > KDE_WinY1 + 3 * KDE_WinH / 4 and abs(KDE_X1 - KDE_WinX1 - KDE_WinW / 2) < KDE_WinW / 4)
|
||||||
|
KDE_WinLeft := 0
|
||||||
|
Loop
|
||||||
|
{
|
||||||
|
GetKeyState,KDE_Button,RButton,P ; Break if button has been released.
|
||||||
|
If KDE_Button = U
|
||||||
|
break
|
||||||
|
MouseGetPos,KDE_X2,KDE_Y2 ; Get the current mouse position.
|
||||||
|
; Get the current window position and size.
|
||||||
|
WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id%
|
||||||
|
If KDE_WinLeft = 0
|
||||||
|
KDE_X2 := 0
|
||||||
|
Else
|
||||||
|
KDE_X2 -= KDE_X1 ; Obtain an offset from the initial mouse position.
|
||||||
|
If KDE_WinUp = 0
|
||||||
|
KDE_Y2 := 0
|
||||||
|
Else
|
||||||
|
KDE_Y2 -= KDE_Y1
|
||||||
|
; Then, act according to the defined region.
|
||||||
|
WinMove,ahk_id %KDE_id%,, KDE_WinX1 + (KDE_WinLeft+1)/2*KDE_X2 ; X of resized window
|
||||||
|
, KDE_WinY1 + (KDE_WinUp+1)/2*KDE_Y2 ; Y of resized window
|
||||||
|
, KDE_WinW - KDE_WinLeft *KDE_X2 ; W of resized window
|
||||||
|
, KDE_WinH - KDE_WinUp *KDE_Y2 ; H of resized window
|
||||||
|
KDE_X1 += KDE_X2 ; Reset the initial position for the next iteration.
|
||||||
|
KDE_Y1 += KDE_Y2
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
; This detects "double-clicks" of the alt key.
|
||||||
|
;~Alt::
|
||||||
|
;DoubleAlt := A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 400
|
||||||
|
;Sleep 0
|
||||||
|
;KeyWait Alt ; This prevents the keyboard's auto-repeat feature from interfering.
|
||||||
|
;return
|
||||||
|
|
||||||
|
#WheelDown::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinMinimize,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
^!WheelUp::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinMaximize,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
^!WheelDown::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinRestore,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
; Added by Josh 2008-11-20
|
||||||
|
; Super + middle-click will lower (send window to back)
|
||||||
|
#MButton::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinSet,Bottom,,ahk_id %KDE_id%
|
||||||
|
return
|
||||||
|
|
||||||
|
; Added by Josh 2008-12-02
|
||||||
|
; scrolling the mouse wheel anywhere will activate the window
|
||||||
|
; that is under the cursor at that screen position
|
||||||
|
; also sends the event along to the application...
|
||||||
|
$WheelDown::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
; added 2008-12-03 to send a middle-button click to Windows
|
||||||
|
; Explorer windows so I can scroll in the "Folders" pane and
|
||||||
|
; the main pane independently
|
||||||
|
WinGetClass class,ahk_id %KDE_id%
|
||||||
|
if (class = "ExploreWClass")
|
||||||
|
{
|
||||||
|
Send {MButton}
|
||||||
|
}
|
||||||
|
Send {WheelDown}
|
||||||
|
return
|
||||||
|
|
||||||
|
$WheelUp::
|
||||||
|
MouseGetPos,,,KDE_id
|
||||||
|
WinActivate,ahk_id %KDE_id%
|
||||||
|
WinGetClass class,ahk_id %KDE_id%
|
||||||
|
if (class = "ExploreWClass")
|
||||||
|
{
|
||||||
|
Send {MButton}
|
||||||
|
}
|
||||||
|
Send {WheelUp}
|
||||||
|
return
|
BIN
grub.flp.bz2
Normal file
BIN
grub.flp.bz2
Normal file
Binary file not shown.
29
hilite
Normal file
29
hilite
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Getopt::Long;
|
||||||
|
|
||||||
|
my %COLORS = ( 'red' => "\033[1;31m",
|
||||||
|
'green' => "\033[1;32m",
|
||||||
|
'yellow' => "\033[1;33m",
|
||||||
|
'blue' => "\033[1;34m",
|
||||||
|
'magenta' => "\033[1;35m"
|
||||||
|
);
|
||||||
|
|
||||||
|
my $color = 'red';
|
||||||
|
GetOptions("color=s" => \$color);
|
||||||
|
my $search = shift;
|
||||||
|
die "Usage: hilite <pattern>" unless(defined($search));
|
||||||
|
my $cstart = exists($COLORS{$color}) ? $COLORS{$color} : $COLORS{'red'};
|
||||||
|
my $cend = "\033[0m";
|
||||||
|
|
||||||
|
while (my $line = <>)
|
||||||
|
{
|
||||||
|
chomp($line);
|
||||||
|
my $match = $line;
|
||||||
|
$match =~ s/($search)/$cstart$1$cend/og;
|
||||||
|
print "$match\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
|
BIN
linux_powered.jpg
Normal file
BIN
linux_powered.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
53
repeat
Normal file
53
repeat
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
# Josh Holtrop
|
||||||
|
# 2006-04-27
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
sub usage
|
||||||
|
{
|
||||||
|
print "Usage: $0 [-i interval] [-c] cmd [args]\n";
|
||||||
|
print "\tinterval: number of seconds to wait between each execution of <cmd> (default 1)\n";
|
||||||
|
print "\t-c clear the screen between invocation of each command\n";
|
||||||
|
exit(42);
|
||||||
|
}
|
||||||
|
|
||||||
|
my $interval = 1;
|
||||||
|
my $clear = 0;
|
||||||
|
my @command = ();
|
||||||
|
for (my $i = 0; $i <= $#ARGV; $i++)
|
||||||
|
{
|
||||||
|
usage() if ($ARGV[$i] eq '--help');
|
||||||
|
if ($ARGV[$i] =~ /^-i(.*)$/)
|
||||||
|
{
|
||||||
|
if (length($1) > 0)
|
||||||
|
{
|
||||||
|
$interval = $1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usage() if ($i == $#ARGV);
|
||||||
|
$interval = $ARGV[++$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($ARGV[$i] eq '-c')
|
||||||
|
{
|
||||||
|
$clear = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Got to the command
|
||||||
|
@command = splice(@ARGV, $i);
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() if ($#command < 0);
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
system('clear') if ($clear);
|
||||||
|
system(@command);
|
||||||
|
sleep $interval;
|
||||||
|
}
|
||||||
|
|
99
ssh_execute.pl
Normal file
99
ssh_execute.pl
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
# Josh Holtrop
|
||||||
|
# 2006-05-05
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
sub usage
|
||||||
|
{
|
||||||
|
print "Usage: $0 [options] command [args]\n";
|
||||||
|
print "Options:\n";
|
||||||
|
print " -q Run <command> on hosts sequentially (default in parallel)\n";
|
||||||
|
print " -s<ssh> Use <ssh> instead of 'ssh' for a remote shell program\n";
|
||||||
|
print " -u<user> Use username <user> instead of your own\n";
|
||||||
|
print " -h<hostlist> The hosts to run the command on, comma-separated\n";
|
||||||
|
print " If the -h option is not given, the host list is\n";
|
||||||
|
print " read from standard input, one host per line\n";
|
||||||
|
exit(42);
|
||||||
|
}
|
||||||
|
|
||||||
|
my $ssh = 'ssh';
|
||||||
|
my $user = '';
|
||||||
|
my $seq = 0;
|
||||||
|
my @hosts = ();
|
||||||
|
my @command = ();
|
||||||
|
|
||||||
|
for (my $i = 0; $i <= $#ARGV; $i++)
|
||||||
|
{
|
||||||
|
if ($ARGV[$i] eq '-q')
|
||||||
|
{
|
||||||
|
$seq = 1;
|
||||||
|
}
|
||||||
|
elsif ($ARGV[$i] =~ /^-s(.*)$/)
|
||||||
|
{
|
||||||
|
if (length($1) > 0)
|
||||||
|
{
|
||||||
|
$ssh = $1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usage() if ($i == $#ARGV);
|
||||||
|
$ssh = $ARGV[++$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($ARGV[$i] =~ /^-h(.*)$/)
|
||||||
|
{
|
||||||
|
if (length($1) > 0)
|
||||||
|
{
|
||||||
|
@hosts = split(/,/, $1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usage() if ($i == $#ARGV);
|
||||||
|
@hosts = split(/,/, $ARGV[++$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif ($ARGV[$i] =~ /^-u(.*)$/)
|
||||||
|
{
|
||||||
|
if (length($1) > 0)
|
||||||
|
{
|
||||||
|
$user = $1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
usage() if ($i == $#ARGV);
|
||||||
|
$user = $ARGV[++$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# We've reached the command
|
||||||
|
@command = splice(@ARGV, $i);
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$user .= '@' if ($user ne '');
|
||||||
|
usage() if ($#command < 0);
|
||||||
|
|
||||||
|
if ($#hosts < 0)
|
||||||
|
{
|
||||||
|
# Read hosts from stdin
|
||||||
|
while (my $host = <STDIN>)
|
||||||
|
{
|
||||||
|
chomp($host);
|
||||||
|
push(@hosts, $host);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $host (@hosts)
|
||||||
|
{
|
||||||
|
my $f = $seq ? 0 : fork();
|
||||||
|
$f || system($ssh, "$user$host", @command);
|
||||||
|
exit(0) unless ($f || $seq); # Exit if not parent and not sequential
|
||||||
|
}
|
||||||
|
|
||||||
|
while (wait() != -1) {} # Wait for all children to exit
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
|
1
winamp-title-format.txt
Normal file
1
winamp-title-format.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
[%artist%]$if(%album%%tracknumber%,' ['$if(%album%,%album%' - ',)%tracknumber%']',) - $if2(%title%,$filepart(%filename%))
|
11
xhtml11strict.html
Normal file
11
xhtml11strict.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Blank XHTML 1.1 Strict Page</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>HI</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
xmodmap
Normal file
13
xmodmap
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
! Key definitions
|
||||||
|
! Menu key is a compose key
|
||||||
|
keycode 117 = Multi_key
|
||||||
|
! Pause/Break is Caps Lock
|
||||||
|
keycode 110 = Caps_Lock
|
||||||
|
! Caps Lock is Control
|
||||||
|
keycode 66 = Control_L
|
||||||
|
keycode 37 = Control_L
|
||||||
|
|
||||||
|
! Modifier definitions
|
||||||
|
clear Lock
|
||||||
|
add Lock = Caps_Lock
|
||||||
|
add Control = Control_L
|
Loading…
x
Reference in New Issue
Block a user