Philippe Carphin's web page

Table of Contents

1. whoami

I am Philippe Carphin, I work for Environment Canada as a programmer.

2. Web apps

2.1. Clojure auth

This is a project where I attempt doing authentication from scratch to better understand how password storage, cookies, and sessions work:

auth-from-scratch with clojure server

2.2. Clojure Website

This is my Clojure Website

It is a combination of pages written by hand and some written using clojure.

Here is the code on GitHub.

2.3. Rust

This is my rust page which is served by a rust server doing low level TCP stuff.

It's at the hello world level right now.

Also, the rust server is running on a different machine in my home network but nginx makes this seamless for the user:

server {
    server_name philippe-carphin.ca;
    listen 443 ssl;
    # ...
    location /rustauth/ {
        proxy_pass http://192.168.2.25:7878/;
        proxy_set_header Host philippe-carphin.ca/rustauth;
    }
}

3. Links to my projects

3.1. Highlighted repos

3.1.1. My vim config https://github.com/philippecarphin/dot-vim

Developed in over 10 years of Vim experience my vim config is Minimalistic so that when I go on a different system where my config is not, I can be as efficient as when I do have my config.

One can become very efficient with vim without adding a bunch of configurations by focusing on learning builtin vim mechanics.

The config also has a bunch of cool things that do not affect behavior. It totals about 130 lines with 50% having no real effect on behavior.

It should be noted that I do use packages and these do not contribute to the length of my config.

Still, I firmly believe in the importance of knowing vanilla vim.

Highlights:

  • Minimal: Only the bare minimum behavior changes

3.1.2. My Emacs config https://github.com/philippecarphin/emacs.d

My emacs config. The vim VS emacs thing is for un-enlightened and vim users of low skill. It's saying "I can't eat potatoes because I like carrots".

Vim and Emacs are tools with advantages and disadvantages.

Some say Emacs doesn't respect the UNIX philosophy of doing one thing and doing it well. To that I say you need to think of what is the thing. You wouldn't say C doesn't respect the UNIX philosophy because you can make anything in C.

Emacs is a lisp interpreter geared towards manipulation of text buffers. And it does that suuuuper well!

I do most of my coding in Vim and TMUX and I use Emacs for note taking and organization using org mode and the org agenda.

This web page is made using Emacs org mode. As a hardcore vim user, I am still allowed to use other tools to do other jobs. Using Emacs to write org mode documents and export them to HTML is one of them.

3.1.3. Repos tool https://gitlab.com/philippecarphin/repos

A tool to keep track of all your repos with some handy utilities. You keep a yaml file with key-value pairs where names are keys and values are paths to git repos.

  • repos goes through these repos and prints out one line per repo with various informations.
  • rcd a shell command that CD's to repos by names. The autocomplete on this command is my proudest achievement in the realm of bash completions.

3.1.4. Utils https://github.com/philippecarphin/utils

A good amount of the tools from this repo are not really related and would deserve their own repo but I haven't gotten around to that yet.

  • vc: a shell command that finds shell functions and commands and opens them in $EDITOR.
  • echo-server: A server program that runs in the terminal and prints all info on the requests it receives, responds with this info, and optionally can act as a man-in-the-middle to reverse engineer a web API

4. Other stuff

4.1. Notes on OSC52

4.2. CORS Notes

See ~pcarphin/cors-demo for more information on CORS. Which explains the basics of CORS using my echo-server

 Echo server response 

5. About this website

5.1. HTML

Most of the HTML for this website is generated using org mode files and having Emacs export them to HTML. Some use the ox-twbs emacs package to export to pages with a Twitter Bootstrap theme, and some, like this one, simply have

#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup

at the top which means that this HTML page can be created using vanilla Emacs with no installed packages!

5.2. NGINX

This whole site is composed of various components working together. Through nginx configuration, path prefixes are made proxied to various programs listening for HTTP requests on different ports or even machines.

Path prefix Proxied to Application
/clojure localhost:8081 Web app written in clojure
/echo-server localhost:5447 Python echo server
/rustauth 192.168.2.25:7878 Rust hello world web server