Skip to content

Instantly share code, notes, and snippets.

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

Kenji Rikitake jj1bdx

🏠
Working from home
View GitHub Profile
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active May 31, 2024 18:32
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

export PATH="$HOME/erlang/current/bin:$PATH"
erlcur() {
DIR=`ls -lr $HOME/erlang | awk '/current/ { print $NF }'`
echo -n ${DIR##*/}
}
erlsw() {
TARGET=`find $HOME/erlang -depth 1 -type d -name "*$1*" | head -1`
if [ -z "$TARGET" ]; then
@aras-p
aras-p / preprocessor_fun.h
Last active June 12, 2024 00:35
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@voluntas
voluntas / shiguredo_tech.rst
Last active April 11, 2024 08:30
時雨堂を支える技術

時雨堂を支える技術

日時:2024-04-11
作:時雨堂
バージョン:2024.4
URL:https://shiguredo.jp/

時雨堂クラウドサービスを支える技術

@voluntas
voluntas / shiguredo_env.rst
Last active April 16, 2024 13:18
時雨堂を支える環境

時雨堂を支える環境

日時:2024-04-16
作:時雨堂
バージョン:2024.2
url:https://shiguredo.jp/

2024-04 時点で従業員は全員フルリモート勤務中

Thinking in Erlang

One day Erlang training.

Goals

This training should get you started with Erlang and understand how to design a highly available distributed system. Because there is only one day, we focus on the essential concepts and skip over many details that would be covered in the normal three days course.

@voluntas
voluntas / erlang_web.rst
Last active July 3, 2023 12:21
Erlang/OTP で WebApp の開発に必要な N 個のこと

Erlang/OTP で WebApp の開発に必要な N 個のこと

元ネタ:http://d.hatena.ne.jp/gfx/20130909/1378741015

あるプログラミング言語で実際にWebAppを開発できるようになるまで、何が必要だろうか。言語仕様の習得は終えているとしよう。おそらく、最低限以下のような知識が必要だと思われる。とりあえず Erlang/OTP について知っていることを書いた。

ただし、HTML 生成をするならそもそも Erlang/OTP を選択するのは正しい選択では無い。 あくまで API サーバを作るという前提であるべきだ。

@dustinschultz
dustinschultz / dblatex.rb
Created September 12, 2013 21:51
Homebrew dblatex patched
require 'formula'
class Dblatex < Formula
env :userpaths
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3.4/dblatex-0.3.4.tar.bz2'
homepage 'http://dblatex.sourceforge.net'
md5 'a511a2eaa55757b341e4c46353c5c681'
def install
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}"