Skip to content

Instantly share code, notes, and snippets.

Jonah jonahx

Block or report user

Report or block jonahx

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
jonahx / jrun-table.ijs
Created Dec 2, 2019 — forked from amerlyq/jrun-table.ijs
Awk-like table data processing in J (jsoftware)
View jrun-table.ijs
#0 :0
trap '' PIPE
exec /usr/lib/j8/bin/jconsole "$0" "$@"
# vim:ft=j
NB.SUMMARY: awk-like table data processing
NB.USAGE: $ ./$0 [-b 'beg-exprs'..] [-e 'end-exprs'..] ['line-exprs'...]
NB. TODO: gather all files (and stdin by '-') into single list of boxes with data
View checks.awk
# check1 - print total deposits and checks
/~check/ { ck = 1; next }
/~deposit/ { dep = 1; next }
/~amount/ { amt = $2; next }
/~$/ { addup() }
printf("deposits $%.2f, checks $%.2f'n", deposits, checks)
function addup() {
jonahx / markdown_preview.rb
Created Jun 27, 2013
A simple sinatra app that you can use with LiveReload to create a markdown previewer app. For example, to be used side by side with a vim window
View markdown_preview.rb
require 'sinatra'
require 'github/markdown'
get '/' do
@markdown_file = ENV['file']
@markup = GitHub::Markdown.render_gfm(
erb :index
jonahx / touch_to_mouse.js
Created May 26, 2013
Translates touch events to mouse events
View touch_to_mouse.js
function touchHandler(event) {
var touch = event.changedTouches[0];
var simulatedEvent = document.createEvent("MouseEvent");
touchstart: "mousedown",
touchmove: "mousemove",
touchend: "mouseup"
}[event.type], true, true, window, 1,
touch.screenX, touch.screenY,
jonahx / index.html
Last active Dec 16, 2015
Basic d3 Scatterplot
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<script src=""></script>
<style type="text/css">
.axis path,
.axis line {
jonahx /
Created Mar 1, 2013
arc path test
You can’t perform that action at this time.