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 | |
for i in `find . -print` | |
do | |
if [ -h "$i" ] && [ ! -r "$i" ] | |
then | |
echo "Bad symbolic link $i" | |
/bin/rm -i "$i" | |
fi | |
done |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Digest::SHA qw(sha1_base64 sha256_base64 sha512_base64); | |
use File::Basename; | |
use File::Find (); | |
use Getopt::Long; | |
use IO::All; |
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 | |
# Need bash instead of just /bin/sh | |
# | |
############################################################################### | |
# | |
# Debian has multiple different, non-overlapping, mechanisms to update the | |
# current version. I like to run Debian Sid, the unstable rolling version. One | |
# of the dangers is that dependencies for big packages like gnome, can easily | |
# get broken or worse, uninstalled. This is a script I have that tries hard to | |
# do many of the possible ways to update/upgrade and tries to load the set of |
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
brew update | |
brew upgrade | |
brew install arp-scan | |
brew install ent | |
brew install fdupes | |
brew install global | |
brew install gpg | |
brew install macvim | |
brew install oath-toolkit | |
brew install par2 |
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
import time | |
print('Find Primes') | |
listOfPrimes = [] | |
checkList = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199 ] | |
startTime = time.clock() | |
i = 3 | |
while i < 1000000: # test every odd number, there is only one even prime | |
isprime = True | |
for thisPrime in listOfPrimes: | |
if ((thisPrime * thisPrime) <= i) and ((int(i/thisPrime)*thisPrime) == i): |
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 | |
die() { | |
set +x | |
echo >&2 "$@" | |
usage | |
exit 1 | |
} | |
function usage { | |
set +x |
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
#!/usr/bin/env perl | |
print ($ARGV[0] + int(rand($ARGV[1] - $ARGV[0]))) |
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
@echo off | |
TITLE ArchiveAllDirectories | |
@rem I am not very good at DOS Batch / Command files, so there are probably a lot | |
@rem more comments in the script than people would normally expect, and possibly | |
@rem a lot more mistakes. | |
@rem Setlocal EnableDelayedExpansion is needed for this and probably most batch and | |
@rem command files. Normally the variables are set when the script is read, not when |
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
#!/usr/bin/env perl | |
# generate an 8 x 8 password grid | |
use String::Random; | |
use strict; | |
use warnings; | |
# some characters are hard to distinguish when written | |
# or in certain typefaces. I am going to ignore |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
# my @set = ('0' .. '9', 'A' .. 'Z', 'a' .. 'z'); | |
# non ambiguous characters | |
# https://ux.stackexchange.com/questions/21076/are-there-numbers-and-letters-to-avoid-for-activation-codes-via-sms | |
my @set = split //,'abcdefghkmnoprstwxzABCDEFGHJKLMNPQRTWXY34689'; |
NewerOlder