Skip to content

Instantly share code, notes, and snippets.

Jason Axelson axelson

  • Hobnob
  • Honolulu, HI
Block or report user

Report or block axelson

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 gist:80eb528e6ef07c642c1f700f1f35eba0
00:00:06.247 [info] [ 3.424396] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
00:00:06.247 [info] [ 3.435738] hub 1-1.1:1.0: USB hub found
00:00:06.247 [info] [ 3.443079] hub 1-1.1:1.0: 3 ports detected
00:00:06.248 [warn] [ 3.803383] dwc_otg_handle_wakeup_detected_intr lxstate = 2
00:00:06.248 [info] [ 4.342360] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg
@axelson
axelson / gist:278400fec17dda89b979ea226f670db3
Created Jul 30, 2019
Nerves network log when ethernet is not working
View gist:278400fec17dda89b979ea226f670db3
00:00:06.632 [info] Start Network Interface Worker
00:00:06.653 [debug] Elixir.Nerves.Network setup(eth0)
00:00:06.685 [info] [ 6.668411] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
00:00:06.685 [info] [ 6.681917] libphy: lan78xx-mdiobus: probed
00:00:06.706 [info] nerves_network_interface received :ifadded and %{ifname: "eth0", index: 2}
@axelson
axelson / firmware_reload.ex
Created Jul 9, 2019 — forked from cblavier/firmware_reload.ex
Elixir nerves to upload firmware / reload code
View firmware_reload.ex
defmodule Mix.Tasks.MyNervesProject.Firmware.Reload do
use Mix.Task
@app_name Mix.Project.config[:app]
@cookie_file "rel/vm.args"
@mdns_domain Application.get_env(:nerves_init_gadget, :mdns_domain)
@node_name Application.get_env(:nerves_init_gadget, :node_name)
def run(_) do
@axelson
axelson / base_calculator.ex
Last active May 7, 2019 — forked from sgyyz/base_calculator.ex
Elixir Abstract and Extends
View base_calculator.ex
defmodule BaseCalculator do
@moduledoc """
Define the base calculator and provide public API.
Define the callback to implement specific logic in child module.
"""
# it should be implemented by child module
@callback do_calculate(num1 :: integer, num2 :: integer) :: {:ok, integer} | {:error, any()}
def calculate(module, num1, num2) do
@axelson
axelson / resize.html
Created Aug 12, 2015
Example showing resize bug in firepad
View resize.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CodeMirror: Autoresize Demo</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.2.0/codemirror.js"></script>
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.2.0/codemirror.css" />
@axelson
axelson / README.md
Last active Aug 29, 2015 — forked from mbostock/.block
Honolulu Buses Over Time
View README.md

This simple bar chart shows the amount of buses operating in Oahu over time. As we can see the number of buses serving Oahu has not changed much since bus service was first introduced. While this is not a comprehensive analysis it would appear that the level of service for TheBus has gone down or at least not increased over time since area that TheBus serves has only increased. It would be nice to do an analysis that would include historical coverage areas and bus routes.

One way to increase bus service quality without an increase in funding is by increasing frequency on core routes, hopefully getting some routes to every 10

View README.md

Diverging Stacked Bar Chart

We create a diverging stacked bar chart to plot a 5 point Likert scale. There a lots of ways to plot a Likert scale but according to Robbins & Heiberger, a diverging stacked bar chart is the best and I agree.

I've used D3.js. There is also an R package by Robbins & Heiberger.

The original can be found at github

@axelson
axelson / _.md
Created Jun 1, 2014
Nest Example
View _.md
@axelson
axelson / _.md
Created Jun 1, 2014
Honolulu Budget Regular Pay (no scales)
View _.md
@axelson
axelson / _.md
Created May 31, 2014
Honolulu Budget 3-int
View _.md
You can’t perform that action at this time.