This is the Ractive.js clock example implemented in AngularJS. A working Plunkr is also available.
Much of the JavaScript, most of the HTML, and all of the CSS was taken directly from the Ractive.js example for minimal differences in the samples.
| package main | |
| import( | |
| "log" | |
| "net/url" | |
| "net/http" | |
| "net/http/httputil" | |
| ) | |
| func main() { |
This is the Ractive.js clock example implemented in AngularJS. A working Plunkr is also available.
Much of the JavaScript, most of the HTML, and all of the CSS was taken directly from the Ractive.js example for minimal differences in the samples.
| FROM ubuntu | |
| RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
| RUN apt-get update | |
| RUN apt-get upgrade | |
| RUN apt-get install -y openssh-server supervisor | |
| ADD sshd.conf /etc/supervisor/conf.d/sshd.conf | |
| RUN mkdir -p /var/run/sshd |
| // NOTE: ng-app="plunker" + AngularUI module dependency | |
| var app = angular.module('map-app', []); | |
| app.controller('MapCtrl', function($scope) { | |
| $scope.address = function() | |
| { | |
| out = ""; | |
| if( $scope.location.street1 != undefined ) | |
| { |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "runtime" | |
| "runtime/debug" | |
| "runtime/pprof" | |
| "strconv" |
Obviously, the simplest solution would be for the client to share their account details or add us as ‘team admin’, but that is not what this is about.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| { | |
| "estados": [ | |
| { | |
| "sigla": "AC", | |
| "nome": "Acre", | |
| "cidades": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", |
| /** | |
| * Real keep-alive HTTP agent | |
| * | |
| * ------------=================---------------- | |
| * UPDATE: There are more proper implementations for this problem, distributed as | |
| * npm modules like this one: https://github.com/TBEDP/agentkeepalive | |
| * ------------=================---------------- | |
| * | |
| * The http module's agent implementation only keeps the underlying TCP | |
| * connection alive, if there are pending requests towards that endpoint in the agent |