Skip to content

Instantly share code, notes, and snippets.

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

Nick Gerakines ngerakines

🏠
Working from home
View GitHub Profile
@ngerakines
ngerakines / _etc_nginx_nginx.conf
Created December 15, 2020 20:13
Integrate your Pleroma blocklist with nginx (replace _ with / for original filenames)
# Your main nginx config file.
http {
# Existing configuration…
# Enable blocks based on IPs used by Fediverse instance domain names.
include /etc/nginx/blocklist-ip.conf;
}
@ngerakines
ngerakines / keyping.go
Created February 7, 2019 16:47 — forked from zmanian/keyping.go
Key Pinning in #Golang
package main
import (
"bytes"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"log"
"net"
"net/http"
#!/usr/bin/ruby
# WebExcursions, a script for gathering new Pinboard links with a certain tag
# and generating Markdown/Jekyll posts when enough are collected.
# Brett Terpstra 2013
#
# -f to force writing out current bookmarks to file regardless of count
%w[fileutils set net/https zlib rexml/document time base64 uri cgi stringio].each do |filename|
require filename
end
pastebin_dropbox(Path) ->
fun ("", _) ->
fun pastebin_devnull/1;
(Filename, _ContentType) ->
Date = fmt_date(date()),
RelName = filename:join([Date,
mochicode:url64_encode(term_to_binary(now())),
filename:basename(Filename)]),
AbsName = filename:join([Path, RelName]),
ok = filelib:ensure_dir(AbsName),