Added description for some scripts
Changed eol for some scripts
This commit is contained in:
1
acpid.pl
1
acpid.pl
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
# hibernates laptop if battery discharging and charge is too low
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings "all";
|
use warnings "all";
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
# finds and copies .zip to numeric subdirs
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings "all";
|
use warnings "all";
|
||||||
@@ -11,17 +12,21 @@ my @list;
|
|||||||
my $curdir = 1;
|
my $curdir = 1;
|
||||||
mkdir ($curdir);
|
mkdir ($curdir);
|
||||||
opendir (DIR, ".");
|
opendir (DIR, ".");
|
||||||
|
|
||||||
foreach $file (readdir(DIR)){
|
foreach $file (readdir(DIR)){
|
||||||
next unless ($file =~ /\.zip$/);
|
next unless ($file =~ /\.zip$/);
|
||||||
|
|
||||||
if($counter == 5000){
|
if($counter == 5000){
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
$curdir = $curdir + 1;
|
$curdir = $curdir + 1;
|
||||||
mkdir ($curdir);
|
mkdir ($curdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $nefile = $curdir .'/'.$file;
|
my $nefile = $curdir .'/'.$file;
|
||||||
print "$file $nefile\n";
|
print "$file $nefile\n";
|
||||||
move($file, $nefile) or die "$!";
|
move($file, $nefile) or die "$!";
|
||||||
$counter = $counter + 1;
|
$counter = $counter + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir (DIR);
|
closedir (DIR);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
# dns shooting utility
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings "all";
|
use warnings "all";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# ugly udev hook to toggle display configuration
|
||||||
|
|
||||||
|
|
||||||
# grab the display and xauthority cookie
|
# grab the display and xauthority cookie
|
||||||
export DISPLAY=$(w -h -s | grep ":[0-9]\W" | head -1 | awk '{print $2}')
|
export DISPLAY=$(w -h -s | grep ":[0-9]\W" | head -1 | awk '{print $2}')
|
||||||
|
|||||||
Reference in New Issue
Block a user