Skip to content

Instantly share code, notes, and snippets.

jwo /
Created May 22, 2017
Sample Shell script
echo 'So you want to create a new project, eh?'
echo 'What is the name of the project?'
read project_name
mkdir $project_name
jwo /
Created Dec 12, 2016
A simple shell script which I used for productivity. Mostly, how can you ask a question on command line and then use later. NOTHING EARTH SHATTERING, just me saving for future.
select whichtype in "Authoring" "Semantics" "Syntax" "Forms" "Storage"; do
case $whichtype in
Authoring ) break;;
Semantics ) break;;
Syntax ) break;;
Forms ) break;;
Storage ) break;;

Keybase proof

I hereby claim:

  • I am jwo on github.
  • I am jwo ( on keybase.
  • I have a public key ASAJZhNvpvuI6EJyOxva6TZ0zBCpxaWUTNvsy38y38ybcAo

To claim this, I am signing this object:

jwo / calendar.rb
Created Oct 6, 2016
Create a calendar (array of weeks, each an array of days).
View calendar.rb
class Calendar
attr_reader :date
def initialize(date)
@date = date
HEADER = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday).freeze
START_DAY = :sunday
jwo /
Created Sep 20, 2016
Steps to publishing a docker image, tagged
  1. Create a project directory
  2. Create a Dockerfile inside
  3. docker build .
  4. Will give you a container id as output, eg: d774c9ed0183
  5. docker tag d774c9ed0183 jwolgamott/tiy-dotnet-runnable:0.4-beta
  6. docker push jwolgamott/tiy-dotnet-runnable:0.4-beta

Then, people will be able to docker run jwolgamott/tiy-dotnet-runnable:0.4-beta

jwo / example-action.js
Created Aug 22, 2016
Getting React and Redux React and Rails and Fetch and Safari to play nice.
View example-action.js
export function saveOfficeStaff(section, staff) {
return (dispatch, getState) => {
const issue = getState().newsletterId;
const theData = {
staff: staff,
fetch(`/api/newsletters/${issue}/office_staff`, {
jwo / App.js
Last active Apr 13, 2020
Notes before I blog about it: how-to-use-actioncable-and-npm-action-cable
View App.js
import React, { Component } from 'react';
import ActionCable from 'actioncable';
class App extends Component {
componentWillMount() {
var cable = ActionCable.createConsumer('ws://localhost:3000/cable')
jwo / action.html.erb
Last active Apr 19, 2020
register React component on page with turbolinks working. The Rails parts (helper and ERB) are optional, but since this IS turbolinks, you probably ARE using rails.
View action.html.erb
<h1>Oh Hai</h1>
<%= react_component 'oh-hai' %>
jwo / index.html
Created Jun 20, 2016 seems pretty great for Geocoding and reverse geo-coding. * And it works in standard jquery across domains, so it’ won’t trip up people with CORS. * Can work in simple server side queries as well for the same reason * Reverse geocoding works too though not as a replacement for foursquare places. Good for city/state tho. * I…
View index.html
<!DOCTYPE html>
<script src=""></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
jwo /
Created Mar 2, 2016
Extra Credit in TIY Backend Engineering