Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
all: remove the ghostbin brand, genercize it
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed May 14, 2019
1 parent 73911e9 commit 7c12db4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 68 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "ghostbin",
"version": "0.0.1",
"description": "Ghostbin",
"description": "Spectre",
"main": "main.go",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
6 changes: 3 additions & 3 deletions templates/_lib.tmpl
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8">

{{with subtemplate . "title"}}
<title>{{.}} - Ghostbin</title>
<title>{{.}} - {{brand}}</title>
{{else}}
<title>Ghostbin</title>
<title>{{brand}}</title>
{{end}}
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down Expand Up @@ -104,7 +104,7 @@ It looks like you've stumbled upon a page (<strong>{{.Page}}</strong>) that shou
<h4><i class="icon icon-user"> </i>Account</h4>
{{partial . "login_logout"}}
<h4><i class="icon icon-wrench"> </i>Miscellanea</h4>
<p><a target="_blank" href="/about">About Ghostbin</a> <small>(in a new window)</small>
<p><a target="_blank" href="/about">About {{brand}}</a> <small>(in a new window)</small>
<br><a href="/session">My Pastes</a></p>
</div>
<div class="modal-footer">
Expand Down
2 changes: 1 addition & 1 deletion templates/_user.tmpl
Expand Up @@ -9,7 +9,7 @@ $("button#logout").on("click", function() {
});
</script>
{{else}}
<p><small>Ghostbin user accounts exist solely for keeping track of your own pastes.<br>No personally-identifying information is
<p><small>{{brand}} user accounts exist solely for keeping track of your own pastes.<br>No personally-identifying information is
retained as part of your user account. Promise.</small></p>
<div class="well well-small">
<form id="loginForm" action="">
Expand Down
65 changes: 3 additions & 62 deletions templates/about.tmpl
Expand Up @@ -3,72 +3,13 @@
<div class="paste-toolbox">
{{template "home-button"}}
<span class="paste-title">
<strong>About Ghostbin</strong>
<strong>About {{brand}}</strong>
</span>
</div>
<div class="content">
<h1>Ghostbin</h1>
<h1>{{brand}}</h1>
<p>
Ghostbin is a paste service, and I&rsquo;m going to skip explaining
precisely what that is&mdash;it&rsquo;s fairly obvious. The real
interesting questions are &ldquo;why did you build it?&rdquo; and
&ldquo;where did I get all these bees?&rdquo;
{{brand}} is a paste service engine.
</p>
<p>
For the first, I&rsquo;d like to first list my inspirations and
driving motives. When I started, I&rsquo;d recently fallen in love
with a small font named <strong>Envy Code R</strong>. I&rsquo;d wanted
to put together a paste service (under my own control) for some time,
and Envy provided the final impetus; It made my code look
awesome&mdash;more awesome, in fact, than my code truly was.
</p>
<p>
At nearly the same time, I&rsquo;d decided that I wanted to learn Go.
The confluence of these two endeavours could not have been more
piquant.
</p>
<p>
Other popular, functional and attractive pastebin services certainly
do exist, but I found them to be somewhat lacking:
<ul>
<li>Pastie was cool, but the ability to delete private pastes
eventually evaporated. Later, the ability to even <em>edit</em>
private pastes&mdash;which was rather useful for affecting a
simulacrum of deletion&mdash;vanished. Pastie is not
private by default.</li>

<li>Pastee is private by default and provides both encryption and
expiration, but it looks like it tumbled from the proverbial <em>ugly
tree</em>. It&rsquo;s functional, though, and that&rsquo;s great. It
seems to use <em>pygments</em>, much like
Ghostbin, but it doesn&rsquo;t appear to have an updated language list.</li>

<li>Hastebin looks neat. I have no qualms with it.</li>
</ul>
</p>
<p>
Ghostbin is an attempt at not only solving the above, but also solving
some issues in the industry such as, but not limited to, me not
knowing Go. It&rsquo;s <a href="http://git.howett.net/paste.git">open-source</a>
and I don&rsquo;t think it&rsquo;ll be going anywhere any time soon.
It supports encryption, expiration, pastes up to one megabyte, and
about six billion languages. Well, some hundreds at the very least.
Also, doesn&rsquo;t that paint job look simply dandy?
</p>
<p>
And&mdash;get your bees away from me. I don&rsquo;t even know what you
were expecting in bringing them here.
</p>
<p class="signature">
Dustin L. Howett
</p>
<h1>Acknowledgements</h1>
<ul>
<li>irc.saurik.com/#theos, for momentum and necessary resistance</li>
<li><a href="http://pygments.org">pygments</a>, for syntax highlighting</li>
<li><a href="http://golang.org">Go</a>, for prose</li>
<li>the usual smattering of web technologies such as bootstrap
and jQuery, for the facade</li>
</ul>
</div>
{{end}}
13 changes: 12 additions & 1 deletion util.go
Expand Up @@ -23,6 +23,8 @@ import (
const (
EnvironmentDevelopment string = "dev"
EnvironmentProduction string = "production"

SPECTRE_DEFAULT_BRAND string = "Spectre"
)

type ReadCloser struct {
Expand Down Expand Up @@ -201,13 +203,22 @@ func Env() string {
}

func init() {
environment = os.Getenv("GHOSTBIN_ENV")
environment = os.Getenv("SPECTRE_ENV")
if environment != EnvironmentProduction {
environment = EnvironmentDevelopment
}

brand := os.Getenv("SPECTRE_BRAND")
if brand == "" {
brand = SPECTRE_DEFAULT_BRAND
}

RegisterTemplateFunction("env", func() string { return environment })

RegisterTemplateFunction("brand", func() string {
return brand
})

sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGHUP)
go func() {
Expand Down

2 comments on commit 7c12db4

@resynth1943
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just rubbing salt in the wound? Why?

@DHowett
Copy link
Owner Author

@DHowett DHowett commented on 7c12db4 Jun 7, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.