Skip to content

Instantly share code, notes, and snippets.

@nakwa
nakwa / reverse-proxy-tunnel.md
Last active October 28, 2023 17:42
Reverse proxy server for local tunnel / with HTTPS forwarding

Reverse proxy as a local tunnel / with HTTPS forwarding

Using SSH forwarding, NGINX, LetsEncrypt & Docker (Ruby-on-rails & Puma as dev server in current setup)

Stack & config

Gemfile

ruby '2.6.5'
gem 'puma', '4.3.1'
#_____________________________________________________________________
#_________(_)_________________ ___________ ____________ _____________
#________ /_ __ \_ ___/ _ \______/ __ `/ _ \_ __ `__ \________
#_______ / / /_/ /(__ )/ __/_____/ /_/ // __/ / / / / /_______
#______ / \____//____/ \___/______\__, / \___//_/ /_/ /_/_______
#___/___/__________________________/____/________________________
#################################################################
########################## GENERATE KEY #########################
#################################################################
@nakwa
nakwa / .profile
Last active February 18, 2020 12:57
.profile stuff
# Source order:
# .zshenv → [.zprofile if login] → [.zshrc if interactive] → [.zlogin if login] → [.zlogout sometimes].
# ----------------------------------------------------- #
# PATH #
# ----------------------------------------------------- #
export PATH="$PATH:$GEM_HOME/bin"
export PATH="$PATH:$HOME/.cask/bin"
export PATH="$PATH:$HOME/.rvm/bin"
export PATH="$PATH:/usr/local/share/npm/bin"
@nakwa
nakwa / custom-es6.tmTheme
Last active October 6, 2017 15:42
Custom Sublime Text 3 theme for ES6 and Babel (Based on Rise)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Rise</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@nakwa
nakwa / ruby_fun_stuff.rb
Last active September 15, 2017 11:46
Ruby fun stuff (class inheritance, etc)
class Parent
class << self
attr_accessor :something
def something(value = nil)
@something = value ? value : @something
end
def inherited(subclass)
self.instance_variables.each do |var|
@nakwa
nakwa / keybase.md
Created October 4, 2016 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am nakwa on github.
  • I am nakwa (https://keybase.io/nakwa) on keybase.
  • I have a public key whose fingerprint is D578 B937 D785 1EF4 BA68 F554 E0DC E4C4 9A76 E0E3

To claim this, I am signing this object: