Skip to content

Instantly share code, notes, and snippets.

View jwo's full-sized avatar

Jesse Wolgamott jwo

View GitHub Profile
@jwo
jwo / create_project.sh
Created May 22, 2017 19:12
Sample Shell script
#!/bin/bash
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
jwo / init.sh
Created December 12, 2016 21:46
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;;
esac
done

Keybase proof

I hereby claim:

  • I am jwo on github.
  • I am jwo (https://keybase.io/jwo) on keybase.
  • I have a public key ASAJZhNvpvuI6EJyOxva6TZ0zBCpxaWUTNvsy38y38ybcAo

To claim this, I am signing this object:

@jwo
jwo / calendar.rb
Created October 6, 2016 13:39
Create a calendar (array of weeks, each an array of days).
class Calendar
attr_reader :date
def initialize(date)
@date = date
end
HEADER = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday).freeze
START_DAY = :sunday
@jwo
jwo / docker.notes.md
Created September 20, 2016 13:26
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
jwo / example-action.js
Created August 22, 2016 21:27
Getting React and Redux React and Rails and Fetch and Safari to play nice.
export function saveOfficeStaff(section, staff) {
return (dispatch, getState) => {
const issue = getState().newsletterId;
const theData = {
staff: staff,
section_id: section.id
}
fetch(`/api/newsletters/${issue}/office_staff`, {
@jwo
jwo / App.js
Last active February 14, 2022 13:32
Notes before I blog about it: how-to-use-actioncable-and-npm-action-cable
import React, { Component } from 'react';
import ActionCable from 'actioncable';
class App extends Component {
componentWillMount() {
var cable = ActionCable.createConsumer('ws://localhost:3000/cable')
@jwo
jwo / action.html.erb
Last active April 19, 2020 21:31
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.
<h1>Oh Hai</h1>
<%= react_component 'oh-hai' %>
@jwo
jwo / index.html
Created June 20, 2016 19:27
http://locationiq.org 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. * It…
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@jwo
jwo / extra-credit.md
Created March 2, 2016 19:55
Extra Credit in TIY Backend Engineering