Git browser: IPFS/
This page presents code associated with the module/unit named above.
IPFS/complete-index-new.sh
IRCAGE=0 IRCDATE=$(date --date="$IRCAGE days ago" +"%d%m%y") echo '#Techrights full #IPFS index updated just now http://techrights.org/ipfs available as plain text @ http://techrights.org/ipfs/txt #dweb #sharing' ipfs add ~/tr_text_version/* | sed -e 's/added //' | sed -e 's/.txt/\ TEXT (daily bulletin\/IRC log as plain text)/' | sed -e 's/.html/ HTML (full IRC log as HTML)/' > txt echo '<html>' > index.html echo '<link rel="stylesheet" href="http://schestowitz.com/roy.css" type="text/css">' >> index.html echo '<TITLE>Techrights Full IPFS Index</TITLE>' >> index.html echo '<BODY BACKGROUND='http://techrights.org/wp-content/themes/ocadia/images/head.png'>' >> index.html echo '<div align=left>' >> index.html echo '<a href="/">Techrights Home</a> | <a href="/?stories">Techrights Blog</a> | <a href="/txt">Latest Bulletin</a> | <a href="/txt-archives">All Bulletins</a></div>' >> index.html echo '<table align="center" height="100" width="100%" cellspacing="0">' >> index.html echo '' >> index.html echo '<td background="http://techrights.org/wiki/images/b/ba/Techrights-pillars.jpg" align=center valign=center>' >> index.html echo '</td>' >> index.html echo '</table>' >> index.html echo '<p><img src="http://techrights.org/images/ipfs.png" alt="IPFS logo" border="0" align="right" hspace="20" vspace="4" style="padding: 4px 4px 4px 4px;" />' >> index.html echo '<h1>Techrights Full IPFS Index</h1>' >> index.html echo '<a href="txt">As text</a> ' >> index.html echo '<hr />' >> index.html echo '<h3>Daily Bulletins</h3>' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | grep techrights-202 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (bulletin)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<h3>Techrights IRC Logs</h3>' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | grep log-techrights | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<h3>TechBytes IRC Logs</h3>' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | grep log-techbytes | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<h3>BoycottNovell IRC Logs</h3>' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | grep log-0 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html ipfs add ~/tr_text_version/* | grep log-1 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html ipfs add ~/tr_text_version/* | grep log-2 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html ipfs add ~/tr_text_version/* | grep log-3 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<h3>Social IRC Logs</h3>' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | grep log-social | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<HR>' >> index.html echo '<table width=100% bgcolor=#AAAAAA>' >> index.html echo '<tr>' >> index.html echo '<td align=left>' >> index.html echo -n '<FONT size=1 color=white>This page was last modified on ' >> index.html date >> index.html echo -n ' </FONT>' >> index.html echo '<td align=right>' >> index.html echo '<font color=white size=1>Maintained by Roy Schestowitz' >> index.html echo '</td>' >> index.html echo '</tr>' >> index.html echo '</table>' >> index.html echo '</BODY>' >> index.html echo '</HTML>' >> index.html echo '</body>' >> index.html echo '</html>' >> index.html cat index.html # scp -o IdentitiesOnly=yes index.html boycottn@23.161.112.116:/home/boycottn/public_html/ipfs # scp -o IdentitiesOnly=yes txt boycottn@23.161.112.116:/home/boycottn/public_html/ipfs/txt echo '' echo '' echo '' ipfs stats bw
IPFS/path.sh
PATH=/home/glr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games ipfs daemon > /dev/null 2>&1 &
IPFS/copy-tr-to-gemini.sh
#!/bin/sh # 2021-02-21 PATH=/usr/local/bin:/usr/bin:/bin set -e # linking instead of copying in this way requires root usually cp --update \ --link \ --preserve=mode,ownership,timestamps \ /home/glr/tr_text_version/* \ /home/gemini/gemini/tr_text_version/ exit 0
IPFS/last-update.sh
tail -18 /home/links/ipfs/output.txt | head -n 1
IPFS/complete-index.sh
IRCAGE=0 IRCDATE=$(date --date="$IRCAGE days ago" +"%d%m%y") echo '#Techrights full #IPFS index updated just now http://techrights.org/ipfs available as plain text @ http://techrights.org/ipfs/txt #dweb #sharing' ipfs add ~/tr_text_version/* | sed -e 's/added //' | sed -e 's/.txt/\ TEXT (daily bulletin\/IRC log as plain text)/' | sed -e 's/.html/ HTML (full IRC log as HTML)/' > txt echo '<html>' > index.html echo '<link rel="stylesheet" href="http://schestowitz.com/roy.css" type="text/css">' >> index.html echo '<TITLE>Techrights Full IPFS Index</TITLE>' >> index.html echo '<BODY BACKGROUND='http://techrights.org/wp-content/themes/ocadia/images/head.png'>' >> index.html echo '<div align=left>' >> index.html echo '<a href="/">Techrights Home</a> | <a href="/?stories">Techrights Blog</a> | <a href="/txt">Latest Bulletin</a> | <a href="/txt-archives">All Bulletins</a></div>' >> index.html echo '<table align="center" height="100" width="100%" cellspacing="0">' >> index.html echo '' >> index.html echo '<td background="http://techrights.org/wiki/images/b/ba/Techrights-pillars.jpg" align=center valign=center>' >> index.html echo '</td>' >> index.html echo '</table>' >> index.html echo '<p><img src="http://techrights.org/images/ipfs.png" alt="IPFS logo" border="0" align="right" hspace="20" vspace="4" style="padding: 4px 4px 4px 4px;" />' >> index.html echo '<h1>Techrights Full IPFS Index</h1>' >> index.html echo '<a href="txt">As text</a> ' >> index.html echo '<hr />' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log\/bulletin)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<HR>' >> index.html echo '<table width=100% bgcolor=#AAAAAA>' >> index.html echo '<tr>' >> index.html echo '<td align=left>' >> index.html echo -n '<FONT size=1 color=white>This page was last modified on ' >> index.html date >> index.html echo -n ' </FONT>' >> index.html echo '<td align=right>' >> index.html echo '<font color=white size=1>Maintained by Roy Schestowitz' >> index.html echo '</td>' >> index.html echo '</tr>' >> index.html echo '</table>' >> index.html echo '</BODY>' >> index.html echo '</HTML>' >> index.html echo '</body>' >> index.html echo '</html>' >> index.html cat index.html # scp -o IdentitiesOnly=yes index.html boycottn@23.161.112.116:/home/boycottn/public_html/ipfs # scp -o IdentitiesOnly=yes txt boycottn@23.161.112.116:/home/boycottn/public_html/ipfs/txt echo '' echo '' echo '' ipfs stats bw
IPFS/tc-shaper.sh
#!/bin/sh
# 2021-02-17
# 2021-04-05
# 2021-12-01
# https://helpful.knobs-dials.com/index.php/Linux_traffic_shaping_notes
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
if=eth0
# remove all existing qdiscs, classes and filters from interface
tc qdisc del dev $if ingress 2>/dev/null
tc qdisc del dev $if root 2>/dev/null
# respect dscp markings using cake
tc qdisc add dev $if root cake bandwidth 800kbit ack-filter
# set default class for all unclassified traffic
tc qdisc replace dev $if root handle 1: htb default 30
# top level class with handle 1:1
# tc class add dev $if parent 1: classid 1:1 htb rate 800kbit
# Class 1:10 is highest priority path, outgoing SSH/SFTP
# Class 1:20 is outgoing SSH/SFTP bulk transfers
# Class 1:30 is next highest priority path, HTTP/HTTPS traffic
# Class 1:40 is default with next lowest priority
# Class 1:50 is lowest priority but highest total bandwidth, IPFS traffic
tc class add dev $if parent 1:1 classid 1:10 htb rate 8mbit ceil 9mbit prio 1
tc class add dev $if parent 1:1 classid 1:20 htb rate 7mbit ceil 8mbit prio 2
tc class add dev $if parent 1:1 classid 1:30 htb rate 900kbit ceil 1mbit prio 3
tc class add dev $if parent 1:1 classid 1:40 htb rate 600kbit ceil 1mbit prio 4
tc class add dev $if parent 1:1 classid 1:50 htb rate 500kbit prio 5
# leaf qdisc to each child class
tc qdisc add dev $if parent 1:10 fq_codel
tc qdisc add dev $if parent 1:20 fq_codel
tc qdisc add dev $if parent 1:30 fq_codel
tc qdisc add dev $if parent 1:40 fq_codel
tc qdisc add dev $if parent 1:50 fq_codel
# add filters to prioritize traffic
tc filter add dev $if parent 1: handle 100 fw classid 1:10
tc filter add dev $if parent 1: handle 200 fw classid 1:20
tc filter add dev $if parent 1: handle 300 fw classid 1:30
tc filter add dev $if parent 1: handle 400 fw classid 1:40
tc filter add dev $if parent 1: handle 500 fw classid 1:50
# prioritize ICMP
tc filter add dev $if parent 1: protocol ip prio 1 u32 \
match ip protocol 1 0xff \
flowid 1:10
# prioritize TCP ACK
# https://lartc.org/howto/lartc.adv-filter.html#AEN1303
tc filter add dev $if parent 1:0 prio 10 u32 \
match ip protocol 6 0xff \
match u8 0x10 0xff at nexthdr+13 \
flowid 1:10
# drop whatever comes in too fast
tc qdisc add dev $if handle ffff: ingress
tc filter add dev $if parent ffff: protocol ip prio 50 u32 match ip src \
0.0.0.0/0 police rate 9mbit burst 9mbit drop flowid :1
# clear chains if possible
iptables -Z; # zero counters
iptables -t mangle -F; # flush (delete) rules
iptables -t mangle -X; # delete all extra chains
# label outgoing traffic
iptables -t mangle -A OUTPUT -p tcp --match multiport --dports 53 \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p udp --match multiport --dports 53 \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp -m tcp -m multiport --sports 22 \
-m dscp --dscp 0x04 -m comment --comment sshinteractive \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp -m tcp -m multiport --sports 22 \
-m dscp --dscp 0x02 -m comment --comment sshbulk \
-j MARK --set-mark 200
iptables -t mangle -A OUTPUT -p tcp -m tcp -m multiport --dports 22 \
-m dscp --dscp 0x04 -m comment --comment sshinteractive \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp -m tcp -m multiport --dports 22 \
-m dscp --dscp 0x02 -m comment --comment sshbulk \
-j MARK --set-mark 200
iptables -t mangle -A OUTPUT -p tcp --match multiport --dports 1965 \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 1965 \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp --match multiport --dports 80,443 \
-j MARK --set-mark 300
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 80,443 \
-j MARK --set-mark 200
iptables -t mangle -A OUTPUT -p tcp --match multiport --dports 4001 \
-j MARK --set-mark 400
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 4001 \
-j MARK --set-mark 500
IPFS/tc-shaper-v2.sh
#!/bin/sh
# 2021-02-19
# updated 2021-03-07
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
if=wlan0
# remove all existing qdiscs, classes and filters from interface
tc qdisc del dev $if ingress 2>/dev/null
tc qdisc del dev $if root 2>/dev/null
# respect dscp markings using cake
tc qdisc add dev $if root cake bandwidth 1500kbit ack-filter
# set default class for all unclassified traffic
tc qdisc replace dev $if root handle 1: htb default 30
# top level class with handle 1:1
# tc class add dev $if parent 1: classid 1:1 htb rate 800kbit
# Class 1:10 is highest priority path, outgoing SSH/SFTP and Gemini
# Class 1:20 is next highest priority path, HTTP/HTTPS traffic
# Class 1:30 is default with next lowest priority
# Class 1:40 is lowest priority but highest total bandwidth, IPFS traffic
tc class add dev $if parent 1:1 classid 1:10 htb rate 1200kbit \
ceil 1200kbit prio 1
tc class add dev $if parent 1:1 classid 1:20 htb rate 250kbit \
ceil 700kbit prio 2
tc class add dev $if parent 1:1 classid 1:30 htb rate 250kbit \
ceil 600kbit prio 3
tc class add dev $if parent 1:1 classid 1:40 htb rate 250kbit \
ceil 550kbit prio 4
# leaf qdisc to each child class
tc qdisc add dev $if parent 1:10 fq_codel
tc qdisc add dev $if parent 1:20 fq_codel
tc qdisc add dev $if parent 1:30 fq_codel
tc qdisc add dev $if parent 1:40 fq_codel
# add filters to prioritize traffic
tc filter add dev $if parent 1: handle 100 fw classid 1:10
tc filter add dev $if parent 1: handle 200 fw classid 1:20
tc filter add dev $if parent 1: handle 400 fw classid 1:40
# drop whatever comes in too fast
tc qdisc add dev $if handle ffff: ingress
tc filter add dev $if parent ffff: protocol ip prio 50 u32 match ip src \
0.0.0.0/0 police rate 800kbit burst 900kbit drop flowid :1
# label outgoing traffic
iptables -Z; # zero counters
iptables -F; # flush (delete) rules
iptables -X; # delete all extra chains
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 22,1965 \
-j MARK --set-mark 100
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 80,443 \
-j MARK --set-mark 200
iptables -t mangle -A OUTPUT -p tcp --match multiport --sports 4001 \
-j MARK --set-mark 400
IPFS/run-blinkt-ipfs.py
#!/usr/bin/python3
# 2019-04-22
# 2020-11-07
from blinkt import set_pixel, show
from random import randint,random,shuffle,randrange
from time import sleep
import argparse
import signal
def solid(r,g,b,s):
while True:
for pixel in range(8):
set_pixel(pixel, r, g, b)
show()
sleep(0.1)
def random_lights3():
while True:
for pixel in range(8):
r = randint(0, 255)
g = randint(0, 255)
b = randint(0, 255)
set_pixel(pixel, r, g, b)
show()
sleep(0.1)
def random_lights2():
while True:
p=range(8)
p=sorted(p, key=lambda x: random())
for pixel in p:
r = randrange(0, 255, 16)
g = randrange(0, 255, 16)
b = randrange(0, 255, 16)
set_pixel(pixel, r, g, b)
show()
sleep(0.1)
def random_lights1():
while True:
p=range(8)
p=sorted(p, key=lambda x: random())
for pixel in p:
r = randrange(0, 255, 8)
g = randrange(0, 255, 8)
b = randrange(0, 255, 8)
set_pixel(pixel, r, g, b)
show()
sleep(0.1)
def spacer(r,g,b,seconds):
while True:
for pixel in range(8):
set_pixel(pixel, r, g, b)
next = (pixel+1)%8
set_pixel(next, 0, 0, 0)
show()
sleep(seconds)
def reversed_spacer(r,g,b,seconds):
while True:
for pixel in reversed(range(8)):
set_pixel(pixel, r, g, b)
prev = (pixel-1)%8
set_pixel(prev, 0, 0, 0)
show()
sleep(seconds)
def cylon(r,g,b,seconds):
while True:
for pixel in reversed(range(8)):
set_pixel(pixel, r, g, b)
prev = (pixel-1)%8
if prev < pixel:
set_pixel(prev, 0, 0, 0)
show()
sleep(seconds)
for pixel in range(8):
set_pixel(pixel, r, g, b)
next = (pixel+1)%8
if next > pixel:
set_pixel(next, 0, 0, 0)
show()
sleep(seconds)
def pulsed_bar(r,g,b,seconds):
steps=8
while True:
for fade in reversed(range(steps)):
r2=r*(fade+1)/steps
g2=g*(fade+1)/steps
b2=b*(fade+1)/steps
# print (fade)
for pixel in range(8):
set_pixel(pixel, r2, g2, b2)
show()
sleep(seconds)
for fade in range(int(steps/1)):
r2=r*(fade+1)/steps
g2=g*(fade+1)/steps
b2=b*(fade+1)/steps
for pixel in range(8):
set_pixel(pixel, r2, g2, b2)
show()
sleep(seconds*0.5)
def ipfs(r,g,b,seconds):
steps=4 # how many stages in gradient
brightness=0.5 # how bright the lights will get
bluebright=100 # the brightness of the blue light in the middle (0-255), albeit overriden by input
dim=1 # increase to dim down the lights
run = 0 # running count for periodic file access
while True: # run always (until interruption)
run=run+1
# first, open from files the required values, which change over time
if (int(run) % 50 == 1):
with open(r'/home/glr/RateIn', 'r') as f: # open from file the IN value
# print(r)
lines = f.read().splitlines()
r=int(lines[-1]) # read the value
# r=int(map(int, f.readline().split())) # prototype, for multiples (stale)
with open(r'/home/glr/RateOut', 'r') as f: # open from file OUT value
# print(g) # show values, debugging
lines = f.read().splitlines()
g=int(lines[-1])
with open(r'/home/glr/Swarm', 'r') as f: # open from file Swarm value
# print(g) # show values, debugging
lines = f.read().splitlines()
bluebright=int(lines[-1])/2
# print(bluebright)
for fade in reversed(range(steps)): # fade in effect
# print(g2) # show values again, debugging
# print(r2)
r2=r*(fade+1)/steps/dim
g2=g*(fade+1)/steps/dim
b2=b*(fade+1)/steps/dim
# print(g2) # show values again, debugging
# print(r2)
# print (fade)
for pixel in range(3): # first 3 LED lights
set_pixel(pixel, r2/20, (g2*brightness)+(pixel*1), b2/20)
for pixel in range(5,8): # the other/last 3 lights
set_pixel(pixel, (r2*brightness)+(pixel*1), g2/20, b2/20)
if (bluebright==0):
set_pixel(3, 255, 255, 255)
set_pixel(4, 255, 255, 255)
else:
set_pixel(3, 0, 0, 0)
set_pixel(4, 0, 0, bluebright)
show()
sleep(seconds/r*r+0.1)
for fade in range(int(steps/1)): # fade out effect
r2=r*(fade+1)/steps/dim
g2=g*(fade+1)/steps/dim
b2=b*(fade+1)/steps/dim
for pixel in range(3):
set_pixel(pixel, r2/20, (g2*brightness)+(pixel*1), b2/20)
for pixel in range(5,8):
set_pixel(pixel, (r2*brightness)+(pixel*1), g2/20, b2/20)
set_pixel(3, 0, 0, bluebright)
set_pixel(4, 0, 0, 0)
show()
sleep(seconds/g*g+0.1)
def flashed_bar(r,g,b,seconds):
while True:
for half in range(4):
set_pixel(half,r,g,b)
for half in range(4,8):
set_pixel(half,0,0,0)
show()
sleep(seconds)
for half in range(4,8):
set_pixel(half,r,g,b)
for half in range(4):
set_pixel(half,0,0,0)
show()
sleep(seconds)
def handler(signum, frame):
print("\nSignal handler called with signal", signum)
exit(0)
signal.signal(signal.SIGTERM, handler)
signal.signal(signal.SIGINT, handler)
# read run-time options
parser = argparse.ArgumentParser(description="Drive 'blinkt' 8-pixel display.")
parser.add_argument("pattern", help="name of light pattern: \
random[1-3], spacer, reversed_spacer, cylon, pulsed_bar, flashed_bar")
parser.add_argument("r", metavar="r", type=int, help="red channel, 0-255")
parser.add_argument("g", metavar="g", type=int, help="green channel, 0-255")
parser.add_argument("b", metavar="b", type=int, help="blue channel, 0-255")
parser.add_argument("timing", metavar="s", type=float, \
help="rate of binking in seconds")
options = parser.parse_args()
pattern = options.pattern.lower()
r = options.r
g = options.g
b = options.b
s = options.timing
if pattern == "solid":
solid(r,b,g,s)
elif pattern == "random3":
random_lights3()
elif pattern == "random2":
random_lights2()
elif pattern == "random1" or pattern == "random":
random_lights1()
elif pattern == "spacer":
spacer(r,g,b,s)
elif pattern == "reversed_spacer":
reversed_spacer(r,g,b,s)
elif pattern == "cylon":
cylon(r,g,b,s)
elif pattern == "pulsed_bar":
pulsed_bar(r,g,b,s)
elif pattern == "ipfs":
ipfs(r,g,b,s)
elif pattern == "flashed_bar":
flashed_bar(r,g,b,s)
else:
print("Unknown pattern")
exit(1)
exit(0)
IPFS/bw.sh
less -f <(for i in $(ipfs id | jq .Protocols[] | sed -n "s:\"\(.*\)\":\1:p");do echo "${i}"; ipfs stats bw --proto "${i}"; echo "---" ;done )
IPFS/complete-index-single-table.sh
IRCAGE=0 IRCDATE=$(date --date="$IRCAGE days ago" +"%d%m%y") echo '#Techrights full #IPFS index updated just now http://techrights.org/ipfs available as plain text @ http://techrights.org/ipfs/txt #dweb #sharing' ipfs add ~/tr_text_version/* | sed -e 's/added //' | sed -e 's/.txt/\ TEXT (daily bulletin\/IRC log as plain text)/' | sed -e 's/.html/ HTML (full IRC log as HTML)/' > txt echo '<html>' > index.html echo '<link rel="stylesheet" href="http://schestowitz.com/roy.css" type="text/css">' >> index.html echo '<TITLE>Techrights Full IPFS Index</TITLE>' >> index.html echo '<BODY BACKGROUND='http://techrights.org/wp-content/themes/ocadia/images/head.png'>' >> index.html echo '<div align=left>' >> index.html echo '<a href="/">Techrights Home</a> | <a href="/?stories">Techrights Blog</a> | <a href="/txt">Latest Bulletin</a> | <a href="/txt-archives">All Bulletins</a></div>' >> index.html echo '<table align="center" height="100" width="100%" cellspacing="0">' >> index.html echo '' >> index.html echo '<td background="http://techrights.org/wiki/images/b/ba/Techrights-pillars.jpg" align=center valign=center>' >> index.html echo '</td>' >> index.html echo '</table>' >> index.html echo '<p><img src="http://techrights.org/images/ipfs.png" alt="IPFS logo" border="0" align="right" hspace="20" vspace="4" style="padding: 4px 4px 4px 4px;" />' >> index.html echo '<h1>Techrights Full IPFS Index</h1>' >> index.html echo '<a href="txt">As text</a> ' >> index.html echo '<hr />' >> index.html # echo $IRCDATE echo '<table border="1" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> index.html ipfs add ~/tr_text_version/* | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/.txt/ <b\>TEXT<\/b\> (daily IRC log\/bulletin)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> index.html echo '</tbody></table>' >> index.html echo '' >> index.html echo '<HR>' >> index.html echo '<table width=100% bgcolor=#AAAAAA>' >> index.html echo '<tr>' >> index.html echo '<td align=left>' >> index.html echo -n '<FONT size=1 color=white>This page was last modified on ' >> index.html date >> index.html echo -n ' </FONT>' >> index.html echo '<td align=right>' >> index.html echo '<font color=white size=1>Maintained by Roy Schestowitz' >> index.html echo '</td>' >> index.html echo '</tr>' >> index.html echo '</table>' >> index.html echo '</BODY>' >> index.html echo '</HTML>' >> index.html echo '</body>' >> index.html echo '</html>' >> index.html cat index.html # scp -o IdentitiesOnly=yes index.html boycottn@23.161.112.116:/home/boycottn/public_html/ipfs # scp -o IdentitiesOnly=yes txt boycottn@23.161.112.116:/home/boycottn/public_html/ipfs/txt echo '' echo '' echo '' ipfs stats bw
IPFS/chart.sh
#!/bin/bash
# Public Domain, Roy Schestowitz
tail -n60 /home/glr/RateIn > /home/glr/ingraph
tail -n60 /home/glr/RateOut > /home/glr/outgraph
tail -n60 /home/glr/Swarm > /home/glr/swarmgraph
cd /home/glr
# echo -n 'IPFS downstream, 60 minutes: '
echo -n ' ▕ IPFS downstream, 60 mins: ' > ~/status.txt
# echo -n ' IPFS downstream, 60 minutes: ' > ~/status.txt
for index in {2..62..2}
do
# number=$(awk 'NR == 1' ingraph)
number=$(sed "${index}q;d" /home/glr/ingraph)
# echo $number
# if [ $(awk 'NR == $A' test) -gt 0 && $(awk 'NR == $A' test) -ls 10 ]; then echo -n 'a'; fi
# if ((number -gt 0 && number -ls 20)); then echo -n 'a'; fi
if ((number >= 0 && number <= 5)); then echo -n '▁'; fi >> ~/status.txt
if ((number >= 5 && number <= 10)); then echo -n '▂'; fi >> ~/status.txt
if ((number >= 10 && number <= 15)); then echo -n '▃'; fi >> ~/status.txt
if ((number >= 15 && number <= 20)); then echo -n '▄'; fi >> ~/status.txt
if ((number >= 20 && number <= 30)); then echo -n '▅'; fi >> ~/status.txt
if ((number >= 30 && number <= 40)); then echo -n '▆'; fi >> ~/status.txt
if ((number >= 40 && number <= 70)); then echo -n '▇'; fi >> ~/status.txt
if ((number >= 70 && number <= 10000)); then echo -n '█'; fi >> ~/status.txt
done
echo -n ' avg(k/sec) ' >> ~/status.txt
IN=$(count=0; total=0; for i in $( awk '{ print $1; }' /home/glr/ingraph );\
do total=$(echo $total+$i | bc ); \
((count++)); done; echo "scale=2; $total / $count" | bc)
echo -n $IN >> ~/status.txt
echo -n ' ▕ IPFS upstream: ' >> ~/status.txt
# echo -n 'IPFS upstream, 60 minutes: ' >> ~/status.txt
for index in {2..62..2}
do
number=$(sed "${index}q;d" /home/glr/outgraph)
if ((number >= 0 && number <= 5)); then echo -n '▁'; fi >> ~/status.txt
if ((number >= 5 && number <= 10)); then echo -n '▂'; fi >> ~/status.txt
if ((number >= 10 && number <= 15)); then echo -n '▃'; fi >> ~/status.txt
if ((number >= 15 && number <= 20)); then echo -n '▄'; fi >> ~/status.txt
if ((number >= 20 && number <= 25)); then echo -n '▅'; fi >> ~/status.txt
if ((number >= 25 && number <= 30)); then echo -n '▆'; fi >> ~/status.txt
if ((number >= 30 && number <= 40)); then echo -n '▇'; fi >> ~/status.txt
if ((number >= 40 && number <= 10000)); then echo -n '█'; fi >> ~/status.txt
done
echo -n ' avg(k/sec) ' >> ~/status.txt
OUT=$(count=0; total=0; for i in $( awk '{ print $1; }' /home/glr/outgraph );\
do total=$(echo $total+$i | bc ); \
((count++)); done; echo "scale=2; $total / $count" | bc)
echo -n $OUT >> ~/status.txt
echo -n '▕ swarm size (avg): ' >> ~/status.txt
Swarm=$(count=0; total=0; for i in $( awk '{ print $1; }' /home/glr/swarmgraph );\
do total=$(echo $total+$i | bc ); \
((count++)); done; echo "scale=2; $total / $count" | bc)
echo -n $Swarm >> ~/status.txt
echo ' ⟲' >> ~/status.txt
# echo '' >> ~/status.txt
cat ~/status.txt > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
IPFS/.directory-listing-ok
IPFS/update-index.sh
ulimit -Sn 24000
IRCAGE=1
IRCDATE=$(date --date="$IRCAGE days ago" +"%d%m%y")
ISODATE=$(date --date="$IRCAGE days ago" +"%y%m%d")
echo '<hr />' > $IRCDATE.html
echo '<h3>IPFS Mirrors</h3>' >> $IRCDATE.html
# echo $IRCDATE >> $IRCDATE.html
echo '' >> $IRCDATE.html
echo '' >> $IRCDATE.html
echo '<style>' >> $IRCDATE.html
echo ' table#ipfs-table tr:nth-child(even) { background-color:#efefef; border-bottom: 2px solid #aaa; }' >> $IRCDATE.html
echo '</style>' >> $IRCDATE.html
echo '' >> $IRCDATE.html
echo '<table id="ipfs-table" style="border: 1px solid gray; box-shadow: 7px 7px 3px #888888; border-collapse: collapse;"><thead style="border: 2px solid black; text-align:center; font-variant-caps: small-caps; background-color: #DDD;"><tr><td><b>CID</b></td><td><b>Description</b></td><td><b>Object type</b></td></tr></thead><tbody>' >> $IRCDATE.html
ipfs add ~/tr_text_version/* | grep $IRCDATE | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\ <code\><u>/' | sed -e 's/ irc-log-/<\/u><\/code\><\/td\> \<td class="description-ipfs"\>IRC log for /' | sed -e 's/\.txt/\<br \/>(full IRC log as plain\/ASCII <b>text<\/b>)<\/td><td><img src="http:\/\/techrights.org\/images\/irc\/text.png" border="0" hspace="20" vspace="4" width="48" alt="text logs" \/><\/td><\/tr>/' | sed -e 's/.html/\<br \/>(full IRC log as <b>HTML<\/b>)<\/td><td><img src="http:\/\/techrights.org\/images\/irc\/hypertext.png" border="0" hspace="20" vspace="4" width="48" alt="HTML5 logs" \/><\/td><\/tr>/' | sed -e "s/ ${IRCDATE}/ <code>#boycottnovell<\/code>/" | sed -e "s/ social-${IRCDATE}/ <code>#boycottnovell-social<\/code>/" | sed -e "s/ techrights-${IRCDATE}/ <code>#techrights<\/code>/" | sed -e "s/ techbytes-${IRCDATE}/ <code>#techbytes<\/code>/" | grep IRC >> $IRCDATE.html
echo '</tbody></table>' >> $IRCDATE.html
echo '' >> $IRCDATE.html
echo '<p><img src="http://techrights.org/images/ipfs.png" alt="IPFS logo" width="64" border="0" align="right" hspace="20" vspace="4" style="padding: 4px 4px 4px 4px;" />' >> $IRCDATE.html
echo '<h3>Bulletin for Yesterday</h3>' >> $IRCDATE.html
echo '' >> $IRCDATE.html
IRCFULLDATE=$(date --date="$IRCAGE days ago" "+%A, %B %d, %Y")
IRCDATEFILE=techrights-$(date --date="$IRCAGE days ago" +"%Y-%m-%d").txt
echo -n '<a href="http://techrights.org/txt-archives/' >> $IRCDATE.html
echo -n $IRCDATEFILE >> $IRCDATE.html
echo -n '">Local copy</a> | <b>CID</b> (IPFS): <span class="description-ipfs"><code><u>' >> $IRCDATE.html
ipfs add ~/tr_text_version/* | grep .txt | grep $IRCDATEFILE | cut -d\ -f 2 >> $IRCDATE.html
echo '</u></code></span>' >> $IRCDATE.html
BWIn=$(ipfs stats bw | grep TotalIn)
BWOut=$(ipfs stats bw | grep TotalOut)
# get gemini protocol stats
Gemini=$(wc -l /home/gemini/logs/gemini-* | tail -n1)
Pages=$(find /home/gemini/gemini | grep gmi | wc -l)
Gemactive=$(/usr/sbin/service agate status | grep Active)
echo "☞ Gemini requests since start of month: $Gemini • Total number of pages in capsule: $Pages •$Gemactive" > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
sleep 60
echo "☞ IPFS local node stats (bandwidth since last reset) calculated. $BWIn • $BWOut" > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
sleep 60
echo '☞ New daily bulletin is now being generated and assembled.' > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
ipfs add ~/tr_text_version/* | grep .txt | grep $IRCDATEFILE | cut -d\ -f 2 > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
echo '☞ New daily bulletin has just been added to IPFS, hereon retrievable with the CID above.' > /home/glr/ii-1.8/techrightslocal/irc.techrights.org/#techrights/in
cat $IRCDATE.html
cp $IRCDATE.html /home/links/ipfs/$ISODATE.html
cp output.txt /home/links/ipfs/
# Below is one of several older versions (one page for all CIDs), now deprecated due to size constraints
# ./complete-index-new.sh
# proceed to making the Web pages
./complete-index-split.sh
IPFS/startipfs.sh
#!/bin/bash # PATH=/home/glr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games #/home/glr/bin/ipfs daemon > /dev/null 2>&1 killall -9 ipfs sleep 30 /home/glr/bin/ipfs daemon --routing=dhtclient > /dev/null 2>&1 &
IPFS/complete-index-split.sh
IRCAGE=0
IRCDATE=$(date --date="$IRCAGE days ago" +"%d%m%y")
echo '#Techrights full #IPFS index updated just now http://techrights.org/ipfs available as plain text @ http://techrights.org/ipfs/txt #dweb #sharing'
ipfs add ~/tr_text_version/* | sed -e 's/added //' | sed -e 's/\.txt/\ TEXT (daily bulletin\/IRC log as plain text)/' | sed -e 's/.html/ HTML (full IRC log as HTML)/' > txt
# Make Gemini archive
echo '# Archive of All IPFS Objects' > /home/gemini/gemini/ipfs/index.gmi
echo 'This page is automatically updated every night at around 3AM GMT' >> /home/gemini/gemini/ipfs/index.gmi
echo 'Please kindly consider helping Techrights by pinning any of the CIDs below. The greater the spread and the capacity, the more robust we become.' >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
echo '=> /ipfs/primer/ IPFS primer' >> /home/gemini/gemini/ipfs/index.gmi
echo '=> / back to Techrights (Main Index)' >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
echo '## Daily Bulletins' >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
awk '/ techrights-/{sub( techrights-/," TR "); sub(/TEXT.*$/,""); print "* " $0}' txt >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
echo '## IRC Logs' >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
awk '!/ techrights-/ {sub(/(.*$/,""); sub(/ irc-log-/," "); print "* " $0}' txt >> /home/gemini/gemini/ipfs/index.gmi
echo '' >> /home/gemini/gemini/ipfs/index.gmi
echo '=> / back to Techrights (Main Index)' >> /home/gemini/gemini/ipfs/index.gmi
# Move on to Web pages
echo '<html>' > index.html
echo '<style>' >> index.html
echo ' table#ipfs-table tr:nth-child(even) { background-color:#efefef; border-bottom: 2px solid #aaa; }' >> index.html
echo ' table#ipfs-table tr:nth-child(odd) { background-color:#9f9f9f; border-bottom: 2px solid #aaa; }' >> index.html
echo ' table#ipfs-table a:after{' >> index.html
echo " content: ' ' attr(href);" >> index.html
echo ' font-style:italic;' >> index.html
echo ' color:#333;' >> index.html
echo ' }' >> index.html
echo '</style>' >> index.html
echo '<link rel="stylesheet" href="http://schestowitz.com/roy.css" type="text/css">' >> index.html
echo '<TITLE>Techrights Full IPFS Index</TITLE>' >> index.html
echo '<BODY BACKGROUND='http://techrights.org/wp-content/themes/ocadia/images/head.png'>' >> index.html
echo '<div align=left>' >> index.html
echo '<a href="/">Techrights Home</a> | <a href="/?stories">Techrights Blog</a> | <a href="/txt">Latest Bulletin</a> | <a href="/txt-archives">All Bulletins</a></div>' >> index.html
echo '<table align="center" height="291" width="100%" cellspacing="0">' >> index.html
echo '' >> index.html
echo '<td background="/images/ipfs-universe-techrights.png" align=center valign=center>' >> index.html
echo '</td>' >> index.html
echo '</table>' >> index.html
echo '<p><img src="http://techrights.org/images/ipfs.png" alt="IPFS logo" border="0" align="right" hspace="20" vspace="4" style="padding: 4px 4px 4px 4px;" />' >> index.html
echo '<h1>Techrights Full IPFS Index</h1>' >> index.html
echo '<a href="txt">All as text</a> | <a href="index.html">Main index</a> | <a href="bulletins.html">Bulletins</a> | <a href="techrights.html"><code>#techrights</code></a> | <a href="techbytes.html"><code>#techbytes</code></a> | <a href="boycottnovell.html"><code>#boycottnovell</code></a> | <a href="social.html"><code>#boycottnovell-social</code></code></a>' >> index.html
echo '<br /><br />Please kindly consider <a href="http://techrights.org/2020/11/28/adopting-ipfs/">helping Techrights by pinning any (or all) of the CIDs below</a>. The greater the spread and the capacity, the more robust we become.' >> index.html
echo '<hr />' >> index.html
cp index.html techrights.html
cp index.html techbytes.html
cp index.html boycottnovell.html
cp index.html social.html
cp index.html bulletins.html
echo '<h3>Daily Bulletins</h3>' >> index.html
echo '<h3>Daily Bulletins</h3>' >> bulletins.html
# echo $IRCDATE
echo '<a href="bulletins.html">☞ Full bulletins archive</a>' >> index.html
echo '' >> index.html
echo '<table border="1" id="ipfs-table" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> bulletins.html
# ipfs add ~/tr_text_version/* | grep techrights-202 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (bulletin)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> bulletins.html
# ipfs add ~/tr_text_version/* | grep techrights-202 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\><a href="\/txt-archives\techrights-/' | sed -e 's/\.txt/.txt/"\>Local copy<\/a\> <b\>TEXT<\/b\> (bulletin)<\/tr>/' | sed -e 's/.html/\<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> bulletins.html
ipfs add ~/tr_text_version/* | grep techrights-202 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\><a href="\/txt-archives\/techrights-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (bulletin)<\/tr>/' | sed -e 's/.html/\<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> bulletins.html
echo '</tbody></table>' >> bulletins.html
echo '' >> bulletins.html
echo '<h3>Techrights IRC Logs</h3>' >> index.html
echo '<h3>Techrights IRC Logs</h3>' >> techrights.html
# echo $IRCDATE
echo '<a href="techrights.html">☞ Full <code>#techrights</code> archive</a>' >> index.html
echo '' >> index.html
echo '<table border="1" id="ipfs-table" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> techrights.html
# ipfs add ~/tr_text_version/* | grep log-techrights | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> techrights.html
ipfs add ~/tr_text_version/* | grep log-techrights | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-techrights-/\<a href="\/irc-archives\/irc-log-techrights-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> techrights.html
echo '</tbody></table>' >> techrights.html
echo '' >> techrights.html
echo '<h3>TechBytes IRC Logs</h3>' >> index.html
echo '<h3>TechBytes IRC Logs</h3>' >> techbytes.html
# echo $IRCDATE
echo '<a href="techbytes.html">☞ Full <code>#techbytes</code> archive</a>' >> index.html
echo '' >> index.html
echo '<table border="1" id="ipfs-table" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> techbytes.html
# ipfs add ~/tr_text_version/* | grep log-techbytes | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> techbytes.html
ipfs add ~/tr_text_version/* | grep log-techbytes | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-techbytes-/\<a href="\/irc-archives\/irc-log-techbytes-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> techbytes.html
echo '</tbody></table>' >> techbytes.html
echo '' >> techbytes.html
echo '<h3>BoycottNovell IRC Logs</h3>' >> index.html
echo '<h3>BoycottNovell IRC Logs</h3>' >> boycottnovell.html
# echo $IRCDATE
echo '<a href="boycottnovell.html">☞ Full <code>#boycottnovell</code> archive</a>' >> index.html
echo '' >> index.html
echo '<table border="1" id="ipfs-table" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> boycottnovell.html
# ipfs add ~/tr_text_version/* | grep log-0 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
# ipfs add ~/tr_text_version/* | grep log-1 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
# ipfs add ~/tr_text_version/* | grep log-2 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
# ipfs add ~/tr_text_version/* | grep log-3 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
ipfs add ~/tr_text_version/* | grep log-0 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-/\<a href="\/irc-archives\/irc-log-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
ipfs add ~/tr_text_version/* | grep log-1 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-/\<a href="\/irc-archives\/irc-log-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
ipfs add ~/tr_text_version/* | grep log-2 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-/\<a href="\/irc-archives\/irc-log-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
ipfs add ~/tr_text_version/* | grep log-3 | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-/\<a href="\/irc-archives\/irc-log-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> boycottnovell.html
echo '</tbody></table>' >> boycottnovell.html
echo '' >> boycottnovell.html
echo '<h3>Social IRC Logs</h3>' >> index.html
echo '<h3>Social IRC Logs</h3>' >> social.html
# echo $IRCDATE
echo '<a href="social.html">☞ Full <code>#boycottnovell-social</code> archive</a>' >> index.html
echo '' >> index.html
echo '<table border="1" id="ipfs-table" width="100%" cellspacing="1"><thead><tr><td><b>CID</b></td><td><b>File</b></td></tr><tbody>' >> social.html
# ipfs add ~/tr_text_version/* | grep log-social | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/ techrights-/<\/code\><\/td\> \<td class="description-ipfs"\>techrights-/' | sed -e 's/\.txt/ <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/.html/\ <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> social.html
ipfs add ~/tr_text_version/* | grep log-social | sed -e 's/added /\<tr\>\<td class="ipfs-cid"\>\<code\>/' | sed -e 's/ irc-/<\/code\><\/td\> \<td class="description-ipfs"\>irc-/' | sed -e 's/irc-log-social-/\<a href="\/irc-archives\/irc-log-social-/' | sed -e 's/\.txt/\.txt\"\>Local copy<\/a\> <b\>TEXT<\/b\> (daily IRC log)<\/tr>/' | sed -e 's/\.html/\.html\"\>Local copy<\/a\> <b\>HTML<\/b\> (full IRC log)<\/tr>/' >> social.html
echo '</tbody></table>' >> social.html
echo '' >> social.html
echo '<HR>' >> index.html
echo '<table width=100% bgcolor=#AAAAAA>' >> index.html
echo '<tr>' >> index.html
echo '<td align=left>' >> index.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> index.html
date >> index.html
echo -n ' </FONT>' >> index.html
echo '<td align=right>' >> index.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> index.html
echo '</td>' >> index.html
echo '</tr>' >> index.html
echo '</table>' >> index.html
echo '</BODY>' >> index.html
echo '</HTML>' >> index.html
echo '</body>' >> index.html
echo '</html>' >> index.html
echo '<HR>' >> bulletins.html
echo '<table width=100% bgcolor=#AAAAAA>' >> bulletins.html
echo '<tr>' >> bulletins.html
echo '<td align=left>' >> bulletins.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> bulletins.html
date >> bulletins.html
echo -n ' </FONT>' >> bulletins.html
echo '<td align=right>' >> bulletins.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> bulletins.html
echo '</td>' >> bulletins.html
echo '</tr>' >> bulletins.html
echo '</table>' >> bulletins.html
echo '</BODY>' >> bulletins.html
echo '</HTML>' >> bulletins.html
echo '</body>' >> bulletins.html
echo '</html>' >> bulletins.html
echo '<HR>' >> techrights.html
echo '<table width=100% bgcolor=#AAAAAA>' >> techrights.html
echo '<tr>' >> techrights.html
echo '<td align=left>' >> techrights.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> techrights.html
date >> techrights.html
echo -n ' </FONT>' >> techrights.html
echo '<td align=right>' >> techrights.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> techrights.html
echo '</td>' >> techrights.html
echo '</tr>' >> techrights.html
echo '</table>' >> techrights.html
echo '</BODY>' >> techrights.html
echo '</HTML>' >> techrights.html
echo '</body>' >> techrights.html
echo '</html>' >> techrights.html
echo '<HR>' >> techbytes.html
echo '<table width=100% bgcolor=#AAAAAA>' >> techbytes.html
echo '<tr>' >> techbytes.html
echo '<td align=left>' >> techbytes.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> techbytes.html
date >> techbytes.html
echo -n ' </FONT>' >> techbytes.html
echo '<td align=right>' >> techbytes.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> techbytes.html
echo '</td>' >> techbytes.html
echo '</tr>' >> techbytes.html
echo '</table>' >> techbytes.html
echo '</BODY>' >> techbytes.html
echo '</HTML>' >> techbytes.html
echo '</body>' >> techbytes.html
echo '</html>' >> techbytes.html
echo '<HR>' >> boycottnovell.html
echo '<table width=100% bgcolor=#AAAAAA>' >> boycottnovell.html
echo '<tr>' >> boycottnovell.html
echo '<td align=left>' >> boycottnovell.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> boycottnovell.html
date >> boycottnovell.html
echo -n ' </FONT>' >> boycottnovell.html
echo '<td align=right>' >> boycottnovell.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> boycottnovell.html
echo '</td>' >> boycottnovell.html
echo '</tr>' >> boycottnovell.html
echo '</table>' >> boycottnovell.html
echo '</BODY>' >> boycottnovell.html
echo '</HTML>' >> boycottnovell.html
echo '</body>' >> boycottnovell.html
echo '</html>' >> boycottnovell.html
echo '<HR>' >> social.html
echo '<table width=100% bgcolor=#AAAAAA>' >> social.html
echo '<tr>' >> social.html
echo '<td align=left>' >> social.html
echo -n '<FONT size=1 color=white>This page was last modified on ' >> social.html
date >> social.html
echo -n ' </FONT>' >> social.html
echo '<td align=right>' >> social.html
echo '<font color=white size=1>Maintained by Roy Schestowitz' >> social.html
echo '</td>' >> social.html
echo '</tr>' >> social.html
echo '</table>' >> social.html
echo '</BODY>' >> social.html
echo '</HTML>' >> social.html
echo '</body>' >> social.html
echo '</html>' >> social.html
cat index.html
# scp -o IdentitiesOnly=yes index.html boycottn@23.161.112.116:/home/boycottn/public_html/ipfs
# scp -o IdentitiesOnly=yes txt boycottn@23.161.112.116:/home/boycottn/public_html/ipfs/txt
echo ''
echo ''
echo ''
ipfs stats bw
IPFS/copy-tr-to-gemini-old-and-obsolete.sh
cp -u /home/glr/tr_text_version/* /home/gemini/gemini/tr_text_version