Skip to content

Instantly share code, notes, and snippets.

@tahteche
tahteche / jsonleaves.py
Last active July 13, 2018 22:10
Print the paths to all leaf nodes of a JSON Tree
import json
import sys
class JSONLeaves:
def json_paths(self, json_string):
json_dict = json.JSONDecoder().decode(json_string)
paths = self.dict_paths(json_dict)
path_dict = {}
for path in paths:
path_dict[path[0]] = path[1]
@tahteche
tahteche / gist:6b7efc1aece7813fd2af
Last active September 14, 2015 01:35 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt