I hereby claim:
- I am pkoppstein on github.
- I am pkoppstein (https://keybase.io/pkoppstein) on keybase.
- I have a public key ASCktT2iT4blu4-5UYAdGO1R8hq2zyEkBv1n0H7E5UOiIAo
To claim this, I am signing this object:
# This gist defines a jq function that may be useful when migrating from a "relational" view of things to an "object" view. | |
# | |
# For example, suppose we have two JSON objects as follows, corresponding to a row in a relational table: | |
# | |
# { "id": 123, "surname": "S", "son": "Son1", } | |
# { "id": 123, "son": "Son2"} | |
# | |
# In this case, we want to merge the objects with the result: | |
# | |
# { "id": 123, "surname": "S", "son": ["Son1", "Son2"]} |
# This gist defines a jq filter for combining two JSON objects by resolving conflicts | |
# in a way that is appropriate for mapping relational tables to objects. | |
# "combine" as defined here is both commutative and associative. | |
# Example: | |
# { "id": 123, "son": "Son1", "surname": "S"} | |
# | combine({ "id": 123, "son": "Son2", "surname": "S"}) | |
# produces: { "id": 123, "son": ["Son1",Son2], "surname": "S"} | |
# Combine two entities in an array-oriented fashion. |
# Copyright (c) 2014-2015 Peter Koppstein (pkoppstein at gmail dot com) 2015.05.02 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
#!/usr/bin/env ruby | |
# Syntax: js2json.rb [PATHNAME] | |
# | |
# This ruby script can be used to evaluate a single javascript | |
# expression (possibly including comments, arithmetic operators, etc.) | |
# and print the result as a JSON string. This is useful for reading | |
# JSON-with-comments and javascript-style objects. | |
# | |
# The script will read from STDIN if no PATHNAME is specified. |
2015-03-22 00:34:28 -0400 | |
./configure | |
--prefix=/usr/local/Cellar/scrollkeeper/0.3.14 | |
--mandir=/usr/local/Cellar/scrollkeeper/0.3.14/share/man | |
--with-xml-catalog=/usr/local/etc/xml/catalog | |
checking for gawk... no | |
checking for mawk... no | |
checking for nawk... no |
module { | |
"name": "schema", | |
"description": "JSON Schema Inference", | |
"version": "0.0.3.1", | |
"homepage": "https://gist.github.com/pkoppstein/a5abb4ebef3b0f72a6ed", | |
"license": "MIT", | |
"author": "pkoppstein at gmail dot com" | |
}; | |
# NEWS: |
#!/bin/bash | |
# Copyright (c) 2017 Peter Koppstein (pkoppstein at gmail dot com) 2017.01.15 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
I hereby claim:
To claim this, I am signing this object:
# Copyright (C) 2018 [email protected] | |
# License: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) | |
# See http://creativecommons.org/licenses/by-nc/3.0/ | |
# Attribution shall include the copyright notice above. | |
# fromcsv.jq version: 0.4 of 2018-12-30 | |
# Requires: jq with `inputs` | |
# Source: https://gist.github.com/pkoppstein/bbbbdf7489c8c515680beb1c75fa59f2 | |
# A PEG-inspired parser for reading CSV files without the need to "slurp" them. |
1 | |
"2" | |
"3" | |
"4" | |
"5", "a" | |
"""6""" | |
"""7""","a" | |
8,b,c | |
9,"",c | |
10,,c |