Skip to content

Instantly share code, notes, and snippets.

View zet4's full-sized avatar
🏠
Working from home

Aleksandr Tihomirov zet4

🏠
Working from home
View GitHub Profile
package nanoui
import (
"go.awoo.fun/of/pkg/nanovg"
)
// Handler is executed whenever an event occours, use type-switching to get the exact event you want.
type Handler interface {
Handle(interface{}) error
}
#cloud-config
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJRKWPGyfCoJNsDAQ0j1IeUyP7V+zzojuvT4sl4SicQ8
rancher:
state:
autoformat:
- /dev/sda
- /dev/sdb
@zet4
zet4 / sysctl
Last active April 8, 2019 15:44
sysctl -p tweaks for a VM on SSD/1GE+
# Reduce tendancy to swap
vm.swappiness=10
vm.dirty_ratio = 40
vm.dirty_background_ratio = 10
vm.vfs_cache_pressure=50
# Network Caches
net.core.default_qdisc=fq_codel
net.core.netdev_max_backlog = 5000
net.core.optmem_max = 25165824
@zet4
zet4 / Caddyfile
Created March 7, 2017 21:29
Hugo Blog
:3000 {
root /var/www/html
minify
gzip
header /js /css /img Cache-Control "max-age=2592000"
header / {
X-Frame-Options DENY
Content-Security-Policy "default-src 'self'; script-src 'self' oss.maxcdn.com maxcdn.bootstrapcdn.com fonts.googleapis.com cdnjs.cloudflare.com; style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com cdnjs.cloudflare.com;"
@zet4
zet4 / main.go
Created February 22, 2017 20:58
Goms
package main // import "go.zeta.pm/goms"
import (
"github.com/pressly/chi"
)
func main() {
root := chi.NewRouter()
root.Route("api", func(r chi.Router) {
@zet4
zet4 / Arke_CLA.md
Last active February 12, 2017 19:48 — forked from overheadhunter/Cryptomator_CLA.md
Arke Individual Contributor License Agreement

###Arke Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by the Arke developers (Tobias Hagemann, Markus Kreusch and Sebastian Stenzel) (“Arke”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Arke in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact hunter@zeta.pm.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Ark

{
"discord_token": "Bot TOKENHERE",
"github_user": "YOURUSERNAMEHERE",
"github_token": "TOKENHERE",
"repo": "TARGETREPOHERE"
}
@zet4
zet4 / nitro-emote-dump.go
Created December 24, 2016 12:40
Bubbie pls
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
.form.settings.user-settings-modal .settings-actions:before,
.lastversion:after {
content: "Current version: v1.8.0";
}
.app:after {
content: "Welcome back to Discord\AHave a nice day :D";
}
/*-----GENERAL KEYFRAMES-----*/
@zet4
zet4 / sse.go
Created December 5, 2016 19:03 — forked from schmohlio/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"