Skip to content

Instantly share code, notes, and snippets.

@lorarjohns
lorarjohns / Makefile
Created September 22, 2020 18:04 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@lorarjohns
lorarjohns / constitution.cls
Created September 22, 2020 01:17 — forked from eyliu/constitution.cls
LaTeX document class for typesetting a constitution
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesClass{constitution}[2009/05/15 v0.0.1 Document class for typesetting a constitution]
\LoadClass{report}
\RequirePackage[letterpaper,margin=1in]{geometry}
\RequirePackage[colorlinks,linkcolor=blue]{hyperref}
%\usepackage{hyperref}
\RequirePackage{titlesec}
@lorarjohns
lorarjohns / Kubernetes-OpenShift-May12.md
Created May 12, 2020 17:03 — forked from dewan-ahmed/Kubernetes-OpenShift-May12.md
This is a public gist containing useful links for May12 2020 CrowdCast KRHOWT workshop by IBM Developer
  1. Sign-up for IBM Cloud account: https://ibm.biz/BdqyJj
  2. Kubernetes cluster (one-hour sandbox): https://www.katacoda.com/courses/kubernetes/first-steps-to-ckad-certification
  3. OpenShift cluster (one-hour sandbox): https://learn.openshift.com/playgrounds/openshift42/
  4. Workshop Gitbook: https://ibm-developer.gitbook.io/openshift101
  5. Workshop GitHub Repo: https://github.com/IBM/openshift101/tree/master/workshop
  6. Repo for the NodeJS application: https://github.com/IBM/node-s2i-openshift
  7. Background on containers: https://www.ibm.com/cloud/learn/containers
  8. Background on Kubernetes: https://www.ibm.com/cloud/learn/kubernetes
  9. All Kubernetes concepts under 30 minutes: https://www.youtube.com/watch?v=90kZRyPcRZw
  10. Source-to-Image(S2I) Deep-dive: https://www.youtube.com/watch?v=flI6zx9wH6M
@lorarjohns
lorarjohns / semifactorial.py
Created April 2, 2020 22:46
double factorial
def semifactorial(n):
if n == 0 or n == 1:
# return the multiplicative identity
return 1
# return n(n - 2) for all integers between
# n and 1 with the same parity as n
return n * semifactorial(n-2)
from textblob import Word
def get_synonym_defs(word):
word = Word(word)
defs = zip(word.synsets, word.definitions)
print(*defs)
return word.synsets
def print_ontological_comps(synset):
print(f"SUB-COMPONENTS OF {synset.__repr__()}:\n")

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@lorarjohns
lorarjohns / newproj.sh
Last active December 2, 2019 04:08
create a new project directory with pyenv virtualenv
#!/bin/sh
# Usage: $ sh newproj.sh pythonversion projectname
mkdir $2 && cd $2 && pyenv local $1 && pyenv virtualenv venv-$2 && pyenv local venv-$2 && pyenv activate venv-$2
@lorarjohns
lorarjohns / git-log-to-tikz.rb
Created October 10, 2019 02:56 — forked from cl4u2/git-log-to-tikz.rb
Extract git history to tikz picture - complete latex document and minimal graph
#!/usr/bin/env ruby
# A small ruby script to extract a git history to a tikz picture
# Author: Michael Hauspie <Michael.Hauspie@lifl.fr>
# Author: Lennart C. Karssen <lennart@karssen.org>
# Author: Claudio Pisa <claudio.pisa@uniroma2.it>
#
# Not clean code, not always working well, but does its job in most of
# the cases I needed :)
#
### Keybase proof
I hereby claim:
* I am lorarjohns on github.
* I am silly_meninsky (https://keybase.io/silly_meninsky) on keybase.
* I have a public key ASCCgBmQNmz7ZdAfSYaYd_Cg3sTPjkSrNfC10jlMfUh3XAo
To claim this, I am signing this object:
import requests
from bs4 import BeautifulSoup
import time
# We've now imported the two packages that will do the heavy lifting
# for us, reqeusts and BeautifulSoup
# This is the URL that lists the current inmates
# Should this URL go away, and archive is available at
# http://perma.cc/2HZR-N38X