Skip to content

Instantly share code, notes, and snippets.

@rafialikhan
rafialikhan / onename.txt
Created July 12, 2017 20:10
Verifying that "rafialikhan.id" is my Blockstack ID. https://onename.com/rafialikhan
Verifying that "rafialikhan.id" is my Blockstack ID. https://onename.com/rafialikhan
@rafialikhan
rafialikhan / firebase-json-to-csv.php
Last active August 11, 2018 17:47 — forked from Kostanos/json-to-csv.php
Convert Firebase JSON array file to CSV.Use the array keys as the first row. Command line using: PHP firebase-json-to-csv.php filename.json > filename.csv
#!/usr/bin/php
<?php
/*
* Convert JSON file to CSV and output it.
*
* JSON should be an array of objects, dictionaries with simple data structure
* and the same keys in each object.
* The order of keys it took from the first element.
*
* Since firebase has an object of objects (serialized) - we need to convert it to an array