Skip to content

Instantly share code, notes, and snippets.

View rowlando's full-sized avatar

Nick Rowlands rowlando

View GitHub Profile

Books

  • Working Effectively With Legacy Code by Michael Feathers
  • Beyond Legacy Code by David Scott Bernstein
  • Getting Started With DDD When Surrounded By Legacy Systems by Eric Evans

Podcasts

Legacy Code Rocks Menders love fixing bugs, refactoring, and testing to make software applications more stable, scalable and secure.

Maintainable FM

@rowlando
rowlando / cloc-git.sh
Created March 7, 2020 19:00
Count Lines of Code in GitHub Repo
#!/usr/bin/env bash
git clone --depth 1 "$1" temp-linecount-repo &&
printf "('temp-linecount-repo' will be deleted automatically)\n\n\n" &&
cloc temp-linecount-repo &&
rm -rf temp-linecount-repo
@rowlando
rowlando / gist:bdf9f620c3cd12d6d4be6deea4aaab0e
Created June 15, 2018 15:24
Raspberry PI Autostart Chrome
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@point-rpi
# Turn off screen power saving
@xset s off
@xset -dpms
@xset s noblank
# Start Chromium

List all gems in current gemset

ls `rvm gemdir`/gems
@rowlando
rowlando / git-cheat-sheet.md
Last active August 14, 2016 09:32
Git Cheat Sheet

How to rebase local branch with remote master

git fetch origin
git rebase origin/master

to get rid of untracked files and directories

@rowlando
rowlando / curl.md
Last active February 27, 2016 15:31
Command Line Cheat Sheet

Debug switches

Print out request headers

curl -i https://api.github.com

Print out request and response headers

curl -v https://api.github.com

@rowlando
rowlando / redux-counter.js
Created February 10, 2016 18:35
Tiny Redux app with tests for count reducer
// A counter reducer
const counter = ( state = 0, action) => {
switch(action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
return state - 1;
default:
return state;