redis
This commit is contained in:
parent
3729131510
commit
2a6f1c5dcf
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
*.swp
|
||||
*.swp
|
||||
|
@ -1,21 +1,21 @@
|
||||
|
||||
Only applies to items that exist in both sets of data
|
||||
|
||||
**Change in Price**
|
||||
|
||||
( P₂ - P₁ ) Q₂
|
||||
|
||||
**Change in Quantity**
|
||||
|
||||
( Q₂ - Q₁ ) P₁
|
||||
|
||||
_To further break out change in quantity_
|
||||
|
||||
|
||||
Change in Quantity - _Volume Related_
|
||||
|
||||
Q₂ ( Q₁ / Σ ( Q₁ ) ) - Q₁
|
||||
|
||||
Change in Quantity - _Mix Related_
|
||||
|
||||
|
||||
Only applies to items that exist in both sets of data
|
||||
|
||||
**Change in Price**
|
||||
|
||||
( P₂ - P₁ ) Q₂
|
||||
|
||||
**Change in Quantity**
|
||||
|
||||
( Q₂ - Q₁ ) P₁
|
||||
|
||||
_To further break out change in quantity_
|
||||
|
||||
|
||||
Change in Quantity - _Volume Related_
|
||||
|
||||
Q₂ ( Q₁ / Σ ( Q₁ ) ) - Q₁
|
||||
|
||||
Change in Quantity - _Mix Related_
|
||||
|
||||
Q₂ - Q₂ ( Q₁ / Σ ( Q₁ ) )
|
8
cms.md
8
cms.md
@ -1,5 +1,5 @@
|
||||
PDMN24-1 Maintain Product Structure
|
||||
IVMN02-4 Maint Part/Plant
|
||||
IVMN14-7 Costing Sheet
|
||||
PDMN31-1 WO Production Reporting
|
||||
PDMN24-1 Maintain Product Structure
|
||||
IVMN02-4 Maint Part/Plant
|
||||
IVMN14-7 Costing Sheet
|
||||
PDMN31-1 WO Production Reporting
|
||||
PDMN06 Maintain WO
|
@ -1,11 +1,11 @@
|
||||
dotnet new console -n "name of directory or project"
|
||||
|
||||
dotnet build
|
||||
|
||||
create exe targeting a runtime: create an executable if not already exists and build dll in bin/Release/win10-x64
|
||||
--------------------------------------------
|
||||
dotnet publish -c Release -r win10-x64
|
||||
|
||||
dotnet publish -c Release -f netcoreapp2.1
|
||||
|
||||
dotnet new console -n "name of directory or project"
|
||||
|
||||
dotnet build
|
||||
|
||||
create exe targeting a runtime: create an executable if not already exists and build dll in bin/Release/win10-x64
|
||||
--------------------------------------------
|
||||
dotnet publish -c Release -r win10-x64
|
||||
|
||||
dotnet publish -c Release -f netcoreapp2.1
|
||||
|
||||
`dotnet restore` -> update/sync packages
|
@ -1,3 +1,3 @@
|
||||
iredmail
|
||||
mailinabox
|
||||
mailcow
|
||||
iredmail
|
||||
mailinabox
|
||||
mailcow
|
||||
|
@ -1,2 +1,2 @@
|
||||
find and replace a word in an entire directory
|
||||
find and replace a word in an entire directory
|
||||
`grep -rl target_word ./ | xargs sed -i 's/target_word/replace_word/g'`
|
@ -1,18 +1,18 @@
|
||||
dbeaver
|
||||
vs code
|
||||
bash
|
||||
vundle
|
||||
|
||||
npgsql
|
||||
pspg
|
||||
postgresql apt repo
|
||||
pgadmin
|
||||
windows postgres
|
||||
|
||||
nodejs
|
||||
|
||||
|
||||
power bi
|
||||
ms data gateway
|
||||
excel add-in
|
||||
|
||||
dbeaver
|
||||
vs code
|
||||
bash
|
||||
vundle
|
||||
|
||||
npgsql
|
||||
pspg
|
||||
postgresql apt repo
|
||||
pgadmin
|
||||
windows postgres
|
||||
|
||||
nodejs
|
||||
|
||||
|
||||
power bi
|
||||
ms data gateway
|
||||
excel add-in
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
|
||||
install R kernel for jupyter to use
|
||||
* `sudo R`
|
||||
* `install.packages('IRkernel')`
|
||||
* `IRkernel::installspec()`
|
||||
|
||||
run on network:
|
||||
`jupyter notebook --ip 10.0.10.15 --port 8888`
|
||||
|
||||
|
||||
basic packages:
|
||||
* ggplot2, plyr, ggExtra, scales
|
||||
|
||||
|
||||
|
||||
install R kernel for jupyter to use
|
||||
* `sudo R`
|
||||
* `install.packages('IRkernel')`
|
||||
* `IRkernel::installspec()`
|
||||
|
||||
run on network:
|
||||
`jupyter notebook --ip 10.0.10.15 --port 8888`
|
||||
|
||||
|
||||
basic packages:
|
||||
* ggplot2, plyr, ggExtra, scales
|
||||
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
create self-signed cert
|
||||
|
||||
https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/
|
||||
```
|
||||
openssl genrsa -out key.pem
|
||||
openssl req -new -key key.pem -out csr.pem
|
||||
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
|
||||
rm csr.pem
|
||||
```
|
||||
|
||||
|
||||
##Chrome stops accepting self-signed certs needs mod
|
||||
|
||||
https://stackoverflow.com/questions/43665243/invalid-self-signed-ssl-cert-subject-alternative-name-missing
|
||||
|
||||
1. set a file v3.ext
|
||||
```
|
||||
authorityKeyIdentifier=keyid,issuer
|
||||
basicConstraints=CA:FALSE
|
||||
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[alt_names]
|
||||
DNS.1 = %%DOMAIN%%
|
||||
```
|
||||
|
||||
2. openssl req -new -key key.pem -out csr.pem -sha256 -extfile v3.ext
|
||||
|
||||
create self-signed cert
|
||||
|
||||
https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/
|
||||
```
|
||||
openssl genrsa -out key.pem
|
||||
openssl req -new -key key.pem -out csr.pem
|
||||
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
|
||||
rm csr.pem
|
||||
```
|
||||
|
||||
|
||||
##Chrome stops accepting self-signed certs needs mod
|
||||
|
||||
https://stackoverflow.com/questions/43665243/invalid-self-signed-ssl-cert-subject-alternative-name-missing
|
||||
|
||||
1. set a file v3.ext
|
||||
```
|
||||
authorityKeyIdentifier=keyid,issuer
|
||||
basicConstraints=CA:FALSE
|
||||
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[alt_names]
|
||||
DNS.1 = %%DOMAIN%%
|
||||
```
|
||||
|
||||
2. openssl req -new -key key.pem -out csr.pem -sha256 -extfile v3.ext
|
||||
|
||||
|
@ -1,77 +1,77 @@
|
||||
Logic to setup production plan, inventory balances, purchases, and shipments
|
||||
|
||||
Starting point
|
||||
- known balances STKB
|
||||
- known available BOLH - not posted
|
||||
- known prod schedule SOFT
|
||||
- known shipments Sales Forecast
|
||||
- forecasted orders Sales Forecast
|
||||
- machines that a part can run on ??
|
||||
- actual run-time performance Alternates
|
||||
- actual BOM performance Alternates
|
||||
- actual scrap performance Alternates
|
||||
- available machine time ??
|
||||
|
||||
Populate
|
||||
- forecasted prod schedule
|
||||
- forecasted on-hand (via forecast perpetual transactions)
|
||||
- forecasted available (via forecast transactions)
|
||||
- forecasted purchases
|
||||
|
||||
Iterate through each calendar day
|
||||
1. materialize forecasted purchases
|
||||
1. update on-hand & available
|
||||
2. materialize production
|
||||
1. update on-hand & available
|
||||
3. materialize transfers
|
||||
1. update on-hand & available
|
||||
3. materialize shipments
|
||||
1. update on-hand & available
|
||||
4. process forecasted order submissions
|
||||
1. check for inventory available
|
||||
1. Yes
|
||||
1. mark unavailable
|
||||
2. schedule shipment for request date
|
||||
2. No or partial
|
||||
1. mark unavailable any partial
|
||||
2. schedule on next open slot regardless of request date (each part should be mapped to certain set of machines)
|
||||
1. raw materials available
|
||||
1. Yes
|
||||
1. mark unavailable (at begin prod date?)
|
||||
2. No
|
||||
1. mark unavailable any partial (at begin prod date?)
|
||||
2. schedule a purchase net of lead time
|
||||
2. sub-components available?
|
||||
1. Yes
|
||||
1. mark unavialable (at begin prod date?)
|
||||
2. No
|
||||
1. (return to 4.1.2.2)
|
||||
3. schedule transfer of production after completion if necessary
|
||||
3. schedule shipment for request date, or production date if past request date
|
||||
|
||||
|
||||
snap-shot STKB
|
||||
snap-shot BOLH
|
||||
snap-shot SOFT
|
||||
|
||||
|
||||
some notes
|
||||
-----------------
|
||||
|
||||
* shift schedules
|
||||
* parallel resources
|
||||
* setup time
|
||||
* efficiencies
|
||||
* scrap rates
|
||||
* blends
|
||||
* known 'A' item volumes planned regardless of demand
|
||||
* visibility window for incomming orders
|
||||
* grouping items to reduce change-overs
|
||||
* initial start-up: merge with current machine schedule
|
||||
* limit start date to child item availability
|
||||
* procurement mix
|
||||
* purchase lag
|
||||
* transfer lag
|
||||
* order priority
|
||||
* inventory minimums
|
||||
Logic to setup production plan, inventory balances, purchases, and shipments
|
||||
|
||||
Starting point
|
||||
- known balances STKB
|
||||
- known available BOLH - not posted
|
||||
- known prod schedule SOFT
|
||||
- known shipments Sales Forecast
|
||||
- forecasted orders Sales Forecast
|
||||
- machines that a part can run on ??
|
||||
- actual run-time performance Alternates
|
||||
- actual BOM performance Alternates
|
||||
- actual scrap performance Alternates
|
||||
- available machine time ??
|
||||
|
||||
Populate
|
||||
- forecasted prod schedule
|
||||
- forecasted on-hand (via forecast perpetual transactions)
|
||||
- forecasted available (via forecast transactions)
|
||||
- forecasted purchases
|
||||
|
||||
Iterate through each calendar day
|
||||
1. materialize forecasted purchases
|
||||
1. update on-hand & available
|
||||
2. materialize production
|
||||
1. update on-hand & available
|
||||
3. materialize transfers
|
||||
1. update on-hand & available
|
||||
3. materialize shipments
|
||||
1. update on-hand & available
|
||||
4. process forecasted order submissions
|
||||
1. check for inventory available
|
||||
1. Yes
|
||||
1. mark unavailable
|
||||
2. schedule shipment for request date
|
||||
2. No or partial
|
||||
1. mark unavailable any partial
|
||||
2. schedule on next open slot regardless of request date (each part should be mapped to certain set of machines)
|
||||
1. raw materials available
|
||||
1. Yes
|
||||
1. mark unavailable (at begin prod date?)
|
||||
2. No
|
||||
1. mark unavailable any partial (at begin prod date?)
|
||||
2. schedule a purchase net of lead time
|
||||
2. sub-components available?
|
||||
1. Yes
|
||||
1. mark unavialable (at begin prod date?)
|
||||
2. No
|
||||
1. (return to 4.1.2.2)
|
||||
3. schedule transfer of production after completion if necessary
|
||||
3. schedule shipment for request date, or production date if past request date
|
||||
|
||||
|
||||
snap-shot STKB
|
||||
snap-shot BOLH
|
||||
snap-shot SOFT
|
||||
|
||||
|
||||
some notes
|
||||
-----------------
|
||||
|
||||
* shift schedules
|
||||
* parallel resources
|
||||
* setup time
|
||||
* efficiencies
|
||||
* scrap rates
|
||||
* blends
|
||||
* known 'A' item volumes planned regardless of demand
|
||||
* visibility window for incomming orders
|
||||
* grouping items to reduce change-overs
|
||||
* initial start-up: merge with current machine schedule
|
||||
* limit start date to child item availability
|
||||
* procurement mix
|
||||
* purchase lag
|
||||
* transfer lag
|
||||
* order priority
|
||||
* inventory minimums
|
||||
* tool availability
|
@ -1,51 +1,51 @@
|
||||
A method to planning sales
|
||||
----------------------------
|
||||
|
||||
## Summary
|
||||
|
||||
1. copy history
|
||||
|
||||
1. start with open orders
|
||||
2. add orders as placed in past
|
||||
1. true-up to current run rate
|
||||
1. normalize price for current pricing
|
||||
1. will need to idenitfy blocks in the base period that best represent pricing efforts
|
||||
2. scale prior periods to match final pricing
|
||||
2. exclude expired products/customers
|
||||
3. scale new developments to reflect full-year (new products customers)
|
||||
4. update cost to current
|
||||
5. request date attainment performance
|
||||
3. walk prior period sales to new baseline sales as change in run-rate
|
||||
|
||||
2. build in changes to current run-rate
|
||||
|
||||
1. volume changes
|
||||
2. pricing changes
|
||||
3. new products (must be defined in future at a mininum)
|
||||
4. future cost changes
|
||||
5. request date attainment
|
||||
|
||||
|
||||
|
||||
| timeline | day | running days | responsible |
|
||||
| -------------------------------------------- | --- | ------------ | ----------- |
|
||||
| **_establish run-rate sales_** | | | |
|
||||
| copy history | 1 | 1 | executor |
|
||||
| identify pricing windows | 1 | 2 | sales team |
|
||||
| scale windows to match final | 1 | 3 | executor |
|
||||
| identify expired products/customers | 3 | 6 | sales team |
|
||||
| eliminate expired volume | 1 | 7 | executor |
|
||||
| identify new products/customers | 3 | 10 | sales team |
|
||||
| scale new to full year volume | 1 | 11 | executor |
|
||||
| **_load new plans_** | | | |
|
||||
| layer in planned changes not yet implemented | | | |
|
||||
| identify changes to existing volume | 3 | 14 | sales team |
|
||||
| load changes | 1 | 15 | executor |
|
||||
| identify changes in price | 3 | 18 | sales team |
|
||||
| load changes | 1 | 19 | executor |
|
||||
| identify new products | 3 | 22 | sales team |
|
||||
| load new | 1 | 23 | executor |
|
||||
|
||||
|
||||
|
||||
Table Layout
|
||||
A method to planning sales
|
||||
----------------------------
|
||||
|
||||
## Summary
|
||||
|
||||
1. copy history
|
||||
|
||||
1. start with open orders
|
||||
2. add orders as placed in past
|
||||
1. true-up to current run rate
|
||||
1. normalize price for current pricing
|
||||
1. will need to idenitfy blocks in the base period that best represent pricing efforts
|
||||
2. scale prior periods to match final pricing
|
||||
2. exclude expired products/customers
|
||||
3. scale new developments to reflect full-year (new products customers)
|
||||
4. update cost to current
|
||||
5. request date attainment performance
|
||||
3. walk prior period sales to new baseline sales as change in run-rate
|
||||
|
||||
2. build in changes to current run-rate
|
||||
|
||||
1. volume changes
|
||||
2. pricing changes
|
||||
3. new products (must be defined in future at a mininum)
|
||||
4. future cost changes
|
||||
5. request date attainment
|
||||
|
||||
|
||||
|
||||
| timeline | day | running days | responsible |
|
||||
| -------------------------------------------- | --- | ------------ | ----------- |
|
||||
| **_establish run-rate sales_** | | | |
|
||||
| copy history | 1 | 1 | executor |
|
||||
| identify pricing windows | 1 | 2 | sales team |
|
||||
| scale windows to match final | 1 | 3 | executor |
|
||||
| identify expired products/customers | 3 | 6 | sales team |
|
||||
| eliminate expired volume | 1 | 7 | executor |
|
||||
| identify new products/customers | 3 | 10 | sales team |
|
||||
| scale new to full year volume | 1 | 11 | executor |
|
||||
| **_load new plans_** | | | |
|
||||
| layer in planned changes not yet implemented | | | |
|
||||
| identify changes to existing volume | 3 | 14 | sales team |
|
||||
| load changes | 1 | 15 | executor |
|
||||
| identify changes in price | 3 | 18 | sales team |
|
||||
| load changes | 1 | 19 | executor |
|
||||
| identify new products | 3 | 22 | sales team |
|
||||
| load new | 1 | 23 | executor |
|
||||
|
||||
|
||||
|
||||
Table Layout
|
||||
|
@ -1,37 +1,37 @@
|
||||
[mailing_list](https://www.postgresql.org/message-id/flat/CAHq%2BKHJOvZT8M-o_sE%2BQzqqBGnUjNubWo_rRmpHZyw5ZUuaseg%40mail.gmail.com)
|
||||
|
||||
|
||||
wouldn't that be Pg authing against the OS (pam) which in turn is forwarding to krb5? which seems like an extra added step
|
||||
|
||||
sfrost [11:11 AM]
|
||||
it's basically this:
|
||||
ktpass -out postgres.keytab -princ
|
||||
POSTGRES/centos(at)MY(dot)TESTDOMAIN(dot)LAN -mapUser enterprisedb -pass XXXXXX
|
||||
-crypto DES-CBC-MD5
|
||||
(except adjusted a bit to make it not use a shitty crypto)
|
||||
you use ktpass to create your keytab file
|
||||
copy the keytab file to the Linux box
|
||||
|
||||
arossouw [11:12 AM]
|
||||
Seems like effort, i'll just play dumb on that one
|
||||
|
||||
sfrost [11:12 AM]
|
||||
oh, gotta fix the princ too or whatever
|
||||
but it's not that hard
|
||||
and you might have to configure the realms, but not necessairly (that info is often in DNS already)
|
||||
then you just tell PG where the keytab file is, set gssapi in PG's hba.conf, and create your users using their princ names, like 'sfrost@SNOWMAN.NET'
|
||||
|
||||
dtseiler [11:13 AM]
|
||||
I’m with @hunleyd, I’d love to see a great howto post on that.
|
||||
|
||||
arossouw [11:14 AM]
|
||||
I suppose the question is what is the advantage of using kerberos, and then deciding if its worth spending time on
|
||||
|
||||
sfrost [11:14 AM]
|
||||
I just wrote it
|
||||
^^^ see above
|
||||
also wrote the advantage...
|
||||
|
||||
|
||||
hunleyd [11:14 AM]
|
||||
[mailing_list](https://www.postgresql.org/message-id/flat/CAHq%2BKHJOvZT8M-o_sE%2BQzqqBGnUjNubWo_rRmpHZyw5ZUuaseg%40mail.gmail.com)
|
||||
|
||||
|
||||
wouldn't that be Pg authing against the OS (pam) which in turn is forwarding to krb5? which seems like an extra added step
|
||||
|
||||
sfrost [11:11 AM]
|
||||
it's basically this:
|
||||
ktpass -out postgres.keytab -princ
|
||||
POSTGRES/centos(at)MY(dot)TESTDOMAIN(dot)LAN -mapUser enterprisedb -pass XXXXXX
|
||||
-crypto DES-CBC-MD5
|
||||
(except adjusted a bit to make it not use a shitty crypto)
|
||||
you use ktpass to create your keytab file
|
||||
copy the keytab file to the Linux box
|
||||
|
||||
arossouw [11:12 AM]
|
||||
Seems like effort, i'll just play dumb on that one
|
||||
|
||||
sfrost [11:12 AM]
|
||||
oh, gotta fix the princ too or whatever
|
||||
but it's not that hard
|
||||
and you might have to configure the realms, but not necessairly (that info is often in DNS already)
|
||||
then you just tell PG where the keytab file is, set gssapi in PG's hba.conf, and create your users using their princ names, like 'sfrost@SNOWMAN.NET'
|
||||
|
||||
dtseiler [11:13 AM]
|
||||
I’m with @hunleyd, I’d love to see a great howto post on that.
|
||||
|
||||
arossouw [11:14 AM]
|
||||
I suppose the question is what is the advantage of using kerberos, and then deciding if its worth spending time on
|
||||
|
||||
sfrost [11:14 AM]
|
||||
I just wrote it
|
||||
^^^ see above
|
||||
also wrote the advantage...
|
||||
|
||||
|
||||
hunleyd [11:14 AM]
|
||||
maybe i'll try this as a 10% project some day
|
@ -1,43 +1,43 @@
|
||||
CREATE OR REPLACE FUNCTION public.jsonb_concat(
|
||||
state jsonb,
|
||||
concat jsonb)
|
||||
RETURNS jsonb AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
--RAISE notice 'state is %', state;
|
||||
--RAISE notice 'concat is %', concat;
|
||||
RETURN state || concat;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE
|
||||
COST 100;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION public.jsonb_concat_distinct_arr(
|
||||
state jsonb,
|
||||
concat jsonb)
|
||||
RETURNS jsonb AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
--RAISE notice 'state is %', state;
|
||||
--RAISE notice 'concat is %', concat;
|
||||
RETURN SELECT jsonb_agg(state || concat;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE
|
||||
COST 100;
|
||||
|
||||
|
||||
DROP AGGREGATE IF EXISTS public.jsonb_arr_aggc(jsonb);
|
||||
CREATE AGGREGATE public.jsonb_arr_aggc(jsonb) (
|
||||
SFUNC=public.jsonb_concat,
|
||||
STYPE=jsonb,
|
||||
INITCOND='[]'
|
||||
);
|
||||
|
||||
DROP AGGREGATE IF EXISTS public.jsonb_obj_aggc(jsonb);
|
||||
CREATE AGGREGATE public.jsonb_obj_aggc(jsonb) (
|
||||
SFUNC=public.jsonb_concat,
|
||||
STYPE=jsonb,
|
||||
INITCOND='{}'
|
||||
CREATE OR REPLACE FUNCTION public.jsonb_concat(
|
||||
state jsonb,
|
||||
concat jsonb)
|
||||
RETURNS jsonb AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
--RAISE notice 'state is %', state;
|
||||
--RAISE notice 'concat is %', concat;
|
||||
RETURN state || concat;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE
|
||||
COST 100;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION public.jsonb_concat_distinct_arr(
|
||||
state jsonb,
|
||||
concat jsonb)
|
||||
RETURNS jsonb AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
--RAISE notice 'state is %', state;
|
||||
--RAISE notice 'concat is %', concat;
|
||||
RETURN SELECT jsonb_agg(state || concat;
|
||||
END;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE
|
||||
COST 100;
|
||||
|
||||
|
||||
DROP AGGREGATE IF EXISTS public.jsonb_arr_aggc(jsonb);
|
||||
CREATE AGGREGATE public.jsonb_arr_aggc(jsonb) (
|
||||
SFUNC=public.jsonb_concat,
|
||||
STYPE=jsonb,
|
||||
INITCOND='[]'
|
||||
);
|
||||
|
||||
DROP AGGREGATE IF EXISTS public.jsonb_obj_aggc(jsonb);
|
||||
CREATE AGGREGATE public.jsonb_obj_aggc(jsonb) (
|
||||
SFUNC=public.jsonb_concat,
|
||||
STYPE=jsonb,
|
||||
INITCOND='{}'
|
||||
);
|
@ -1,28 +1,28 @@
|
||||
SELECT
|
||||
c.relname table_name,
|
||||
td.description table_description,
|
||||
n.nspname schema_name,
|
||||
a.attname As column_name,
|
||||
cd.description column_description
|
||||
FROM
|
||||
pg_class As c
|
||||
INNER JOIN pg_attribute As a ON
|
||||
c.oid = a.attrelid
|
||||
LEFT JOIN pg_namespace n ON
|
||||
n.oid = c.relnamespace
|
||||
LEFT JOIN pg_tablespace t ON
|
||||
t.oid = c.reltablespace
|
||||
LEFT JOIN pg_description As cd ON
|
||||
cd.objoid = c.oid
|
||||
AND cd.objsubid = a.attnum
|
||||
LEFT JOIN pg_description As td ON
|
||||
td.objoid = c.oid
|
||||
AND td.objsubid = 0
|
||||
WHERE
|
||||
c.relkind IN('r', 'v')
|
||||
--AND a.attname = 'd07txn'
|
||||
AND cd.description like '%Transaction Number%'
|
||||
ORDER BY
|
||||
n.nspname,
|
||||
c.relname,
|
||||
SELECT
|
||||
c.relname table_name,
|
||||
td.description table_description,
|
||||
n.nspname schema_name,
|
||||
a.attname As column_name,
|
||||
cd.description column_description
|
||||
FROM
|
||||
pg_class As c
|
||||
INNER JOIN pg_attribute As a ON
|
||||
c.oid = a.attrelid
|
||||
LEFT JOIN pg_namespace n ON
|
||||
n.oid = c.relnamespace
|
||||
LEFT JOIN pg_tablespace t ON
|
||||
t.oid = c.reltablespace
|
||||
LEFT JOIN pg_description As cd ON
|
||||
cd.objoid = c.oid
|
||||
AND cd.objsubid = a.attnum
|
||||
LEFT JOIN pg_description As td ON
|
||||
td.objoid = c.oid
|
||||
AND td.objsubid = 0
|
||||
WHERE
|
||||
c.relkind IN('r', 'v')
|
||||
--AND a.attname = 'd07txn'
|
||||
AND cd.description like '%Transaction Number%'
|
||||
ORDER BY
|
||||
n.nspname,
|
||||
c.relname,
|
||||
a.attname
|
@ -1,99 +1,99 @@
|
||||
# PostgreSQL Client Authentication Configuration File
|
||||
# ===================================================
|
||||
#
|
||||
# Refer to the "Client Authentication" section in the PostgreSQL
|
||||
# documentation for a complete description of this file. A short
|
||||
# synopsis follows.
|
||||
#
|
||||
# This file controls: which hosts are allowed to connect, how clients
|
||||
# are authenticated, which PostgreSQL user names they can use, which
|
||||
# databases they can access. Records take one of these forms:
|
||||
#
|
||||
# local DATABASE USER METHOD [OPTIONS]
|
||||
# host DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
#
|
||||
# (The uppercase items must be replaced by actual values.)
|
||||
#
|
||||
# The first field is the connection type: "local" is a Unix-domain
|
||||
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
|
||||
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
|
||||
# plain TCP/IP socket.
|
||||
#
|
||||
# DATABASE can be "all", "sameuser", "samerole", "replication", a
|
||||
# database name, or a comma-separated list thereof. The "all"
|
||||
# keyword does not match "replication". Access to replication
|
||||
# must be enabled in a separate record (see example below).
|
||||
#
|
||||
# USER can be "all", a user name, a group name prefixed with "+", or a
|
||||
# comma-separated list thereof. In both the DATABASE and USER fields
|
||||
# you can also write a file name prefixed with "@" to include names
|
||||
# from a separate file.
|
||||
#
|
||||
# ADDRESS specifies the set of hosts the record matches. It can be a
|
||||
# host name, or it is made up of an IP address and a CIDR mask that is
|
||||
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
|
||||
# specifies the number of significant bits in the mask. A host name
|
||||
# that starts with a dot (.) matches a suffix of the actual host name.
|
||||
# Alternatively, you can write an IP address and netmask in separate
|
||||
# columns to specify the set of hosts. Instead of a CIDR-address, you
|
||||
# can write "samehost" to match any of the server's own IP addresses,
|
||||
# or "samenet" to match any address in any subnet that the server is
|
||||
# directly connected to.
|
||||
#
|
||||
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
|
||||
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
|
||||
# Note that "password" sends passwords in clear text; "md5" or
|
||||
# "scram-sha-256" are preferred since they send encrypted passwords.
|
||||
#
|
||||
# OPTIONS are a set of options for the authentication in the format
|
||||
# NAME=VALUE. The available options depend on the different
|
||||
# authentication methods -- refer to the "Client Authentication"
|
||||
# section in the documentation for a list of which options are
|
||||
# available for which authentication methods.
|
||||
#
|
||||
# Database and user names containing spaces, commas, quotes and other
|
||||
# special characters must be quoted. Quoting one of the keywords
|
||||
# "all", "sameuser", "samerole" or "replication" makes the name lose
|
||||
# its special character, and just match a database or username with
|
||||
# that name.
|
||||
#
|
||||
# This file is read on server startup and when the server receives a
|
||||
# SIGHUP signal. If you edit the file on a running system, you have to
|
||||
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
|
||||
# or execute "SELECT pg_reload_conf()".
|
||||
#
|
||||
# Put your actual configuration here
|
||||
# ----------------------------------
|
||||
#
|
||||
# If you want to allow non-local connections, you need to add more
|
||||
# "host" records. In that case you will also need to make PostgreSQL
|
||||
# listen on a non-local interface via the listen_addresses
|
||||
# configuration parameter, or via the -i or -h command line switches.
|
||||
|
||||
|
||||
|
||||
|
||||
# DO NOT DISABLE!
|
||||
# If you change this first entry you will need to make sure that the
|
||||
# database superuser can access the database using some other method.
|
||||
# Noninteractive access to all databases is required during automatic
|
||||
# maintenance (custom daily cronjobs, replication, and similar tasks).
|
||||
#
|
||||
# Database administrative login by Unix domain socket
|
||||
local all postgres peer
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all peer
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 md5
|
||||
# IPv6 local connections:
|
||||
host all all ::1/128 md5
|
||||
# Allow replication connections from localhost, by a user with the
|
||||
# replication privilege.
|
||||
local replication all peer
|
||||
host replication all 127.0.0.1/32 md5
|
||||
host replication all ::1/128 md5
|
||||
# PostgreSQL Client Authentication Configuration File
|
||||
# ===================================================
|
||||
#
|
||||
# Refer to the "Client Authentication" section in the PostgreSQL
|
||||
# documentation for a complete description of this file. A short
|
||||
# synopsis follows.
|
||||
#
|
||||
# This file controls: which hosts are allowed to connect, how clients
|
||||
# are authenticated, which PostgreSQL user names they can use, which
|
||||
# databases they can access. Records take one of these forms:
|
||||
#
|
||||
# local DATABASE USER METHOD [OPTIONS]
|
||||
# host DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
#
|
||||
# (The uppercase items must be replaced by actual values.)
|
||||
#
|
||||
# The first field is the connection type: "local" is a Unix-domain
|
||||
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
|
||||
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
|
||||
# plain TCP/IP socket.
|
||||
#
|
||||
# DATABASE can be "all", "sameuser", "samerole", "replication", a
|
||||
# database name, or a comma-separated list thereof. The "all"
|
||||
# keyword does not match "replication". Access to replication
|
||||
# must be enabled in a separate record (see example below).
|
||||
#
|
||||
# USER can be "all", a user name, a group name prefixed with "+", or a
|
||||
# comma-separated list thereof. In both the DATABASE and USER fields
|
||||
# you can also write a file name prefixed with "@" to include names
|
||||
# from a separate file.
|
||||
#
|
||||
# ADDRESS specifies the set of hosts the record matches. It can be a
|
||||
# host name, or it is made up of an IP address and a CIDR mask that is
|
||||
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
|
||||
# specifies the number of significant bits in the mask. A host name
|
||||
# that starts with a dot (.) matches a suffix of the actual host name.
|
||||
# Alternatively, you can write an IP address and netmask in separate
|
||||
# columns to specify the set of hosts. Instead of a CIDR-address, you
|
||||
# can write "samehost" to match any of the server's own IP addresses,
|
||||
# or "samenet" to match any address in any subnet that the server is
|
||||
# directly connected to.
|
||||
#
|
||||
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
|
||||
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
|
||||
# Note that "password" sends passwords in clear text; "md5" or
|
||||
# "scram-sha-256" are preferred since they send encrypted passwords.
|
||||
#
|
||||
# OPTIONS are a set of options for the authentication in the format
|
||||
# NAME=VALUE. The available options depend on the different
|
||||
# authentication methods -- refer to the "Client Authentication"
|
||||
# section in the documentation for a list of which options are
|
||||
# available for which authentication methods.
|
||||
#
|
||||
# Database and user names containing spaces, commas, quotes and other
|
||||
# special characters must be quoted. Quoting one of the keywords
|
||||
# "all", "sameuser", "samerole" or "replication" makes the name lose
|
||||
# its special character, and just match a database or username with
|
||||
# that name.
|
||||
#
|
||||
# This file is read on server startup and when the server receives a
|
||||
# SIGHUP signal. If you edit the file on a running system, you have to
|
||||
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
|
||||
# or execute "SELECT pg_reload_conf()".
|
||||
#
|
||||
# Put your actual configuration here
|
||||
# ----------------------------------
|
||||
#
|
||||
# If you want to allow non-local connections, you need to add more
|
||||
# "host" records. In that case you will also need to make PostgreSQL
|
||||
# listen on a non-local interface via the listen_addresses
|
||||
# configuration parameter, or via the -i or -h command line switches.
|
||||
|
||||
|
||||
|
||||
|
||||
# DO NOT DISABLE!
|
||||
# If you change this first entry you will need to make sure that the
|
||||
# database superuser can access the database using some other method.
|
||||
# Noninteractive access to all databases is required during automatic
|
||||
# maintenance (custom daily cronjobs, replication, and similar tasks).
|
||||
#
|
||||
# Database administrative login by Unix domain socket
|
||||
local all postgres peer
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all peer
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 md5
|
||||
# IPv6 local connections:
|
||||
host all all ::1/128 md5
|
||||
# Allow replication connections from localhost, by a user with the
|
||||
# replication privilege.
|
||||
local replication all peer
|
||||
host replication all 127.0.0.1/32 md5
|
||||
host replication all ::1/128 md5
|
||||
|
@ -1,107 +1,107 @@
|
||||
# PostgreSQL Client Authentication Configuration File
|
||||
# ===================================================
|
||||
#
|
||||
# Refer to the "Client Authentication" section in the PostgreSQL
|
||||
# documentation for a complete description of this file. A short
|
||||
# synopsis follows.
|
||||
#
|
||||
# This file controls: which hosts are allowed to connect, how clients
|
||||
# are authenticated, which PostgreSQL user names they can use, which
|
||||
# databases they can access. Records take one of these forms:
|
||||
#
|
||||
# local DATABASE USER METHOD [OPTIONS]
|
||||
# host DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
#
|
||||
# (The uppercase items must be replaced by actual values.)
|
||||
#
|
||||
# The first field is the connection type: "local" is a Unix-domain
|
||||
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
|
||||
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
|
||||
# plain TCP/IP socket.
|
||||
#
|
||||
# DATABASE can be "all", "sameuser", "samerole", "replication", a
|
||||
# database name, or a comma-separated list thereof. The "all"
|
||||
# keyword does not match "replication". Access to replication
|
||||
# must be enabled in a separate record (see example below).
|
||||
#
|
||||
# USER can be "all", a user name, a group name prefixed with "+", or a
|
||||
# comma-separated list thereof. In both the DATABASE and USER fields
|
||||
# you can also write a file name prefixed with "@" to include names
|
||||
# from a separate file.
|
||||
#
|
||||
# ADDRESS specifies the set of hosts the record matches. It can be a
|
||||
# host name, or it is made up of an IP address and a CIDR mask that is
|
||||
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
|
||||
# specifies the number of significant bits in the mask. A host name
|
||||
# that starts with a dot (.) matches a suffix of the actual host name.
|
||||
# Alternatively, you can write an IP address and netmask in separate
|
||||
# columns to specify the set of hosts. Instead of a CIDR-address, you
|
||||
# can write "samehost" to match any of the server's own IP addresses,
|
||||
# or "samenet" to match any address in any subnet that the server is
|
||||
# directly connected to.
|
||||
#
|
||||
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
|
||||
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
|
||||
# Note that "password" sends passwords in clear text; "md5" or
|
||||
# "scram-sha-256" are preferred since they send encrypted passwords.
|
||||
#
|
||||
# OPTIONS are a set of options for the authentication in the format
|
||||
# NAME=VALUE. The available options depend on the different
|
||||
# authentication methods -- refer to the "Client Authentication"
|
||||
# section in the documentation for a list of which options are
|
||||
# available for which authentication methods.
|
||||
#
|
||||
# Database and user names containing spaces, commas, quotes and other
|
||||
# special characters must be quoted. Quoting one of the keywords
|
||||
# "all", "sameuser", "samerole" or "replication" makes the name lose
|
||||
# its special character, and just match a database or username with
|
||||
# that name.
|
||||
#
|
||||
# This file is read on server startup and when the server receives a
|
||||
# SIGHUP signal. If you edit the file on a running system, you have to
|
||||
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
|
||||
# or execute "SELECT pg_reload_conf()".
|
||||
#
|
||||
# Put your actual configuration here
|
||||
# ----------------------------------
|
||||
#
|
||||
# If you want to allow non-local connections, you need to add more
|
||||
# "host" records. In that case you will also need to make PostgreSQL
|
||||
# listen on a non-local interface via the listen_addresses
|
||||
# configuration parameter, or via the -i or -h command line switches.
|
||||
|
||||
|
||||
|
||||
|
||||
# DO NOT DISABLE!
|
||||
# If you change this first entry you will need to make sure that the
|
||||
# database superuser can access the database using some other method.
|
||||
# Noninteractive access to all databases is required during automatic
|
||||
# maintenance (custom daily cronjobs, replication, and similar tasks).
|
||||
#
|
||||
# Database administrative login by Unix domain socket
|
||||
#local all postgres peer
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
# IPv4 local & remote connections:
|
||||
host ubm report 127.0.0.1/32 trust
|
||||
host ubm powerbi 127.0.0.1/32 trust
|
||||
host ubm api 127.0.0.1/32 md5
|
||||
host dev api 127.0.0.1/32 md5
|
||||
host all all 127.0.0.1/32 scram-sha-256
|
||||
host ubm report 0.0.0.0/0 trust
|
||||
host ubm api 0.0.0.0/0 md5
|
||||
host dev api 0.0.0.0/0 md5
|
||||
host ubm ptrowbridge_md5 0.0.0.0/0 md5
|
||||
host all all 0.0.0.0/0 scram-sha-256
|
||||
# IPv6 local connections:
|
||||
host ubm report fe80::/10 trust
|
||||
host ubm powerbi fe80::/10 trust
|
||||
host ubm api fe80::/10 md5
|
||||
host dev api fe80::/10 md5
|
||||
host ubm ptrowbridge_md5 fe80::/10 md5
|
||||
host all all fe80::/10 scram-sha-256
|
||||
host all all ::/10 scram-sha-256
|
||||
# PostgreSQL Client Authentication Configuration File
|
||||
# ===================================================
|
||||
#
|
||||
# Refer to the "Client Authentication" section in the PostgreSQL
|
||||
# documentation for a complete description of this file. A short
|
||||
# synopsis follows.
|
||||
#
|
||||
# This file controls: which hosts are allowed to connect, how clients
|
||||
# are authenticated, which PostgreSQL user names they can use, which
|
||||
# databases they can access. Records take one of these forms:
|
||||
#
|
||||
# local DATABASE USER METHOD [OPTIONS]
|
||||
# host DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
|
||||
#
|
||||
# (The uppercase items must be replaced by actual values.)
|
||||
#
|
||||
# The first field is the connection type: "local" is a Unix-domain
|
||||
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
|
||||
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
|
||||
# plain TCP/IP socket.
|
||||
#
|
||||
# DATABASE can be "all", "sameuser", "samerole", "replication", a
|
||||
# database name, or a comma-separated list thereof. The "all"
|
||||
# keyword does not match "replication". Access to replication
|
||||
# must be enabled in a separate record (see example below).
|
||||
#
|
||||
# USER can be "all", a user name, a group name prefixed with "+", or a
|
||||
# comma-separated list thereof. In both the DATABASE and USER fields
|
||||
# you can also write a file name prefixed with "@" to include names
|
||||
# from a separate file.
|
||||
#
|
||||
# ADDRESS specifies the set of hosts the record matches. It can be a
|
||||
# host name, or it is made up of an IP address and a CIDR mask that is
|
||||
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
|
||||
# specifies the number of significant bits in the mask. A host name
|
||||
# that starts with a dot (.) matches a suffix of the actual host name.
|
||||
# Alternatively, you can write an IP address and netmask in separate
|
||||
# columns to specify the set of hosts. Instead of a CIDR-address, you
|
||||
# can write "samehost" to match any of the server's own IP addresses,
|
||||
# or "samenet" to match any address in any subnet that the server is
|
||||
# directly connected to.
|
||||
#
|
||||
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
|
||||
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
|
||||
# Note that "password" sends passwords in clear text; "md5" or
|
||||
# "scram-sha-256" are preferred since they send encrypted passwords.
|
||||
#
|
||||
# OPTIONS are a set of options for the authentication in the format
|
||||
# NAME=VALUE. The available options depend on the different
|
||||
# authentication methods -- refer to the "Client Authentication"
|
||||
# section in the documentation for a list of which options are
|
||||
# available for which authentication methods.
|
||||
#
|
||||
# Database and user names containing spaces, commas, quotes and other
|
||||
# special characters must be quoted. Quoting one of the keywords
|
||||
# "all", "sameuser", "samerole" or "replication" makes the name lose
|
||||
# its special character, and just match a database or username with
|
||||
# that name.
|
||||
#
|
||||
# This file is read on server startup and when the server receives a
|
||||
# SIGHUP signal. If you edit the file on a running system, you have to
|
||||
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
|
||||
# or execute "SELECT pg_reload_conf()".
|
||||
#
|
||||
# Put your actual configuration here
|
||||
# ----------------------------------
|
||||
#
|
||||
# If you want to allow non-local connections, you need to add more
|
||||
# "host" records. In that case you will also need to make PostgreSQL
|
||||
# listen on a non-local interface via the listen_addresses
|
||||
# configuration parameter, or via the -i or -h command line switches.
|
||||
|
||||
|
||||
|
||||
|
||||
# DO NOT DISABLE!
|
||||
# If you change this first entry you will need to make sure that the
|
||||
# database superuser can access the database using some other method.
|
||||
# Noninteractive access to all databases is required during automatic
|
||||
# maintenance (custom daily cronjobs, replication, and similar tasks).
|
||||
#
|
||||
# Database administrative login by Unix domain socket
|
||||
#local all postgres peer
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
# IPv4 local & remote connections:
|
||||
host ubm report 127.0.0.1/32 trust
|
||||
host ubm powerbi 127.0.0.1/32 trust
|
||||
host ubm api 127.0.0.1/32 md5
|
||||
host dev api 127.0.0.1/32 md5
|
||||
host all all 127.0.0.1/32 scram-sha-256
|
||||
host ubm report 0.0.0.0/0 trust
|
||||
host ubm api 0.0.0.0/0 md5
|
||||
host dev api 0.0.0.0/0 md5
|
||||
host ubm ptrowbridge_md5 0.0.0.0/0 md5
|
||||
host all all 0.0.0.0/0 scram-sha-256
|
||||
# IPv6 local connections:
|
||||
host ubm report fe80::/10 trust
|
||||
host ubm powerbi fe80::/10 trust
|
||||
host ubm api fe80::/10 md5
|
||||
host dev api fe80::/10 md5
|
||||
host ubm ptrowbridge_md5 fe80::/10 md5
|
||||
host all all fe80::/10 scram-sha-256
|
||||
host all all ::/10 scram-sha-256
|
||||
host all all ::/0 scram-sha-256
|
@ -1,29 +1,29 @@
|
||||
setup for single sign on with [SSPI](https://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows)
|
||||
|
||||
md5 hash is salted with username in front
|
||||
|
||||
|
||||
Memory
|
||||
=========================================================
|
||||
see whats in the buffer cache with pg_buffercache
|
||||
|
||||
`CREATE EXTENSION pg_buffercache`
|
||||
|
||||
```
|
||||
SELECT
|
||||
c.relname,
|
||||
COUNT(*) AS buffers
|
||||
FROM
|
||||
pg_class c
|
||||
INNER JOIN pg_buffercache b ON
|
||||
b.relfilenode = c.relfilenode
|
||||
INNER JOIN pg_database d ON
|
||||
( b.reldatabase = d.oid
|
||||
AND d.datname = CURRENT_DATABASE())
|
||||
GROUP BY
|
||||
c.relname
|
||||
ORDER BY
|
||||
2 DESC
|
||||
LIMIT 100;
|
||||
```
|
||||
|
||||
setup for single sign on with [SSPI](https://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows)
|
||||
|
||||
md5 hash is salted with username in front
|
||||
|
||||
|
||||
Memory
|
||||
=========================================================
|
||||
see whats in the buffer cache with pg_buffercache
|
||||
|
||||
`CREATE EXTENSION pg_buffercache`
|
||||
|
||||
```
|
||||
SELECT
|
||||
c.relname,
|
||||
COUNT(*) AS buffers
|
||||
FROM
|
||||
pg_class c
|
||||
INNER JOIN pg_buffercache b ON
|
||||
b.relfilenode = c.relfilenode
|
||||
INNER JOIN pg_database d ON
|
||||
( b.reldatabase = d.oid
|
||||
AND d.datname = CURRENT_DATABASE())
|
||||
GROUP BY
|
||||
c.relname
|
||||
ORDER BY
|
||||
2 DESC
|
||||
LIMIT 100;
|
||||
```
|
||||
|
||||
|
@ -1,36 +1,36 @@
|
||||
Version 10 Features
|
||||
===================
|
||||
|
||||
Auto Logging [blog](http://databasedoings.blogspot.com/2017/07/cool-stuff-in-postgresql-10-auto-logging.html)
|
||||
|
||||
Transition Tables [blog](http://databasedoings.blogspot.com/2017/07/cool-stuff-in-postgresql-10-transition.html)
|
||||
|
||||
Correlated Columns Query Plan [blog](https://blog.2ndquadrant.com/pg-phriday-crazy-correlated-column-crusade/)
|
||||
|
||||
Native Partitioning
|
||||
|
||||
Logical Replication
|
||||
|
||||
Add a version of jsonb's delete operator that takes an array of keys to delete (Magnus Hagander)
|
||||
|
||||
Make json_populate_record() and related functions process JSON arrays and objects recursively (Nikita Glukhov)
|
||||
|
||||
Identity Columns [blog](https://blog.2ndquadrant.com/postgresql-10-identity-columns/)
|
||||
|
||||
Add view pg_hba_file_rules to display the contents of pg_hba.conf (Haribabu Kommi)
|
||||
|
||||
Add XMLTABLE function that converts XML-formatted data into a row set (Pavel Stehule, Álvaro Herrera)
|
||||
|
||||
|
||||
Security
|
||||
===================
|
||||
|
||||
LDAP & Active Directory [blog](https://www.openscg.com/2017/07/setting-up-ldap-with-active-directory-in-postgresql/)
|
||||
|
||||
Add SCRAM-SHA-256 support for password negotiation and storage (Michael Paquier, Heikki Linnakangas)
|
||||
|
||||
|
||||
Monitoring
|
||||
====================
|
||||
|
||||
file system info - [pg_stat_kcache](https://rjuju.github.io/postgresql/2018/07/17/pg_stat_kcache-2-1-is-out.html)
|
||||
Version 10 Features
|
||||
===================
|
||||
|
||||
Auto Logging [blog](http://databasedoings.blogspot.com/2017/07/cool-stuff-in-postgresql-10-auto-logging.html)
|
||||
|
||||
Transition Tables [blog](http://databasedoings.blogspot.com/2017/07/cool-stuff-in-postgresql-10-transition.html)
|
||||
|
||||
Correlated Columns Query Plan [blog](https://blog.2ndquadrant.com/pg-phriday-crazy-correlated-column-crusade/)
|
||||
|
||||
Native Partitioning
|
||||
|
||||
Logical Replication
|
||||
|
||||
Add a version of jsonb's delete operator that takes an array of keys to delete (Magnus Hagander)
|
||||
|
||||
Make json_populate_record() and related functions process JSON arrays and objects recursively (Nikita Glukhov)
|
||||
|
||||
Identity Columns [blog](https://blog.2ndquadrant.com/postgresql-10-identity-columns/)
|
||||
|
||||
Add view pg_hba_file_rules to display the contents of pg_hba.conf (Haribabu Kommi)
|
||||
|
||||
Add XMLTABLE function that converts XML-formatted data into a row set (Pavel Stehule, Álvaro Herrera)
|
||||
|
||||
|
||||
Security
|
||||
===================
|
||||
|
||||
LDAP & Active Directory [blog](https://www.openscg.com/2017/07/setting-up-ldap-with-active-directory-in-postgresql/)
|
||||
|
||||
Add SCRAM-SHA-256 support for password negotiation and storage (Michael Paquier, Heikki Linnakangas)
|
||||
|
||||
|
||||
Monitoring
|
||||
====================
|
||||
|
||||
file system info - [pg_stat_kcache](https://rjuju.github.io/postgresql/2018/07/17/pg_stat_kcache-2-1-is-out.html)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,39 +1,39 @@
|
||||
DROP USER IF EXISTS report;
|
||||
|
||||
SET password_encryption = 'scram-sha-256';
|
||||
|
||||
CREATE ROLE report WITH
|
||||
LOGIN
|
||||
NOSUPERUSER
|
||||
NOCREATEDB
|
||||
NOCREATEROLE
|
||||
INHERIT
|
||||
NOREPLICATION
|
||||
CONNECTION LIMIT -1
|
||||
PASSWORD 'report';
|
||||
|
||||
--------------------grant--------------------------------------------------
|
||||
|
||||
GRANT USAGE ON SCHEMA lgdat TO report;
|
||||
|
||||
GRANT SELECT /*, UPDATE, INSERT, DELETE*/ ON ALL TABLES IN SCHEMA lgdat TO report;
|
||||
|
||||
GRANT USAGE ON ALL SEQUENCES IN SCHEMA lgdat TO report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat GRANT SELECT/*, UPDATE, INSERT, DELETE*/ ON TABLES TO report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat GRANT USAGE ON SEQUENCES TO report;
|
||||
|
||||
---------------------------revoke---------------------------------------
|
||||
|
||||
REVOKE USAGE ON SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE USAGE ON SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE SELECT , UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE USAGE ON ALL SEQUENCES IN SCHEMA lgdat FROM report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat REVOKE SELECT, UPDATE, INSERT, DELETE ON TABLES FROM report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat REVOKE USAGE ON SEQUENCES FROM report;
|
||||
DROP USER IF EXISTS report;
|
||||
|
||||
SET password_encryption = 'scram-sha-256';
|
||||
|
||||
CREATE ROLE report WITH
|
||||
LOGIN
|
||||
NOSUPERUSER
|
||||
NOCREATEDB
|
||||
NOCREATEROLE
|
||||
INHERIT
|
||||
NOREPLICATION
|
||||
CONNECTION LIMIT -1
|
||||
PASSWORD 'report';
|
||||
|
||||
--------------------grant--------------------------------------------------
|
||||
|
||||
GRANT USAGE ON SCHEMA lgdat TO report;
|
||||
|
||||
GRANT SELECT /*, UPDATE, INSERT, DELETE*/ ON ALL TABLES IN SCHEMA lgdat TO report;
|
||||
|
||||
GRANT USAGE ON ALL SEQUENCES IN SCHEMA lgdat TO report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat GRANT SELECT/*, UPDATE, INSERT, DELETE*/ ON TABLES TO report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat GRANT USAGE ON SEQUENCES TO report;
|
||||
|
||||
---------------------------revoke---------------------------------------
|
||||
|
||||
REVOKE USAGE ON SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE USAGE ON SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE SELECT , UPDATE, INSERT, DELETE ON ALL TABLES IN SCHEMA lgdat FROM report;
|
||||
|
||||
REVOKE USAGE ON ALL SEQUENCES IN SCHEMA lgdat FROM report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat REVOKE SELECT, UPDATE, INSERT, DELETE ON TABLES FROM report;
|
||||
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA lgdat REVOKE USAGE ON SEQUENCES FROM report;
|
||||
|
11
redis.md
Normal file
11
redis.md
Normal file
@ -0,0 +1,11 @@
|
||||
should be set to bind to 127.0.0.1::1 so as to only accept localhost connections
|
||||
|
||||
should be able to run `redis-cli` after clean install which defauts to run on port 6379
|
||||
|
||||
run `openssl rand 60 | openssl base64 -A` to generate a random strong password
|
||||
|
||||
set as value at `requirepass {pw}`
|
||||
|
||||
some addition info on disabling dangerous commands
|
||||
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04
|
||||
|
126
role.md
126
role.md
@ -1,64 +1,64 @@
|
||||
Deriving The Trial Balance
|
||||
=============================================================================================================
|
||||
* Entries and reocniliations
|
||||
* Payroll
|
||||
* Data: Retain all payroll data in a `database` to build entries
|
||||
* Mappings: Configure `Paycom GL Interface`
|
||||
* `401k`: book disbursements and reconcile to Paycom withholdings
|
||||
* `FSA`: book FSA funding entries and reconcile to Paycom withholdings
|
||||
* Debt & Cash
|
||||
* Data: retain all PNC information available in a `database` to build entries (cash, revolver, debt)
|
||||
* Book all PNC `loan activity`
|
||||
* Book interest on `notes`
|
||||
* Reconcile all balance sheet `debt`
|
||||
* Book `interest rate swap` valuation
|
||||
* Bank Rec:
|
||||
* book entry to break out `freight checks`
|
||||
* book entries to clean up missed `fees`
|
||||
* book entries to deal with `miscelaneous discrepencies`
|
||||
* book entry to classify `outstanding checks` as liabilities
|
||||
* Intercompany Activity
|
||||
* Support `transfer pricing` entry
|
||||
* Book `consolidating` entries
|
||||
* Book `currency translation adjustment` for consolidated USD trial balance
|
||||
* Reconcile `CTA` & `Equity`
|
||||
* Reclassify any `intercompany liabilites` out of the trade accounts
|
||||
* Validate that `intercompany balances` are eliminated from consolidated trial balance
|
||||
* Other Balance Sheet Items
|
||||
* Book and reconcile amortization of `intangibles`
|
||||
* Book and reconcile amortization of `defered financing costs`
|
||||
* Book RSM determined `tax provision` and current year `tax accrual`
|
||||
* CMS Module Corrections
|
||||
* book entry to fix `virtual sales`
|
||||
* book entry to fix `credits`
|
||||
* furnish a report to the plants breaking out the `book to perpetual` issues
|
||||
* sales timing and valuation issues
|
||||
* cost roll impact
|
||||
* production ledger issues
|
||||
* voucher issues
|
||||
* issues with transfers
|
||||
* issues with returns
|
||||
* Configuration
|
||||
* Module accounts (sales, inventory, production, manual adjustments, AP, AR, intecompany)
|
||||
* Chart of Accounts
|
||||
* EBITDA flags
|
||||
* consolidation flags
|
||||
* consolidation heirarchy
|
||||
* financial statement lines
|
||||
* currency indicator
|
||||
|
||||
Interpreting The Trial Balance
|
||||
=========================================================================================================
|
||||
* Rebuild trial balance into alternate financial statement formats
|
||||
* Rebuilt subledger that matches original ledger
|
||||
* Rebuild production subledger that does not match original
|
||||
* Sales Matrix
|
||||
* A large number of reports that I can't even list but are maintained [here](https://bitbucket.org/hccompanies/hc_ubm/src/master/)
|
||||
|
||||
Forecasting
|
||||
=============================
|
||||
* Product Strucutre Explosion Logic
|
||||
* global scale cost change estimates
|
||||
* production plans
|
||||
* inventory forecasts
|
||||
Deriving The Trial Balance
|
||||
=============================================================================================================
|
||||
* Entries and reocniliations
|
||||
* Payroll
|
||||
* Data: Retain all payroll data in a `database` to build entries
|
||||
* Mappings: Configure `Paycom GL Interface`
|
||||
* `401k`: book disbursements and reconcile to Paycom withholdings
|
||||
* `FSA`: book FSA funding entries and reconcile to Paycom withholdings
|
||||
* Debt & Cash
|
||||
* Data: retain all PNC information available in a `database` to build entries (cash, revolver, debt)
|
||||
* Book all PNC `loan activity`
|
||||
* Book interest on `notes`
|
||||
* Reconcile all balance sheet `debt`
|
||||
* Book `interest rate swap` valuation
|
||||
* Bank Rec:
|
||||
* book entry to break out `freight checks`
|
||||
* book entries to clean up missed `fees`
|
||||
* book entries to deal with `miscelaneous discrepencies`
|
||||
* book entry to classify `outstanding checks` as liabilities
|
||||
* Intercompany Activity
|
||||
* Support `transfer pricing` entry
|
||||
* Book `consolidating` entries
|
||||
* Book `currency translation adjustment` for consolidated USD trial balance
|
||||
* Reconcile `CTA` & `Equity`
|
||||
* Reclassify any `intercompany liabilites` out of the trade accounts
|
||||
* Validate that `intercompany balances` are eliminated from consolidated trial balance
|
||||
* Other Balance Sheet Items
|
||||
* Book and reconcile amortization of `intangibles`
|
||||
* Book and reconcile amortization of `defered financing costs`
|
||||
* Book RSM determined `tax provision` and current year `tax accrual`
|
||||
* CMS Module Corrections
|
||||
* book entry to fix `virtual sales`
|
||||
* book entry to fix `credits`
|
||||
* furnish a report to the plants breaking out the `book to perpetual` issues
|
||||
* sales timing and valuation issues
|
||||
* cost roll impact
|
||||
* production ledger issues
|
||||
* voucher issues
|
||||
* issues with transfers
|
||||
* issues with returns
|
||||
* Configuration
|
||||
* Module accounts (sales, inventory, production, manual adjustments, AP, AR, intecompany)
|
||||
* Chart of Accounts
|
||||
* EBITDA flags
|
||||
* consolidation flags
|
||||
* consolidation heirarchy
|
||||
* financial statement lines
|
||||
* currency indicator
|
||||
|
||||
Interpreting The Trial Balance
|
||||
=========================================================================================================
|
||||
* Rebuild trial balance into alternate financial statement formats
|
||||
* Rebuilt subledger that matches original ledger
|
||||
* Rebuild production subledger that does not match original
|
||||
* Sales Matrix
|
||||
* A large number of reports that I can't even list but are maintained [here](https://bitbucket.org/hccompanies/hc_ubm/src/master/)
|
||||
|
||||
Forecasting
|
||||
=============================
|
||||
* Product Strucutre Explosion Logic
|
||||
* global scale cost change estimates
|
||||
* production plans
|
||||
* inventory forecasts
|
||||
* Sales forecast tool
|
@ -1,33 +1,33 @@
|
||||
CREATE PROC RLARP.TEST AS
|
||||
|
||||
BEGIN
|
||||
PRINT 'Hi'; --non-erroring statement
|
||||
create table #temp(x varchar(255)); --create a permanent object to call outside block after error
|
||||
insert into #temp select 1/0;
|
||||
insert into #temp select 'hi'; --fill it after error
|
||||
--select * from #temp; --select it after error
|
||||
PRINT ERROR_MESSAGE(); --error message is gone
|
||||
|
||||
END;
|
||||
|
||||
begin transaction x
|
||||
declare @e int;
|
||||
DECLARE @em varchar(max);
|
||||
begin try
|
||||
EXEC RLARP.TEST;
|
||||
end TRY
|
||||
begin CATCH
|
||||
select @e = ERROR_NUMBER(), @em = ERROR_MESSAGE();
|
||||
if @e <> 0
|
||||
BEGIN
|
||||
rollback transaction x;
|
||||
print @em;
|
||||
END
|
||||
if @e = 0
|
||||
BEGIN
|
||||
commit transaction x;
|
||||
print 'ok';
|
||||
end
|
||||
end catch
|
||||
|
||||
CREATE PROC RLARP.TEST AS
|
||||
|
||||
BEGIN
|
||||
PRINT 'Hi'; --non-erroring statement
|
||||
create table #temp(x varchar(255)); --create a permanent object to call outside block after error
|
||||
insert into #temp select 1/0;
|
||||
insert into #temp select 'hi'; --fill it after error
|
||||
--select * from #temp; --select it after error
|
||||
PRINT ERROR_MESSAGE(); --error message is gone
|
||||
|
||||
END;
|
||||
|
||||
begin transaction x
|
||||
declare @e int;
|
||||
DECLARE @em varchar(max);
|
||||
begin try
|
||||
EXEC RLARP.TEST;
|
||||
end TRY
|
||||
begin CATCH
|
||||
select @e = ERROR_NUMBER(), @em = ERROR_MESSAGE();
|
||||
if @e <> 0
|
||||
BEGIN
|
||||
rollback transaction x;
|
||||
print @em;
|
||||
END
|
||||
if @e = 0
|
||||
BEGIN
|
||||
commit transaction x;
|
||||
print 'ok';
|
||||
end
|
||||
end catch
|
||||
|
||||
SELECT * FROM #temp
|
10
sr.ht.md
10
sr.ht.md
@ -1,5 +1,5 @@
|
||||
invite link
|
||||
https://meta.sr.ht/register/K8XW9Hyl86fdL0f925ertqEv
|
||||
|
||||
|
||||
must have public key (ssh-keygen) upoaded to your account for git pushing
|
||||
invite link
|
||||
https://meta.sr.ht/register/K8XW9Hyl86fdL0f925ertqEv
|
||||
|
||||
|
||||
must have public key (ssh-keygen) upoaded to your account for git pushing
|
||||
|
50
tmux.md
50
tmux.md
@ -1,25 +1,25 @@
|
||||
`Ctlr+B` activiates command entry (called the prefix)
|
||||
|
||||
panes
|
||||
----------------------------------
|
||||
% = split pane right
|
||||
" = split pane below
|
||||
<Up>/<Left> = switch panes
|
||||
z = maximize/minimize pane
|
||||
x = kill pane
|
||||
Ctrl+B+<Arrow> = resize
|
||||
|
||||
windows
|
||||
----------------------------------
|
||||
c = create new window
|
||||
w = create window selection prompt
|
||||
|
||||
sessions
|
||||
----------------------------------
|
||||
d = detach session
|
||||
tmux ls = list sesions
|
||||
tmux attach -t 0 = attach to session 0
|
||||
|
||||
|
||||
|
||||
|
||||
`Ctlr+B` activiates command entry (called the prefix)
|
||||
|
||||
panes
|
||||
----------------------------------
|
||||
% = split pane right
|
||||
" = split pane below
|
||||
<Up>/<Left> = switch panes
|
||||
z = maximize/minimize pane
|
||||
x = kill pane
|
||||
Ctrl+B+<Arrow> = resize
|
||||
|
||||
windows
|
||||
----------------------------------
|
||||
c = create new window
|
||||
w = create window selection prompt
|
||||
|
||||
sessions
|
||||
----------------------------------
|
||||
d = detach session
|
||||
tmux ls = list sesions
|
||||
tmux attach -t 0 = attach to session 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
for windows
|
||||
------------------
|
||||
|
||||
* `apt install cifs-utils`
|
||||
* create target folder `mkdir //mnt/onedrive`
|
||||
for windows
|
||||
------------------
|
||||
|
||||
* `apt install cifs-utils`
|
||||
* create target folder `mkdir //mnt/onedrive`
|
||||
* `sudo mount.cifs //192.168.1.89/Users/fleet/OneDrive onedrive/ -o user=fleet`
|
@ -1,7 +1,10 @@
|
||||
scanning services that are running:
|
||||
|
||||
sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-10000
|
||||
|
||||
sudo netstat --tcp --udp --listening --program
|
||||
|
||||
sudo lsof +M -i4 -i6
|
||||
scanning services that are running:
|
||||
|
||||
sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-10000
|
||||
|
||||
sudo netstat --tcp --udp --listening --program
|
||||
|
||||
sudo lsof +M -i4 -i6
|
||||
|
||||
let's encrypt certbot instructions for apache:
|
||||
https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
|
@ -1,43 +1,43 @@
|
||||
apt update
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
//sometimes network-manager service is not running after update and cannot resolve addresses
|
||||
sudo service network-manager start
|
||||
sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf
|
||||
```
|
||||
also had to reference [this article](https://askubuntu.com/questions/368435/how-do-i-fix-dns-resolving-which-doesnt-work-after-upgrading-to-ubuntu-13-10-s)
|
||||
|
||||
version control /etc
|
||||
```
|
||||
cd //etc
|
||||
sudo git init
|
||||
sudo git add .
|
||||
sudo git commit -m "initial setup"
|
||||
```
|
||||
|
||||
pspg pager
|
||||
```
|
||||
sudp apt-get install pspg
|
||||
```
|
||||
|
||||
postgres
|
||||
```
|
||||
sudo vim /etc/apt/sources.list.d/pgdg.list
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install postgresql-11
|
||||
```
|
||||
|
||||
vundle
|
||||
```
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
```
|
||||
|
||||
dotfiles (depends on vundle currently)
|
||||
```
|
||||
git clone "https://fleetside@bitbucket.com/fleetside/dotfiles.git"
|
||||
cp -R ~/dotfiles/. ~/
|
||||
sudo rm -r dotfiles/
|
||||
```
|
||||
apt update
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
//sometimes network-manager service is not running after update and cannot resolve addresses
|
||||
sudo service network-manager start
|
||||
sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf
|
||||
```
|
||||
also had to reference [this article](https://askubuntu.com/questions/368435/how-do-i-fix-dns-resolving-which-doesnt-work-after-upgrading-to-ubuntu-13-10-s)
|
||||
|
||||
version control /etc
|
||||
```
|
||||
cd //etc
|
||||
sudo git init
|
||||
sudo git add .
|
||||
sudo git commit -m "initial setup"
|
||||
```
|
||||
|
||||
pspg pager
|
||||
```
|
||||
sudp apt-get install pspg
|
||||
```
|
||||
|
||||
postgres
|
||||
```
|
||||
sudo vim /etc/apt/sources.list.d/pgdg.list
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install postgresql-11
|
||||
```
|
||||
|
||||
vundle
|
||||
```
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
```
|
||||
|
||||
dotfiles (depends on vundle currently)
|
||||
```
|
||||
git clone "https://fleetside@bitbucket.com/fleetside/dotfiles.git"
|
||||
cp -R ~/dotfiles/. ~/
|
||||
sudo rm -r dotfiles/
|
||||
```
|
||||
|
@ -1,21 +1,21 @@
|
||||
`//etc/systemd/system/filename.service`
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=forecast_api
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node //opt/forecast_api/index.js
|
||||
Restart=always
|
||||
User=fc_api
|
||||
Environemnt=NODE_ENV=production
|
||||
WorkingDirectory=//opt/forecast_api
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
`systemctl enable forecast.api`
|
||||
|
||||
`//etc/systemd/system/filename.service`
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=forecast_api
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node //opt/forecast_api/index.js
|
||||
Restart=always
|
||||
User=fc_api
|
||||
Environemnt=NODE_ENV=production
|
||||
WorkingDirectory=//opt/forecast_api
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
`systemctl enable forecast.api`
|
||||
|
||||
`systemctl start forecast_api.service`
|
@ -1,8 +1,8 @@
|
||||
`adduser` -> high-level
|
||||
`useradd` -> low-level
|
||||
|
||||
adduser fc_api
|
||||
usermod -a -G sudo fc_api
|
||||
|
||||
chown user_name directory/
|
||||
`adduser` -> high-level
|
||||
`useradd` -> low-level
|
||||
|
||||
adduser fc_api
|
||||
usermod -a -G sudo fc_api
|
||||
|
||||
chown user_name directory/
|
||||
chgrp user_name directory/
|
@ -1,4 +1,4 @@
|
||||
* fit width `-`
|
||||
* move columne `H L`
|
||||
* move end/beg/left/right `g+hjkl`
|
||||
* fit width `-`
|
||||
* move columne `H L`
|
||||
* move end/beg/left/right `g+hjkl`
|
||||
* select rows `s`, `u` all `gu`, `gs`
|
Loading…
Reference in New Issue
Block a user