Skip to content

Instantly share code, notes, and snippets.

View Fudoshiki's full-sized avatar

Yuri S. Fudoshiki

View GitHub Profile
@Fudoshiki
Fudoshiki / Dockerfile
Created June 17, 2025 07:20 — forked from nginx-gists/Dockerfile
Our Roadmap for QUIC and HTTP3 Support in NGINX
# Builds NGINX from the QUIC+HTTP/3 development branch
# - Based on the official NGINX docker image, including all modules built by default
# - OpenSSL replaced with LibreSSL to support QUIC's TLS requirements (statically linked)
#
# docker build --no-cache -t nginx:quic .
# docker run -d -p 443:443 -p 443:443/udp nginx:quic
#
# Note that a suitable configuration file and TLS certificates are required for testing!
# See <https://quic.nginx.org/readme.html> for more info
@Fudoshiki
Fudoshiki / about.md
Created June 17, 2025 07:16 — forked from icedterminal/about.md
Jellyfin + NGINX
@Fudoshiki
Fudoshiki / Flexible Dockerized Phoenix Deployments.md
Created February 13, 2022 00:56 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@Fudoshiki
Fudoshiki / erlang_webrtc_quic.rst
Created August 21, 2019 06:20 — forked from voluntas/erlang_webrtc_quic.rst
Erlang/OTP で WebRTC と QUIC

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@Fudoshiki
Fudoshiki / .gitignore
Created January 13, 2019 17:22
Elixir .gitignore
# The directory Mix will write compiled artifacts to.
/_build
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where 3rd-party dependencies like ExDoc output generated docs.
@Fudoshiki
Fudoshiki / drain_stop.ex
Created December 13, 2018 04:57 — forked from chrismccord/drain_stop.ex
Phoenix Drain Stop
defmodule DrainStop do
@moduledoc """
DrainStop Attempts to gracefully shutdown an endpoint when a normal shutdown
occurs. It first shuts down the acceptor, ensuring that no new requests can be
made. It then waits for all pending requests to complete. If the timeout
expires before this happens, it stops waiting, allowing the supervision tree
to continue its shutdown order.
DrainStop should be installed in your supervision tree *after* the
EndPoint it is going to drain stop.
defp fetch_dev_server path do
case :gen_tcp.connect {:local, "/tmp/webpack"}, 0, [:binary, active: false, packet: 0] do
{:ok, socket} ->
:gen_tcp.send socket, "GET /#{path}.css HTTP/1.1\r\n\r\n"
{:ok, response} = :gen_tcp.recv socket, 0
length = List.last(Regex.run ~r{Content-Length: (\d+)}, response) |> String.to_integer
start_bin = Enum.slice String.split(response, "\r\n"), 7..-1
case length <= 1460 do
@Fudoshiki
Fudoshiki / sublime-command-line.md
Created September 12, 2017 20:32
Launch Sublime Text from the command line on OSX

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@Fudoshiki
Fudoshiki / mongod.conf
Created October 14, 2015 05:45
MongodDB 3.0, wiredTiger, zlib, unixDomainSocket, yml format
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log