commit 807e55eca41a70e7f16267e103ec84a97fbdf12f Author: Serge Bazanski Date: Mon Jan 20 04:08:40 2025 +0100 Add old junk. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..5c93f45 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e698f5 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Vintage Onion Stuff +=== + +Old stuff from previous editions. Found in the bowels of [hscloud](https://cs.hackerspace.pl/hscloud). Kept as a historical curiosity. diff --git a/landing/BUILD.bazel b/landing/BUILD.bazel new file mode 100644 index 0000000..76e9c10 --- /dev/null +++ b/landing/BUILD.bazel @@ -0,0 +1,52 @@ +load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_binary") +load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push") +load("@rules_pkg//pkg:tar.bzl", "pkg_tar") +load("@rules_go//go:def.bzl", "go_library") +load("@rules_go//extras:embed_data.bzl", "go_embed_data") + +go_embed_data( + name = "static", + srcs = [ + "cebula2020.jpeg", + "hotel-orle.jpg", + "index.html", + "style/main.css", + ], + package = "static", +) + +# keep +go_library( + name = "static_go", + srcs = [":static"], + importpath = "code.hackerspace.pl/hscloud/hswaw/cebulacamp/landing/static", + visibility = ["//visibility:public"], +) + +platform_transition_binary( + name = "backend_x86", + binary = "//hswaw/cebulacamp/landing/backend", + target_platform = "@rules_go//go/toolchain:linux_amd64", +) + +pkg_tar( + name = "layer_bin", + srcs = [":backend_x86"], + package_dir = "/hscloud/hswaw/cebulacamp/landing/", +) + +oci_image( + name = "runtime", + base = "@prodimage-bionic-oci", + tars = [ + ":layer_bin", + ], + entrypoint = ["/hscloud/hswaw/cebulacamp/landing/backend"], +) + +oci_push( + name = "push", + image = ":runtime", + remote_tags = ["1680303245"], + repository = "registry.k0.hswaw.net/radex/cebulacamp-landing", +) diff --git a/landing/backend/BUILD.bazel b/landing/backend/BUILD.bazel new file mode 100644 index 0000000..39cef2c --- /dev/null +++ b/landing/backend/BUILD.bazel @@ -0,0 +1,18 @@ +load("@rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "backend_lib", + srcs = ["main.go"], + importpath = "code.hackerspace.pl/hscloud/hswaw/cebulacamp/landing/backend", + visibility = ["//visibility:private"], + deps = [ + "//hswaw/cebulacamp/landing:static_go", # keep + "@com_github_golang_glog//:glog", + ], +) + +go_binary( + name = "backend", + embed = [":backend_lib"], + visibility = ["//visibility:public"], +) diff --git a/landing/backend/main.go b/landing/backend/main.go new file mode 100644 index 0000000..1416d07 --- /dev/null +++ b/landing/backend/main.go @@ -0,0 +1,49 @@ +package main + +import ( + "flag" + "fmt" + "mime" + "net/http" + "strings" + + "github.com/golang/glog" + + "code.hackerspace.pl/hscloud/hswaw/cebulacamp/landing/static" +) + +var ( + flagBind string +) + +func init() { + flag.Set("logtostderr", "true") +} + +func main() { + flag.StringVar(&flagBind, "bind", "0.0.0.0:8080", "Address at which to serve HTTP requests") + flag.Parse() + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + path := r.URL.Path + if path == "/" { + path = "/index.html" + } + path = strings.TrimPrefix(path, "/") + staticPath := fmt.Sprintf("hswaw/cebulacamp/landing/%s", path) + if data, ok := static.Data[staticPath]; ok { + parts := strings.Split(path, ".") + ext := fmt.Sprintf(".%s", parts[len(parts)-1]) + t := mime.TypeByExtension(ext) + w.Header().Set("Content-Type", t) + w.Write(data) + } else { + http.NotFound(w, r) + } + }) + + glog.Infof("Starting up at %v", flagBind) + err := http.ListenAndServe(flagBind, nil) + if err != nil { + glog.Exit(err) + } +} diff --git a/landing/cebula2020.jpeg b/landing/cebula2020.jpeg new file mode 100644 index 0000000..1025ab8 Binary files /dev/null and b/landing/cebula2020.jpeg differ diff --git a/landing/hotel-orle.jpg b/landing/hotel-orle.jpg new file mode 100644 index 0000000..43638dc Binary files /dev/null and b/landing/hotel-orle.jpg differ diff --git a/landing/index.html b/landing/index.html new file mode 100644 index 0000000..31e7753 --- /dev/null +++ b/landing/index.html @@ -0,0 +1,70 @@ + + +Cebulacamp 2021 + + +
+

Kongres Komunikacyjny Cebula 2021

+

Testing in production pandemic

+

2021/10/01 - 2021/10/03

+

Hotel Orle, GdaƄsk

+

+ Three days of under-organized hacking and talking in a hotel in northern Poland. We might talk about the Polish hacker scene. We might get technical. We might even speak mostly Polish, but we'll do our best to welcome people who don't speak encrypted. We're friendly. +

+

+ Tentatively planned. Still arranging details, including hygiene/vaccination/test rules. Stay tuned. +

+
+
+
+ +
+
+
+
+

Tickets

+

+ If you already have tickets from 2020: they're still valid. We also have some extra tickets for sale on our ticket shop available under September 1st. Get them while they're hot! +

+

+ If you don't have a valid tickets.hackerspace.pl order marked as 'Paid', you do not have a ticket. If you paid the hotel and don't have an order marked as 'Paid', get in touch with us ASAP, or we will not have a room for you. +

+

+ An all-inclusive ticket (bed in shared room for two nights, food for three days) is 500 PLN. If you want a solo room, or to share a room with someone in particular, contact cebula@hackerspace.pl. +

+

+ +

+
+
+
+
+
+
+

CFP

+

+ Yes, there will be some talks. No, they won't be very formal. +

+

+ Please take part in Cebula Camp! Submit your talks, or, Look at Sneak Peaks. +

+
+
+
+
+
+
+

Contact

+

+ Reach the organizers at cebula@hackerspace.pl. Reach the hotel (in case of room requests, etc) at info@orle.com.pl, and CC cebula@hackerspace.pl if you so wish. +

+

+ irc: #cebulacamp on Libera.chat +

+

+ Cebula Camp is an inclusive event. Be excellent to each other, or stay home. Harassment and discrimination are not welcome or tolerated, online or AFK. If you're a subject, observer, or third-party to any of these, please, get in touch, write to cebula@hackerspace.pl or q3k personally. +

+
+
+
+
diff --git a/landing/kube/prod.jsonnet b/landing/kube/prod.jsonnet new file mode 100644 index 0000000..1c58786 --- /dev/null +++ b/landing/kube/prod.jsonnet @@ -0,0 +1,49 @@ +local kube = import "../../../../kube/hscloud.libsonnet"; + +{ + local top = self, + local cfg = self.cfg, + + cfg:: { + name: 'cebulacamp', + namespace: 'cebulacamp', + domain: 'cebula.camp', + image: 'registry.k0.hswaw.net/q3k/cebulacamp-landing:315532800-bbf56cf7e14df954dcddedfe44c967246f11b72c', + }, + + local ns = kube.Namespace(cfg.namespace), + + deployment: ns.Contain(kube.Deployment(cfg.name)) { + spec+: { + template+: { + spec+: { + containers_: { + default: kube.Container("default") { + image: cfg.image, + command: [ + "/hscloud/hswaw/cebulacamp/landing/backend", + "-logtostderr", + ], + resources: { + requests: { cpu: "25m", memory: "64Mi" }, + limits: { cpu: "500m", memory: "128Mi" }, + }, + ports_: { + http: { containerPort: 8080 }, + }, + }, + }, + }, + }, + }, + }, + + service: ns.Contain(kube.Service(cfg.name)) { + target:: top.deployment, + }, + + ingress: ns.Contain(kube.TLSIngress(cfg.name)) { + hosts:: [cfg.domain], + target:: top.service, + }, +} diff --git a/landing/static/gomod-generated-placeholder.go b/landing/static/gomod-generated-placeholder.go new file mode 100644 index 0000000..4a9e036 --- /dev/null +++ b/landing/static/gomod-generated-placeholder.go @@ -0,0 +1 @@ +package static diff --git a/landing/style/main.css b/landing/style/main.css new file mode 100644 index 0000000..8ed6d76 --- /dev/null +++ b/landing/style/main.css @@ -0,0 +1,148 @@ +.hero { + color: rgba(223, 219, 244, 1);; + background-color: rgba(0, 0, 0, 1);; + text-align: center; + padding: 5em; +} + +@media only screen and (max-width: 1281px) { + .hero { + padding: 1em !important; + } + main { + width: 90% !important; + } + section { + margin: 0 0 1em 0 !important; + padding: 0em !important; + } + .hotel-pic { + width: 100% !important; + } +} + +* { + box-sizing: border-box; + /* TODO: find what's causing weird top belt */ + margin: 0; + padding: 0; +} + +body { + width: 100%; + height: 100%; + margin: 0; + background-color: rgba(0, 0, 0, 1);; +} + +main { + width: 60%; + margin: 0 auto; +} + +/* TODO: Maybe some fun with how text is laid */ + +section.starter { + border: none !important; + padding: 1em; +} + +section.starter img { + width: 100% +} + +section { + color: rgba(223, 219, 244, 1);; + /* TODO: have some fun with transparency :D */ + background-color: rgba(0, 0, 0, 1);; + padding-bottom: 5em; + word-wrap: break-word; + padding: 3em; +} + +section:nth-child(2) { + margin: 0em 1em 0em -2em; +} + +section:nth-child(3) { + margin: -3em -1em 3em 1em; +} + +section:nth-child(4) { + margin: -6em -3em 6em 4em; +} + +section:nth-child(5) { + margin: -9em -5em 9em 7em; +} + +section:nth-child(6) { + margin: -12em -7em 12em 10em; +} + +section:nth-child(7) { + margin: -15em -9em 15em 13em; +} + +section p { + margin: 1em; +} + +section h2 { + display: inline-block; + margin: 1em 1em 1em 0em; + padding: .5em; +} + +section:nth-child(even) { + border: 8px solid rgba(173, 35, 101, 1);; +} + +section:nth-child(even) h2 { + background-color: rgba(173, 35, 101, 1);; +} + +section:nth-child(even) a { + color: rgba(173, 35, 101, 1);; +} + +section:nth-child(even) a:hover { + color: rgba(61, 140, 208, 1);; +} + +section:nth-child(odd) { + border: 8px solid rgba(61, 140, 208, 1);; +} + +section:nth-child(odd) h2 { + background-color: rgba(61, 140, 208, 1);; +} + +section:nth-child(odd) a { + color: rgba(61, 140, 208, 1);; +} + +section:nth-child(odd) a:hover { + color: rgba(173, 35, 101, 1);; +} + +/* testing area */ +.acc0 { + color: rgba(61, 140, 208, 1);; +} + +.acc1 { + color: rgba(232, 227, 33, 1);; +} + +.acc2 { + color: rgba(173, 35, 101, 1);; +} + +.hotel-pic +{ + width: 50%; + display: block; + margin: .5em auto; + width: 50%; +}