View findwords.pl
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 | |
# This script is useful when proofing with only some glyphs completed… | |
# Usage example: | |
# $ perl findwords.pl qwertyasdf | |
# Searching for words in /usr/share/dict/words containing only q, w, e, r, t, y, a, s, d, f | |
# westerwards | |
# afterstate | |
# aftertaste |
View gifserver
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 | |
if [ $# -eq 0 ] | |
then | |
echo "%usage: $0 <id> [options]" | |
exit | |
fi | |
echo "[$0] 🌶 Now servin' up hot GIFs!" |
View bas.bas
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
0 rem bas.bas - by underwood | |
1 rem usage: bas <single line of BASIC code> | |
10 if left$(arg$,1) = " " then arg$ = mid$(arg$,1) : goto 10 | |
20 if asc(left$(arg$,1)) > 47 and asc(left$(arg$,1)) < 58 then arg$ = mid$(arg$,1) : goto 10 | |
21 rem strip leading spaces and line numbers | |
30 arg$ = "1 " + arg$ | |
31 rem prepend our line with line number 1 |
View append.bas
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
10 if argv$(1) = "" or argv$(2) = "" then print "%usage: append <file> <data>" : end | |
20 open argv$(1), as #1 | |
30 if eof(1) = -1 then goto 60 | |
40 input# 1, dump$ | |
50 goto 30 | |
60 print# 1, argv$(2) | |
70 close #1 |
View skipping_stones.py
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/python | |
import random | |
import time | |
import sys | |
class Unbuffered( object ) : | |
def __init__( self, stream ) : | |
self.stream = stream | |
def write( self, data ) : |
View skipping_stones.pl
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/perl | |
use strict; | |
use warnings; | |
use Time::HiRes 'usleep'; | |
$|++; # force auto-flush (see perldoc perlvar) | |
my $distance = 1 + int(rand(49)); | |
my @stones = ("_","-"); |
View blank-bbs.bas
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
0 rem settings ------------------------------------------------------ | |
1 hostname$ = "myhost" : rem enter hostname in lowercase | |
2 admin$ = "admin" : rem administrator name in lowercase | |
3 backdoor$ = "default" : rem default password | |
4 allowguests = 1 : rem enable / disable guest access | |
5 zzz = 0.3 : rem global print timer | |
6 motd$ = "motd.txt" : rem load external motd file | |
9 rem --------------------------------------------------------------- |
View lolcat.bas
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
10 if argv$(1) = "-h" then print "%usage: " + argv$(0) + " <string>" : end | |
20 if arg$ = "" then input "" ; in$ : goto 40 | |
30 in$ = arg$ | |
40 e$ = chr$(27) | |
50 def fnfg$(colour) = e$ + "[38;5;"+str$(colour)+"m" | |
60 r = 16 + int( rnd(215) ) | |
70 if r + len(in$) > 231 then goto 60 | |
80 for i = 1 to len(in$) | |
90 print fnfg$(r+i) ; | |
100 print mid$(in$,i,1); |
View screen_functions.bas
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
10 e$ = chr$(27) | |
20 def fnLocate$( y, x ) = chr$(27) + "[" + str$( y ) + ";" + str$( x ) + "f" | |
30 def fnCentre$(x$) = e$ + "[H" + e$ + "[" + str$(int(height/2)) + "B" + e$ + "[" + str$(int((width/2))-int(len(x$)/2)) + "C" + x$ | |
40 def fnCls$(x$) = e$ + "[H" + e$ + "[J" + x$ | |
50 print fnCls$( fnCentre$( "foo" ) ) | |
60 print fnLocate$(10, 10) + "bar" |
View cp.bas
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
10 if len(argv$(1)) < 2 then gosub 160 : end | |
20 if argv$(2) = "" then gosub 160 end | |
30 if instr(dir$, argv$(1)) < 0 then print "%file not found" : end | |
40 myf$ = mid$(mid$(dir$, instr(dir$, argv$(1))),2) | |
50 myf$ = left$(myf$, instr(myf$, " ")) | |
60 print " copy " + myf$ + " to " + argv$(2) "? y/N" ; : cont1$ = inkey$ | |
70 print | |
80 if cont1$ <> "y" then end | |
90 gosub 180 | |
100 gosub 210 |
NewerOlder