small pixel drawing of a pufferfish j3s.sh

Add travel checklist to tools, update ip
Jesse Olson j3s@c3f.net
Fri, 08 Apr 2022 06:08:27 +0000
commit

280a2517e4c8bae5d16045a6e11c74bd661f7d85

parent

c7a056610bd87a01af8422e82de0900c8f885054

3 files changed, 43 insertions(+), 4 deletions(-)

jump to
M main.gomain.go

@@ -195,6 +195,11 @@ func ipHandler(w http.ResponseWriter, r *http.Request) {

w.Header().Set("Content-Type", "text/plain") // this header is always set by tlstunnel (MAYBE) // so we can PROBABLY expect it to be here IDFK RLY - // ITS LATE AND IM TIRED - fmt.Fprintf(w, r.Header.Get("X-Forwarded-For")+"\n") + // IT'S LATE AND IM TIRED + ip := r.Header.Get("X-Forwarded-For") + if ip != nil { + fmt.Fprintf(w, r.Header.Get("X-Forwarded-For")+"\n") + } else { + fmt.Fprintf(w, "not found\n") + } }
M templates/tools.htmltemplates/tools.html

@@ -1,7 +1,8 @@

{{define "title"}}little silly tools{{end}} {{define "body"}} <p>heres some of my toolz</p> -<p><a href="/age.html">/age - age encryptor</a></p> -<p><a href="/feeds">/feeds - personal rss feed</a></p> <p><a href="/ip">/ip - get ur public ip</a></p> +<p><a href="/feeds">my personal rss feed</a></p> +<p><a href="/age.html">age encryptor</a></p> +<p><a href="/travel.html">my travel checklist</a></p> {{end}}
A templates/travel.html

@@ -0,0 +1,33 @@

+{{define "title"}}me{{end}} +{{define "body"}} +<p>this is my travel checklist. you can use it too if you want i guess.</p> +<h4>clothes</h4> +<li><input type="checkbox">one shirt/socks/underwear per day</li> +<li><input type="checkbox">a few pairs of pants</li> +<li><input type="checkbox">a pairs of shorts</li> +<li><input type="checkbox">a sweatshirt</li> +<li><input type="checkbox">swim trunks</li> +<li><input type="checkbox">gloves/coat/hat</li> +<li><input type="checkbox">glasses</li> +<h4>critical shit</h4> +<li><input type="checkbox">passport</li> +<li><input type="checkbox">wallet</li> +<h4>meds</h4> +<li><input type="checkbox">ibuprofen</li> +<li><input type="checkbox">pepto-bismol</li> +<h4>hygeine</h4> +<li><input type="checkbox">toothbrush/toothpaste in a bag</li> +<li><input type="checkbox">deoderant</li> +<li><input type="checkbox">razor</li> +<li><input type="checkbox">lotion</li> +<li><input type="checkbox">water bottle</li> +<li><input type="checkbox">masks</li> +<h4>tech</h4> +<li><input type="checkbox">laptop/charger</li> +<li><input type="checkbox">camera/charger</li> +<li><input type="checkbox">phone/charger</li> +<li><input type="checkbox">ebook reader/charger</li> +<li><input type="checkbox">headset/keyboard/mouse</li> +<li><input type="checkbox">monitor/hdmi cable</li> +<li><input type="checkbox">controller</li> +{{end}}