Skip to content

Instantly share code, notes, and snippets.

SELECT c.oid AS "Table ID",
s.oid AS "Schema ID",
trim(c.relname) AS "Name",
trim(s.nspname) AS "Schema",
trim(u.usename) AS "Owner",
coalesce(c.reltuples, 0)::bigint AS "Rows",
coalesce(t.rows, 0) AS "Rows with deleted",
coalesce(t.sorted_rows, 0) AS "Sorted Rows",
NULL::double PRECISION AS "Total GB",
coalesce(t.blocks * 1048576, 0)::bigint AS "Total Bytes",
DROP FUNCTION IF EXISTS alphanum;
DELIMITER |
CREATE FUNCTION alphanum( str CHAR(32) ) RETURNS CHAR(16)
BEGIN
DECLARE i, len SMALLINT DEFAULT 1;
DECLARE ret CHAR(32) DEFAULT '';
DECLARE c CHAR(1);
SET len = CHAR_LENGTH( str );
REPEAT
BEGIN
SELECT c.oid AS "Table ID",
s.oid AS "Schema ID",
trim(c.relname) AS "Name",
trim(s.nspname) AS "Schema",
trim(u.usename) AS "Owner",
coalesce(c.reltuples, 0)::bigint AS "Rows",
coalesce(t.rows, 0) AS "Rows with deleted",
coalesce(t.sorted_rows, 0) AS "Sorted Rows",
NULL::double PRECISION AS "Total GB",
coalesce(t.blocks * 1048576, 0)::bigint AS "Total Bytes",
# Sales
############################################################
Opportunities by Period, Rep, Region, Channel, Product
- Number of opportunities expected to close within period
- Number of opportunities in the period
- Expected revenue for period
- Change in expected revenue from previous period
- Predicted revenue for the period
- Total age of opportunities within the period
- PHP (https://github.com/keboola/storage-api-php-client)
- AngularJS (https://github.com/keboola/angular-kb/blob/master/src/modules/sapi/sapi-service.coffee)
- Cli (https://github.com/keboola/storage-api-cli)
- .NET (https://github.com/keboola/storage-api-dotnet-client)
- working snippet in Java (https://gist.github.com/Halama/8800932)
- Python wrapper (https://gist.github.com/Halama/6019663)
autocompleted - request was inserted with autocomplete feature (suggest)
ip - client IP address
long_session - long term client ID
page - result page (SERP) number
query - searched query
wordCount - count of words in search query
short_session - short term client ID (expired when browser is closed)
time - query timestamp (can be used for sorting queries in proper order)
other_clicks - timestamp of click onto any non-query result object (ads, pagination, related searches, etc...)
result - field with query results
timestamp,idzdroje,názevzdroje,urlzdroje,titulekčlánku,descriptiončlánku,urlčlánku
@padak
padak / firewall
Last active August 29, 2015 14:07
"Schema":
- dvě sítě za eth1 interfacem (který má IP jen v jedné z nich)
10.0.3.0/24 --\
10.0.4.0/24 ----> 10.0.3.78/32(eth1)<>10.0.254.4/32(eth0)
- routování je řešený přes nějaký vychvávky v AWS VPC
- podstatný je, že to co mi nefunguje, se dostane na eth1 interface a jen se to neprodrbe na eth0 (viz níže)
- takže jde o problém (podle mě) izolovanej na nějakou blbost typu rp_filter (kterej je na nule)
SELECT c.oid AS "Table ID",
-- s.oid AS "Schema ID",
trim(c.relname) AS "Name",
trim(s.nspname) AS "Schema",
trim(u.usename) AS "Owner",
coalesce(c.reltuples, 0)::bigint AS "Rows",
coalesce(t.rows, 0) AS "Rows with deleted",
coalesce(t.sorted_rows, 0) AS "Sorted Rows",
-- NULL::double PRECISION AS "Total GB",
coalesce(t.blocks * 1048576, 0)::bigint AS "Total Bytes",
SELECT
CAST(pg_database.datname AS VARCHAR),
bytes
FROM
(SELECT
p.db_id,
sum(b.blocknum * 1048576) AS bytes
FROM pg_catalog.stv_tbl_perm p JOIN (SELECT
bl.tbl,
bl.slice,