Skip to content

Instantly share code, notes, and snippets.

🏞
Working from home

Jonathan Simpson jsimpson

🏞
Working from home
Block or report user

Report or block jsimpson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Principles-of-Adult-Behavior.md

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
View agile-vs-fragile-summary.md

Agile vs Fragile - Summary

My personal notes on Brian Copeland's blog series: Agile vs Fragile

(If you are unable to access the blog post, try using a US proxy or web-based proxy service e.g. http://hideme.be)

1) Deliver value to customer

  • Agile: focus on deliver valuable software to customer
  • Fragile: focus on meeting delivery period
View gist:8f01bacf3ab0c5d37bc77e7f52359ca8
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
sudo dpkg -i *.deb
View triangle-workflow.md

Triangle Workflows

A triangle workflow involves an upstream project and a personal fork containing a development branch of the project. This configuration makes git pull merge changes from the upstream but git push send local commits to the personal fork. However those config settings only work on relatively recent versions of git; 1.7.9 doesn't support the required remote.pushdefault config setting so you will have to explicitly tell git push which remote to push to.

This gist does not attempt to explain exactly what these commands do, it's intended as a cheat-sheet/reminder.

To set up a project area

@jsimpson
jsimpson / Gemfile
Created Jun 14, 2018 — forked from timothypage/Gemfile
Quick hack to passthrough sinatra to webpack-dev-server for awesome client hot reloading plus live api endpoints
View Gemfile
source "https://rubygems.org"
gem "rack-proxy"
gem "sidekiq"
gem "sinatra"
gem "sinatra-contrib"
gem "py"
@jsimpson
jsimpson / event_sourcing_intro.rb
Created May 14, 2018 — forked from mottalrd/event_sourcing_intro.rb
An introduction to event sourcing, London Ruby User Group, 9th May 2018
View event_sourcing_intro.rb
module Commands
module Meeting
AcceptSchema = Dry::Validation.Schema do
required(:user_id).filled
required(:status).value(eql?: :scheduled)
end
class Accept < Command
def call
return validate if validate.failure?
View classifier_from_little_data_script_1.py
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
View handling_rails_exceptions.md
# application.rb:

config.exceptions_app = lambda do |env|
  exception   = env['action_dispatch.exception']
  params      = env['action_dispatch.request.parameters']
  request     = Rack::Request.new(env)
  status_code = ActionDispatch::ExceptionWrapper.new(env, exception).status_code
  
  Rails.logger.info [
@jsimpson
jsimpson / dc_2017_biblio.md
Created Apr 25, 2017 — forked from BaseCase/dc_2017_biblio.md
List of resources recommended or mentioned by the speakers at Deconstruct 2017
View dc_2017_biblio.md

Deconstruct 2017 Bibliography

Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!

DC 2017 Speakers' Choice Gold Medalist

  • Seeing Like a State by James Scott

Books

  • Public Opinion by Walter Lippmann (Evan Czaplicki)
  • A Pattern Language by Christopher Alexander (Brian Marick)
  • Domain Driven Design by Eric Evans (Brian Marick)
@jsimpson
jsimpson / problem.cpp
Created Apr 1, 2017 — forked from depp/problem.cpp
A Faster Solution
View problem.cpp
// Faster solution for:
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/
// With threading.
// g++ -std=c++11 -Wall -Wextra -O3 -pthread
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost).
// How it works: Start by generating a list of losing states -- states where the
// game can end in one turn. Generate a new list of states by running the game
You can’t perform that action at this time.