Skip to content

Instantly share code, notes, and snippets.

View viluon's full-sized avatar
👁️
stop the race towards misaligned AI

Andrew Kvapil viluon

👁️
stop the race towards misaligned AI
View GitHub Profile
local upvalue = {}
local x = {}
local ns = {}
local index = 1
function ns.inner()
return upvalue()
end

Keybase proof

I hereby claim:

  • I am viluon on github.
  • I am viluon (https://keybase.io/viluon) on keybase.
  • I have a public key ASC2cjxCPwVY677g4EHdpqUpshoT8smPCDaI59Lrx_SK9wo

To claim this, I am signing this object:

@viluon
viluon / Dockerfile
Created October 15, 2020 14:40
Dockerfile for building GHC
FROM archlinux:20200205 AS arch-ghc-build-env
RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm git base-devel go python python-sphinx libedit numactl exa
# use all possible cores for subsequent package builds
RUN sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf
# don't compress the packages built here
RUN sed -i "s,PKGEXT='.pkg.tar.xz',PKGEXT='.pkg.tar',g" /etc/makepkg.conf
# set up the packager user
@viluon
viluon / cors-proxy.js
Created July 18, 2022 22:01
Deploy this with CloudFlare Workers to get a CORS proxy for your Copy Cat deployment.
// Cloudflare supports the GET, POST, HEAD, and OPTIONS methods from any origin,
// and allow any header on requests. These headers must be present
// on all responses to all CORS preflight requests. In practice, this means
// all responses to OPTIONS requests.
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET,HEAD,POST,OPTIONS',
'Access-Control-Max-Age': '86400',
};
@viluon
viluon / LibDeflate.lua
Last active July 21, 2023 13:55
gzip compression-only CC-flavoured of LibDeflate
--[[--
LibDeflate 1.0.0-release <br>
Pure Lua compressor and decompressor with high compression ratio using
DEFLATE/zlib format.
@file LibDeflate.lua
@author Haoqian He (Github: SafeteeWoW; World of Warcraft: Safetyy-Illidan(US))
@copyright LibDeflate <2018> Haoqian He
@license GNU General Public License Version 3 or later