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
| postgres=# select '6 days 23:45:00'::interval - '6 days 23:23:00'::interval; | |
| ?column? | |
| ---------- | |
| 00:22:00 | |
| (1 row) | |
| postgres=# select '00:46:00'::interval - '00:24:00'::interval; | |
| ?column? | |
| ---------- | |
| 00:22:00 |
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
| /* Item names */ | |
| create table item (i_id int, i_name text); | |
| /* Stock counts of items */ | |
| create table stock (s_i_id int, s_quantity int); | |
| /* All rows here represent one order; each row is its line items */ | |
| create table order_line (ol_i_id int, ol_quantity int); | |
| insert into item values(1, 'item 1'); |
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
| create table public.traffic_analysis(date_text text, load_avg_1_min double precision, hostname text not null, ts timestamp); | |
| create type public.weekdays as enum ( | |
| 'Sunday', | |
| 'Monday', | |
| 'Tuesday', | |
| 'Wednesday', | |
| 'Thursday', | |
| 'Friday', | |
| 'Saturday' |
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
| edb=# select now() as "time", now()::timestamptz(0) as "time_round", date_trunc('seconds', now()) as "time_trunc"; | |
| time | time_round | time_trunc | |
| ----------------------------------+---------------------------+--------------------------- | |
| 21-MAY-14 14:19:04.549852 -04:00 | 21-MAY-14 14:19:05 -04:00 | 21-MAY-14 14:19:04 -04:00 | |
| (1 row) |
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
| 1 top -c -d 1 | |
| 2 cd | |
| 3 top -c -d 1 | |
| 4 ping google.com | |
| 5 ifconfig | |
| 6 sudo apt-get install icecast2 | |
| 7 sudo apt-get remove icecast2 | |
| 8 sudo apt-get install icecast2 | |
| 9 sudo apt-get install liquidsoap | |
| 10 man iceauth |
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
| FROM ubuntu | |
| # Update the software repositories | |
| RUN apt-get update | |
| # Install package for lsb_release binary | |
| RUN apt-get install -y lsb-release | |
| # Install package that provides add-apt-repository | |
| RUN apt-get install -y python-software-properties |
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
| #!/bin/bash | |
| set -e | |
| # Usage: | |
| # rsync_parallel.sh [--parallel=N] [rsync args...] | |
| # | |
| # Options: | |
| # --parallel=N Use N parallel processes for transfer. Defaults to 10. | |
| # | |
| # Notes: |
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
| Beware: | |
| ======= | |
| If you wish to compile Postgres with XML support, tough luck! The libxml2 package that comes with MinGW/MSYS, named msys-libxml2, is rejected by gcc like this: | |
| c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/MinGW/msys/1.0/lib/libxml2.a when searching for -lxml2 | |
| This is a known limitation as of now. Andrew Dunstan, the community buildfarm maintainer, as acknowledged this. | |
| Make the environment bearable: |
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
| Administrator@AMAZONA-AK1BTP3 ~ | |
| $ diff -c -r del/build-farm-4.9/ bf/ | |
| diff -c -r del/build-farm-4.9//build-farm.conf bf//build-farm.conf | |
| *** del/build-farm-4.9//build-farm.conf Mon Nov 12 09:47:55 2012 | |
| --- bf//build-farm.conf Thu Jan 3 20:51:07 2013 | |
| *************** | |
| *** 35,41 **** | |
| tar_log_cmd => undef, # default is "tar -z -cf runlogs.tgz *.log" | |
| # replacement must have the same effect | |
| # must be absolute, can be either Unix or Windows style for MSVC |
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 http = require('http'); | |
| var url = 'http://radio.pedromtavares.com:10000'; // URL to a known Icecast stream | |
| var icecast = require('icecast-stack'); | |
| var stream = icecast.createReadStream(url); | |
| // var radio = require("radio-stream"); | |
| // var stream = radio.createReadStream(url); |