Skip to content

Instantly share code, notes, and snippets.

View mariosant's full-sized avatar

Marios Antonoudiou mariosant

View GitHub Profile
@rjohnsondev
rjohnsondev / autocomplete.py
Created July 19, 2016 23:12
Google Cloud Platform gcloud tab completion for fish shell.
#!/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 = {}
@richardkall
richardkall / store.coffee
Last active December 3, 2023 22:08
Ember.js REST adapter without JSON root element.
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
//
#!/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"