Skip to content

Instantly share code, notes, and snippets.

@aaronmyatt
aaronmyatt / ansible-ionic.yml
Created February 17, 2016 07:32
Ansible meets Vagrant meets Ionic
---
-
hosts: ionic-vagrant
name: "Ionic meets vagrant"
roles:
- martinmicunda.common
- martinmicunda.nodejs
- martinmicunda.ionic
- williamyeh.oracle-java
- nickp666.android-sdk
@aaronmyatt
aaronmyatt / gist:c17a84d4d27075764832
Created November 19, 2015 02:07
postgres to json
# output to /tmp due to file permissions, but you could write to any file if you're running locally.
\copy (SELECT row_to_json(t) FROM (SELECT * FROM partner_stockrecord) t) to /tmp/partner_stockrecord.json
# wrap file in square brackets and output to new file
gawk '{ print "["$0"]" }' inputfile > outputfile
@aaronmyatt
aaronmyatt / router-to-directive.js
Last active November 19, 2015 02:08
Combining ui-router with directives
//Combining ui-router with directives to make beautiful, dynamic, controller-less apps
//Taken from here: http://stackoverflow.com/a/32875215/4993527
$stateProvider.state('general', {
url: '/general',
views: {
main: {
template: '<general-directive></general-directive>'
}
}