Skip to content

Instantly share code, notes, and snippets.

View a-wing's full-sized avatar
💭
I may be slow to respond.

metal A-wing a-wing

💭
I may be slow to respond.
  • Gensokyo
View GitHub Profile
@FiveYellowMice
FiveYellowMice / mc-im.rb
Created November 26, 2016 11:30
在 Linux 下的 Minecraft 中输入中文。拥有比 bash 脚本更好的鲁棒性,适应多种情形,并绕过了一些坑。
#!/usr/bin/env ruby
# encoding: utf-8
# frozen_string_literal: true
# mc-im.rb
# ========
#
# 在 Linux 下的 Minecraft 中输入中文。拥有比 bash 脚本更好的鲁棒性,适应多种情形,并绕过了一些坑。
#
# 使用方法
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active October 18, 2025 10:01
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@rally25rs
rally25rs / nginx_rails_sendfile.md
Last active July 7, 2023 09:17
nginx rails send_file madness

Goal: Have some static content, served by Nginx, but it requires an authenticated user. User auth is through Rails.

Project structure: The actual static files are in /home/vagrant/docs/ The browser will use the URL /help/* to access this content

The Ruby bits: RAILS_ENV=production rails server is used to start a WEBrick on port 3000.

config/environments/production.rb