Skip to content

Instantly share code, notes, and snippets.

@zeratax
zeratax / blog.dmnd.sh.conf
Last active June 20, 2020 12:54
dmnd.sh nginx config
# site-available/blog.dmnd.sh.conf
server {
listen [::]:443 ssl;
listen 443 ssl;
server_name blog.dmnd.sh;
include snippets/ssl-dmnd.sh.conf;
include snippets/robots.conf;
@zeratax
zeratax / configuration.nix
Last active May 30, 2020 03:06
NixOS config
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
body { background-color: #001f3f; }
video {
max-width: 1920px;
width: 90vw;
@zeratax
zeratax / twiblur.user.js
Last active October 16, 2018 21:08
blurs twitter media by default unless you hover over it, for a more sfw twitter
// ==UserScript==
// @name twiblur
// @namespace mail@zera.tax
// @version 0.2
// @description blur twitter images
// @author ZerataX
// @license Unlicense
// @match https://twitter.com/*
// @grant GM_addStyle
// @run-at document-start
@zeratax
zeratax / cantor.pdf
Last active June 19, 2018 14:35
Cantor's diagonal argument
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeratax
zeratax / synapse-registration.py
Last active April 14, 2018 04:18
api endpoint for token protected registration
from flask import Flask, request, abort, jsonify, request
import hashlib
import hmac
import requests
SERVER_LOCATION = 'https://homeserver.tld/'
SHARED_SECRET = b'registration_shared_secret see homeserver.yaml'
app = Flask(__name__)
@zeratax
zeratax / bot.py
Last active March 18, 2018 02:25
fancy discord nicks
import discord
import asyncio
import cool_names
client = discord.Client()
invite = "https://discordapp.com/api/oauth2/authorize"
permissions = "201326592"
@client.event
@zeratax
zeratax / repeat_messages.py
Created September 24, 2017 20:43
resends deleted discord messages cos some people really over do it...
import discord
import asyncio
from datetime import datetime
import time
client = discord.Client()
@zeratax
zeratax / index.html
Last active September 6, 2017 16:21
wallpaper_generator
<div class="background"></div>
<div class="widget">
<div class="center">
<h1>漢字</h1>
<img id="object">
</div>
</div>
<div class="info">
<p>Source:
<a href="https://danbooru.donmai.us/posts/2735908" target="_blank">
@zeratax
zeratax / bitmap2coordinates.py
Last active May 3, 2017 17:49
Converts a line in a bitmap to 2d coordinates
from PIL import Image
from matplotlib import pyplot as plt
import numpy as np
# Edit these values
file = "quecksilber_graphonly.BMP"
line_color = np.array([0, 192, 192])
# colors in rgb
black = np.array([0, 0, 0])
white = np.array([255, 255, 255])