Magic words:
psql -U postgresIf run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).
Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*
| # Example Dockerfile | |
| FROM hello-world |
| import LogmaticJs from 'logmatic-js'; | |
| const track = function (verb) { | |
| // Event fields | |
| const _verb = verb; | |
| let _object = null; | |
| let _target = null; | |
| let _start = null; |
| var page = require('webpage').create(), | |
| url = 'http://example.com/'; | |
| // Put the event handlers somewhere in the code before the action of | |
| // interest (opening the page in question or clicking something) | |
| // http://phantomjs.org/api/webpage/handler/on-console-message.html | |
| page.onConsoleMessage = function(msg, lineNum, sourceId) { | |
| console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")'); | |
| }; |
| import type from 'type-of-is' | |
| export default function parse( input ){ | |
| if( type( input, String ) ){ | |
| return input | |
| } | |
| else if( type( input[ 0 ], Array ) ){ | |
| return input.map( parse ) | |
| } |
| #!/bin/sh | |
| wget "http://www.haproxy.org/download/1.5/src/haproxy-1.5.11.tar.gz" | |
| rpmdev-setuptree | |
| mv haproxy-1.5.11.tar.gz ~/rpmbuild/SOURCES/ | |
| git clone git://github.com/lucaspirola/haproxy-centos.git | |
| cp haproxy-centos/conf/* ~/rpmbuild/SOURCES/ | |
| cp haproxy-centos/spec/* ~/rpmbuild/SPECS/ | |
| cd rpmbuild/ | |
| rpmbuild -ba SPECS/haproxy.spec |
| # Conversão em massa de arquivos shapefiles para geojson usando ogr2ogr | |
| # Para mais informações, veja http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
| # Observação: Assumo que você está rodando o script em uma pasta com um ou mais arquivos zipados contendo shapefiles | |
| # e a saída será como geojson com crs:84 SRC (para uso no github ou por aí) | |
| # conversão em geojson | |
| function shp2geojson() { | |
| ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
| } |
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |