This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# To activate: complete --command gcloud --arguments="(/home/richard/gcloud/google-cloud-sdk/autocomplete.py (commandline -cp))" | |
import re | |
import subprocess | |
import sys | |
def parse_help(h): | |
commands = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Adapter = DS.RESTAdapter.extend | |
serializer: DS.RESTSerializer.extend | |
extract: (loader, json, type, record) -> | |
root = @rootForType(type) | |
// Embed JSON data in a new object with root element | |
newJSON = {} | |
newJSON[root] = json | |
json = newJSON | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Originally written by http://redartisan.com/tags/csv | |
# Added and minor changes by Gavin Laking | |
# Rewritten by Andrew Bennett for Ruby 1.9 | |
# | |
# Usage: ruby csv_to_fixture.rb file.csv [--json] | |
# | |
# "id","name","mime_type","extensions","icon_url" | |
# "1","unknown","unknown/unknown","||","/images/icon/file_unknown.gif" |