Skip to content

Instantly share code, notes, and snippets.

View martelogan's full-sized avatar
📚

Logan Martel martelogan

📚
View GitHub Profile
@martelogan
martelogan / keybase.md
Created April 5, 2021 03:18
Verifying my github on keybase

Keybase proof

I hereby claim:

  • I am martelogan on github.
  • I am loganmartel (https://keybase.io/loganmartel) on keybase.
  • I have a public key ASAe-cppPEjVtXz-vPo1mNVGr0m5z_CWBnSsU53dHqCbRgo

To claim this, I am signing this object:

Messing Around with Composing Concerns

Recently, I wished to refactor a module (hosting common code: including class and instance methods) into submodules, splitting custom (say "submodule") logic from the shared (say "template") logic.

Problem: the submodules need both class and instance methods from the shared template module. Yet, they'll define their own custom class and instance methods. All of which should be mixed in when a particular submodule (concern) is included on a concrete class (say "controller").

My Solution

@martelogan
martelogan / GnuPG-2.1.md
Last active June 1, 2019 20:04 — forked from mattrude/GnuPG-2.1.md
GnuPG 2.1.18 Build Instructions for Ubuntu 16.04 LTS

GnuPG 2.1.20 Build Instructions

Below you is my build instructions for GnuPG 2.1.20 released on 03-Apr-2017. These instructions are built for a headless Ubuntu 16.04 LTS server.

Or if you wish, you may use the install script to install GnuPG 2.1.20 by entring the following:

curl -sL "https://gist.githubusercontent.com/martelogan/553f26220b45ac5f21b2e264732dd60c/raw/6486e95e3cb07af77efbf32216f40256103ae877/install-gnupg2.sh" |sh

Install the needed depends

apt-get -y install libgnutls-dev bzip2 make gettext texinfo gnutls-bin \

@martelogan
martelogan / rbenv_install.md
Created May 22, 2019 05:20
Instructions on how to install rbenv on Mac OS X.

Installation

  1. Install rbenv and non-system ruby build.
brew install rbenv ruby-build 
  1. Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
@martelogan
martelogan / git-subrepo_install.md
Last active May 12, 2019 16:46
Instructions on how to install git-subrepo to a POSIX enivronment.

Installation

  1. Install git-subrepo to /opt directory for unbundled, third-party source code packages:
sudo git clone https://github.com/ingydotnet/git-subrepo /opt/git-subrepo  
  1. Set the environment variable GIT_SUBREPO_ROOT
@martelogan
martelogan / git-subrepo_install.md
Created May 12, 2019 16:42
Instructions on how to install git-subrepo to a POSIX enivronment.

Installation

  1. Install git-subrepo to /opt directory for unbundled, third-party source code packages:
git clone https://github.com/ingydotnet/git-subrepo /opt/git-subrepo  
  1. Set the environment variable GIT_SUBREPO_ROOT
@martelogan
martelogan / fish_install.md
Last active January 10, 2022 00:21 — forked from idleberg/fish_shell.md
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!

Installation

  1. Install fish via Brew
brew install fish  
  1. Add fish to known shells
# may need to run `which fish` to determine fish install path
@martelogan
martelogan / .extra
Last active May 12, 2019 07:27
Personal .extra file for home directory
GIT_AUTHOR_NAME="Logan Martel"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="logan.martel@outlook.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Convert OpenAPI/Swagger v2.0(JSON) to tapioca resource mapping.
Usage is: swagger2tapioca -i <path/to/input> -o <path/to/output> ...
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-i path/to/json, --input=path/to/json
Input swagger json filepath.