This file contains hidden or 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
# Assuming results.txt is the output of using the \o options in psql, convert to a csv. | |
tail -n +3 results.txt | head -n -2 | sed -r 's/ //g' | sed 's/|/,/g' > results.csv |
This file contains hidden or 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
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class Insert extends Command { | |
/** | |
* The console command name. |
This file contains hidden or 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
var app = angular.module('app', ['restangular']) | |
app.controller('MainCtrl', function($scope, Restangular) { | |
var Widget = Restangular.all('response.json'); | |
$scope.widgets = []; | |
// add transformer | |
Restangular.addElementTransformer('response.json', false, function(widget) { | |
widget.addRestangularMethod('doSomething', 'post'); | |
return widget; |