Skip to content

Instantly share code, notes, and snippets.

Avatar
💝
tab tab tab...

r4wm R4wm

💝
tab tab tab...
View GitHub Profile
View 3_laws_of_TDD.md

The Three Laws of TDD

Over the years I have come to describe Test Driven Development in terms of three simple rules. They are:

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

You must begin by writing a unit test for the functionality that you intend to write. But by rule 2, you can't write very much of that unit test. As soon as the unit test code fails to compile, or fails an assertion, you must stop and write production code. But by rule 3 you can only write the production code that makes the test compile or pass, and no more.

@R4wm
R4wm / romans6.md
Created Aug 25, 2021
Romans 6 personal outline
View romans6.md

Chapter 6

  • we have a choice on who to serve
  • True baptism, into Jesus Christ, into His death
    • I am buried WITH Him by baptism into death
      • I shall also live with Him
      • This is NOTHING related to water baptism (washing away of sins)
  • The old man is crucified with Him
  • I am not under the law, I am under grace
    • Dead unto sin
  • This means that sin has no hold on me. It cant condemn me anymore. Sin is nullified even when I commit the act
@R4wm
R4wm / docker_notes.md
Last active Aug 23, 2021
docker notes bc i forget
View docker_notes.md

Get image

list found at: docker hub

docker pull ubuntu:xenial

create docker container from image id

the hash is the docker image ID
Note: the hash after -it is the image ID from docker container ls -a

@R4wm
R4wm / svn_notes.txt
Last active Jun 25, 2021
svn why,...
View svn_notes.txt
# Turn on exe on file
svn propset svn:executable on
# Turn off exe on file
svn propdel -R svn:executable
@R4wm
R4wm / daily_bible.py
Last active May 4, 2021
super simple script to get daily reading ranges
View daily_bible.py
#!/usr/bin/env python3
import requests
URL = 'https://mintz5.duckdns.org/bible/daily'
###############
# get_portion #
###############
def get_portion(a_testament: str) -> str:
a_testament = a_testament.lower()
# Form the string
@R4wm
R4wm / emacs_notes.txt
Last active Apr 16, 2021
useful commands in emacs for c++
View emacs_notes.txt
https://boruch-baum.github.io/emacs_mini_manual/c-ide.html
dumb-jump
semantic-mode
semantic-ia-fast-jump
sr-speedbar-open
global-semantic-idle-summary-mode # this one shows me where the definition is!
semantic-stickyfunc-mode # Keeps function name at the top
@R4wm
R4wm / get_singthekjv_mp3.sh
Created Apr 9, 2021
get all singthekjv.app mp3
View get_singthekjv_mp3.sh
for i in $(curl 'https://singthekjv.app/scripture-songs' | egrep -o 'data-path=".*"' | tr " " "\n" | egrep "*.mp3" | cut -f2 -d'=' | tr -d '"'); do wget --tries=3 "https://singthekjv.app/$i" ; done
@R4wm
R4wm / golang-request
Last active Dec 12, 2020 — forked from kendellfab/golang-request
Golang Example for adding custom headers to a request.
View golang-request
package main
import (
"bytes"
"fmt"
"net/http"
"os"
)
func main() {
@R4wm
R4wm / hexgoingon.py
Last active Dec 10, 2020
int an hex, hex to int
View hexgoingon.py
#!/usr/bin/python3
import re
import sys
import argparse
def getHex(a_user_int):
return hex(a_user_int).split('x')[-1].upper()
def getInt(a_hex):
@R4wm
R4wm / bible.service
Created Nov 30, 2020
systemd service file for bible_api (local)
View bible.service
[Unit]
Description=bible
After=syslog.target
[Service]
ExecStart=/home/rmintz/bin/bible_api -dbPath /home/rmintz/kjv.db
Restart=always
KillSignal=SIGQUIT
Type=fork
StandardError=syslog