This commit is contained in:
Paul Trowbridge 2023-01-12 17:33:50 -05:00
parent 27e8ea7025
commit f163583f88
32 changed files with 3211 additions and 629 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.swp *.swp
.obsidian/

0
2023-01-09.md Normal file
View File

1
AutoSSH.md Normal file
View File

@ -0,0 +1 @@
autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R 22721:localhost:22 pt@hptrow.me

View File

@ -0,0 +1,27 @@
## Clean Update Guidance
- [x] exclude dishes and hangers from ltp flags ✅ 2023-01-11
- [ ] dont blow cap dishes past bulletin value
- [ ] flag increases and decreses
- [ ] convert USD pricing back to local for order adjustment feed
## Scope
* Timeline
- [ ] order placed range
- [ ] promise date range
* Adjustment
- [ ] blanket % per customer
- [ ] adjust up and down so long as net down
- [ ] only adjust down
* Excludsions
- [ ] Warehouse
- [ ] Monrovia
- [ ] Proven Winners
- [ ] Large Directs `Metrolina, Altmans, Costa`
- [ ] Retail
- [ ] Purchased?
## CMS
- [ ] prep for either % change or feed from file

View File

View File

@ -1,2 +1,2 @@
FCC - fixed charge coverage ratio - looks at cash flow as compared to cash require dto fulfill debt payments FCC - fixed charge coverage ratio - looks at cash flow as compared to cash require dto fulfill debt payments
SLR - senior debt leverage ratio - senior debt to ebitda SLR - senior debt leverage ratio - senior debt to ebitda

61
accounting/pricing.md Normal file
View File

@ -0,0 +1,61 @@
---
kanban-plugin: basic
---
## Issues
- [ ] Invoices with no BOL
- [ ] bulk is more than master pallet (CAN)
- [ ] GETPRICE<br>- [ ] subcontracts<br>- [ ] Proven Winners<br>- [ ] any drop ship will link with list<br>- [ ] narrower linkage based on v1 dataseg
- [ ] Price per M should round to < 5 in case/pallet and vice versa
## Projects
- [ ] Price List Build - Volume Basis<br>* Review Branded Thermo
- [ ] Quote Tool - target maintenance
- [ ] Valid Prices used in orders - check
## Requests
- [ ] Canada Greenhouse List Review
- [ ] BFG to have 5% discount for branded containers
## Sales Matrix
- [ ] Quotes Integration<br>- [ ] refresh<br>- [ ] all open<br>- [ ] header row but no qcri rows
- [ ] Matrix - Active Price Measure
- [ ] Update by Diff
- [ ] Handle Guidance based on channel
- [ ] Notes
- [ ] Guidance Anchor Pool<br><br>* source<br> * customer<br> * channel global<br> * target<br>* fit<br> * v0<br> * v1<br> * alt+prem
## Opportunities
- [ ] Open Quotes - Listing for Folow-Up
- [ ] Share - customers buying more items
- [ ] Market size - More YoY season lbs
- [ ] Quote Conversion Rate
## Quotes
## Done
**Complete**
%% kanban:settings
```
{"kanban-plugin":"basic","show-checkboxes":false}
```
%%

View File

@ -1,64 +1,64 @@
Deriving The Trial Balance Deriving The Trial Balance
============================================================================================================= ===============================================================
* Entries and reocniliations * Entries and reocniliations
* Payroll * Payroll
* Data: Retain all payroll data in a `database` to build entries * Data: Retain all payroll data in a `database` to build entries
* Mappings: Configure `Paycom GL Interface` * Mappings: Configure `Paycom GL Interface`
* `401k`: book disbursements and reconcile to Paycom withholdings * `401k`: book disbursements and reconcile to Paycom withholdings
* `FSA`: book FSA funding entries and reconcile to Paycom withholdings * `FSA`: book FSA funding entries and reconcile to Paycom withholdings
* Debt & Cash * Debt & Cash
* Data: retain all PNC information available in a `database` to build entries (cash, revolver, debt) * Data: retain all PNC information available in a `database` to build entries (cash, revolver, debt)
* Book all PNC `loan activity` * Book all PNC `loan activity`
* Book interest on `notes` * Book interest on `notes`
* Reconcile all balance sheet `debt` * Reconcile all balance sheet `debt`
* Book `interest rate swap` valuation * Book `interest rate swap` valuation
* Bank Rec: * Bank Rec:
* book entry to break out `freight checks` * book entry to break out `freight checks`
* book entries to clean up missed `fees` * book entries to clean up missed `fees`
* book entries to deal with `miscelaneous discrepencies` * book entries to deal with `miscelaneous discrepencies`
* book entry to classify `outstanding checks` as liabilities * book entry to classify `outstanding checks` as liabilities
* Intercompany Activity * Intercompany Activity
* Support `transfer pricing` entry * Support `transfer pricing` entry
* Book `consolidating` entries * Book `consolidating` entries
* Book `currency translation adjustment` for consolidated USD trial balance * Book `currency translation adjustment` for consolidated USD trial balance
* Reconcile `CTA` & `Equity` * Reconcile `CTA` & `Equity`
* Reclassify any `intercompany liabilites` out of the trade accounts * Reclassify any `intercompany liabilites` out of the trade accounts
* Validate that `intercompany balances` are eliminated from consolidated trial balance * Validate that `intercompany balances` are eliminated from consolidated trial balance
* Other Balance Sheet Items * Other Balance Sheet Items
* Book and reconcile amortization of `intangibles` * Book and reconcile amortization of `intangibles`
* Book and reconcile amortization of `defered financing costs` * Book and reconcile amortization of `defered financing costs`
* Book RSM determined `tax provision` and current year `tax accrual` * Book RSM determined `tax provision` and current year `tax accrual`
* CMS Module Corrections * CMS Module Corrections
* book entry to fix `virtual sales` * book entry to fix `virtual sales`
* book entry to fix `credits` * book entry to fix `credits`
* furnish a report to the plants breaking out the `book to perpetual` issues * furnish a report to the plants breaking out the `book to perpetual` issues
* sales timing and valuation issues * sales timing and valuation issues
* cost roll impact * cost roll impact
* production ledger issues * production ledger issues
* voucher issues * voucher issues
* issues with transfers * issues with transfers
* issues with returns * issues with returns
* Configuration * Configuration
* Module accounts (sales, inventory, production, manual adjustments, AP, AR, intecompany) * Module accounts (sales, inventory, production, manual adjustments, AP, AR, intecompany)
* Chart of Accounts * Chart of Accounts
* EBITDA flags * EBITDA flags
* consolidation flags * consolidation flags
* consolidation heirarchy * consolidation heirarchy
* financial statement lines * financial statement lines
* currency indicator * currency indicator
Interpreting The Trial Balance Interpreting The Trial Balance
========================================================================================================= =========================================================================================================
* Rebuild trial balance into alternate financial statement formats * Rebuild trial balance into alternate financial statement formats
* Rebuilt subledger that matches original ledger * Rebuilt subledger that matches original ledger
* Rebuild production subledger that does not match original * Rebuild production subledger that does not match original
* Sales Matrix * 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/) * A large number of reports that I can't even list but are maintained [here](https://bitbucket.org/hccompanies/hc_ubm/src/master/)
Forecasting Forecasting
============================= =============================
* Product Strucutre Explosion Logic * Product Strucutre Explosion Logic
* global scale cost change estimates * global scale cost change estimates
* production plans * production plans
* inventory forecasts * inventory forecasts
* Sales forecast tool * Sales forecast tool

View File

@ -1,21 +1,21 @@
Only applies to items that exist in both sets of data Only applies to items that exist in both sets of data
**Change in Price** **Change in Price**
( P₂ - P₁ ) Q₂ ( P₂ - P₁ ) Q₂
**Change in Quantity** **Change in Quantity**
( Q₂ - Q₁ ) P₁ ( Q₂ - Q₁ ) P₁
_To further break out change in quantity_ _To further break out change in quantity_
Change in Quantity - _Volume Related_ Change in Quantity - _Volume Related_
Q₂ ( Q₁ / Σ ( Q₁ ) ) - Q₁ Q₂ ( Q₁ / Σ ( Q₁ ) ) - Q₁
Change in Quantity - _Mix Related_ Change in Quantity - _Mix Related_
Q₂ - Q₂ ( Q₁ / Σ ( Q₁ ) ) Q₂ - Q₂ ( Q₁ / Σ ( Q₁ ) )

4
db2.md
View File

@ -1,3 +1,3 @@
alter existing column type alter existing column type
`ALTER TABLE RLARP.OSMFS ALTER COLUMN "ITER" SET DATA TYPE VARCHAR(500)` `ALTER TABLE RLARP.OSMFS ALTER COLUMN "ITER" SET DATA TYPE VARCHAR(500)`

View File

@ -1,11 +1,11 @@
dotnet new console -n "name of directory or project" dotnet new console -n "name of directory or project"
dotnet build dotnet build
create exe targeting a runtime: create an executable if not already exists and build dll in bin/Release/win10-x64 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 -r win10-x64
dotnet publish -c Release -f netcoreapp2.1 dotnet publish -c Release -f netcoreapp2.1
`dotnet restore` -> update/sync packages `dotnet restore` -> update/sync packages

2
journals/2023_01_09.md Normal file
View File

@ -0,0 +1,2 @@
- #poppleman
-

View File

@ -1,14 +1,16 @@
install R kernel for jupyter to use Install jupyter lab via pip
* `sudo R`
* `install.packages('IRkernel')` (most likely have to run R under sudo) install R kernel for jupyter to use
* `IRkernel::installspec()` (don't use sudo R) * `sudo R`
* `install.packages('IRkernel')` (most likely have to run R under sudo)
run on network: * `IRkernel::installspec()` (don't use sudo R)
`jupyter notebook --ip 10.0.10.15 --port 8888`
run on network:
`jupyter notebook --ip 10.0.10.15 --port 8888`
basic packages:
* ggplot2, plyr, ggExtra, scales
basic packages:
issues with connectin to kernel, atempting update of all packages `update.packages(ask = FALSE)` * ggplot2, plyr, ggExtra, scales
issues with connectin to kernel, atempting update of all packages `update.packages(ask = FALSE)`

42
mutt.md
View File

@ -1,21 +1,21 @@
## Office 365 Setup ## Office 365 Setup
[office365 config](https://github.com/ork/mutt-office365) [office365 config](https://github.com/ork/mutt-office365)
[setup html viewer in mutt](http://jasonwryan.com/blog/2012/05/12/mutt/) [setup html viewer in mutt](http://jasonwryan.com/blog/2012/05/12/mutt/)
git clone https://github.com/ork/mutt-office365 ./.mutt git clone https://github.com/ork/mutt-office365 ./.mutt
* requires w3m * requires w3m
* add this to .mutt/muttrc * add this to .mutt/muttrc
``` ```
auto_view text/html # view html automatically auto_view text/html # view html automatically
alternative_order text/plain text/enriched text/html # save html for last alternative_order text/plain text/enriched text/html # save html for last
``` ```
* add this to .mutt/mailcap * add this to .mutt/mailcap
``` ```
text/html; w3m -I %{charset} -T text/html; copiousoutput; text/html; w3m -I %{charset} -T text/html; copiousoutput;
``` ```
install from source example [here](http://www.guckes.net/Mutt/install.php3) install from source example [here](http://www.guckes.net/Mutt/install.php3)

View File

@ -1,5 +1,5 @@
https://nginx.org/en/docs/http/configuring_https_servers.html https://nginx.org/en/docs/http/configuring_https_servers.html
setting up reverse proxy for different sub domains setting up reverse proxy for different sub domains
https://serverfault.com/questions/753105/how-to-reverse-proxy-to-different-places-depending-on-subdomain-in-nginx https://serverfault.com/questions/753105/how-to-reverse-proxy-to-different-places-depending-on-subdomain-in-nginx

View File

@ -1,77 +1,77 @@
Logic to setup production plan, inventory balances, purchases, and shipments Logic to setup production plan, inventory balances, purchases, and shipments
Starting point Starting point
- known balances STKB - known balances STKB
- known available BOLH - not posted - known available BOLH - not posted
- known prod schedule SOFT - known prod schedule SOFT
- known shipments Sales Forecast - known shipments Sales Forecast
- forecasted orders Sales Forecast - forecasted orders Sales Forecast
- machines that a part can run on ?? - machines that a part can run on ??
- actual run-time performance Alternates - actual run-time performance Alternates
- actual BOM performance Alternates - actual BOM performance Alternates
- actual scrap performance Alternates - actual scrap performance Alternates
- available machine time ?? - available machine time ??
Populate Populate
- forecasted prod schedule - forecasted prod schedule
- forecasted on-hand (via forecast perpetual transactions) - forecasted on-hand (via forecast perpetual transactions)
- forecasted available (via forecast transactions) - forecasted available (via forecast transactions)
- forecasted purchases - forecasted purchases
Iterate through each calendar day Iterate through each calendar day
1. materialize forecasted purchases 1. materialize forecasted purchases
1. update on-hand & available 1. update on-hand & available
2. materialize production 2. materialize production
1. update on-hand & available 1. update on-hand & available
3. materialize transfers 3. materialize transfers
1. update on-hand & available 1. update on-hand & available
3. materialize shipments 3. materialize shipments
1. update on-hand & available 1. update on-hand & available
4. process forecasted order submissions 4. process forecasted order submissions
1. check for inventory available 1. check for inventory available
1. Yes 1. Yes
1. mark unavailable 1. mark unavailable
2. schedule shipment for request date 2. schedule shipment for request date
2. No or partial 2. No or partial
1. mark unavailable any 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) 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. raw materials available
1. Yes 1. Yes
1. mark unavailable (at begin prod date?) 1. mark unavailable (at begin prod date?)
2. No 2. No
1. mark unavailable any partial (at begin prod date?) 1. mark unavailable any partial (at begin prod date?)
2. schedule a purchase net of lead time 2. schedule a purchase net of lead time
2. sub-components available? 2. sub-components available?
1. Yes 1. Yes
1. mark unavialable (at begin prod date?) 1. mark unavialable (at begin prod date?)
2. No 2. No
1. (return to 4.1.2.2) 1. (return to 4.1.2.2)
3. schedule transfer of production after completion if necessary 3. schedule transfer of production after completion if necessary
3. schedule shipment for request date, or production date if past request date 3. schedule shipment for request date, or production date if past request date
snap-shot STKB snap-shot STKB
snap-shot BOLH snap-shot BOLH
snap-shot SOFT snap-shot SOFT
some notes some notes
----------------- -----------------
* shift schedules * shift schedules
* parallel resources * parallel resources
* setup time * setup time
* efficiencies * efficiencies
* scrap rates * scrap rates
* blends * blends
* known 'A' item volumes planned regardless of demand * known 'A' item volumes planned regardless of demand
* visibility window for incomming orders * visibility window for incomming orders
* grouping items to reduce change-overs * grouping items to reduce change-overs
* initial start-up: merge with current machine schedule * initial start-up: merge with current machine schedule
* limit start date to child item availability * limit start date to child item availability
* procurement mix * procurement mix
* purchase lag * purchase lag
* transfer lag * transfer lag
* order priority * order priority
* inventory minimums * inventory minimums
* tool availability * tool availability

View File

@ -1,49 +1,49 @@
To extract aggregate definitions can select from `pg_aggregate` To extract aggregate definitions can select from `pg_aggregate`
SQL for current aggregates I'm using now: SQL for current aggregates I'm using now:
``` ```
CREATE OR REPLACE FUNCTION public.jsonb_concat( CREATE OR REPLACE FUNCTION public.jsonb_concat(
state jsonb, state jsonb,
concat jsonb) concat jsonb)
RETURNS jsonb AS RETURNS jsonb AS
$BODY$ $BODY$
BEGIN BEGIN
--RAISE notice 'state is %', state; --RAISE notice 'state is %', state;
--RAISE notice 'concat is %', concat; --RAISE notice 'concat is %', concat;
RETURN state || concat; RETURN state || concat;
END; END;
$BODY$ $BODY$
LANGUAGE plpgsql VOLATILE LANGUAGE plpgsql VOLATILE
COST 100; COST 100;
CREATE OR REPLACE FUNCTION public.jsonb_concat_distinct_arr( CREATE OR REPLACE FUNCTION public.jsonb_concat_distinct_arr(
state jsonb, state jsonb,
concat jsonb) concat jsonb)
RETURNS jsonb AS RETURNS jsonb AS
$BODY$ $BODY$
BEGIN BEGIN
--RAISE notice 'state is %', state; --RAISE notice 'state is %', state;
--RAISE notice 'concat is %', concat; --RAISE notice 'concat is %', concat;
RETURN SELECT jsonb_agg(state || concat; RETURN SELECT jsonb_agg(state || concat;
END; END;
$BODY$ $BODY$
LANGUAGE plpgsql VOLATILE LANGUAGE plpgsql VOLATILE
COST 100; COST 100;
DROP AGGREGATE IF EXISTS public.jsonb_arr_aggc(jsonb); DROP AGGREGATE IF EXISTS public.jsonb_arr_aggc(jsonb);
CREATE AGGREGATE public.jsonb_arr_aggc(jsonb) ( CREATE AGGREGATE public.jsonb_arr_aggc(jsonb) (
SFUNC=public.jsonb_concat, SFUNC=public.jsonb_concat,
STYPE=jsonb, STYPE=jsonb,
INITCOND='[]' INITCOND='[]'
); );
DROP AGGREGATE IF EXISTS public.jsonb_obj_aggc(jsonb); DROP AGGREGATE IF EXISTS public.jsonb_obj_aggc(jsonb);
CREATE AGGREGATE public.jsonb_obj_aggc(jsonb) ( CREATE AGGREGATE public.jsonb_obj_aggc(jsonb) (
SFUNC=public.jsonb_concat, SFUNC=public.jsonb_concat,
STYPE=jsonb, STYPE=jsonb,
INITCOND='{}' INITCOND='{}'
); );
``` ```

View File

@ -1,34 +1,34 @@
setup for single sign on with [SSPI](https://wiki.postgresql.org/wiki/Configuring_for_single_sign-on_using_SSPI_on_Windows) 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 md5 hash is salted with username in front
Memory Memory
========================================================= =========================================================
see whats in the buffer cache with pg_buffercache see whats in the buffer cache with pg_buffercache
`CREATE EXTENSION pg_buffercache` `CREATE EXTENSION pg_buffercache`
``` ```
SELECT SELECT
c.relname, c.relname,
COUNT(*) AS buffers COUNT(*) AS buffers
FROM FROM
pg_class c pg_class c
INNER JOIN pg_buffercache b ON INNER JOIN pg_buffercache b ON
b.relfilenode = c.relfilenode b.relfilenode = c.relfilenode
INNER JOIN pg_database d ON INNER JOIN pg_database d ON
( b.reldatabase = d.oid ( b.reldatabase = d.oid
AND d.datname = CURRENT_DATABASE()) AND d.datname = CURRENT_DATABASE())
GROUP BY GROUP BY
c.relname c.relname
ORDER BY ORDER BY
2 DESC 2 DESC
LIMIT 100; LIMIT 100;
``` ```
Alter Column Alter Column
========================================================== ==========================================================
ALTER TABLE rlarp.pcore ALTER COLUMN pack SET DATA TYPE numeric USING pack::numeric ALTER TABLE rlarp.pcore ALTER COLUMN pack SET DATA TYPE numeric USING pack::numeric
psql binary for latest version is always used but pg_dump is not, you have to set the default version in ~/.postgresqlrc psql binary for latest version is always used but pg_dump is not, you have to set the default version in ~/.postgresqlrc

View File

@ -0,0 +1,5 @@
This is our current approach to quoting new and repeat business alike:
![[Price Guidance Application.png]]
As we look to update open orders, their open order price will become relevant as we re-quote their business.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -1,4 +1,4 @@
pscp.exe is a part of putty and can be used to transfer files through ssh pscp.exe is a part of putty and can be used to transfer files through ssh
example: example:
pscp.exe -pw ******** ptrowbridge@usmidlnx01:/home/ptrowbridge/pt_share/*.backup "C:\Users\PTrowbridge\OneDrive - The HC Companies, Inc\Backups" pscp.exe -pw ******** ptrowbridge@usmidlnx01:/home/ptrowbridge/pt_share/*.backup "C:\Users\PTrowbridge\OneDrive - The HC Companies, Inc\Backups"

90
r.md
View File

@ -1,45 +1,45 @@
installation installation
--------------------------------------- ---------------------------------------
* to install R on ubuntu can to [r download page](https://cran.r-project.org/) * to install R on ubuntu can to [r download page](https://cran.r-project.org/)
* there are instruction on what to add to sources.list. * there are instruction on what to add to sources.list.
* After doing apt-get update, will probably need to add the public key which is addressed [here](https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey#15272) * After doing apt-get update, will probably need to add the public key which is addressed [here](https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey#15272)
* then do `sudo apt-get install r-base` * then do `sudo apt-get install r-base`
using grid.arrange using grid.arrange
https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html
set and mirror axis limits: set and mirror axis limits:
``` ```
scale_y_continuous( scale_y_continuous(
breaks=seq(glob$PriceMin, glob$PriceMax, round(glob$StdDev * .5,2)), breaks=seq(glob$PriceMin, glob$PriceMax, round(glob$StdDev * .5,2)),
limits = c(glob$PriceMin, glob$PriceMax) limits = c(glob$PriceMin, glob$PriceMax)
) + ) +
``` ```
how to loop through rows of a column how to loop through rows of a column
``` ```
for (i in dim1) { for (i in dim1) {
for (j in i) { for (j in i) {
print(j); print(j);
} }
} }
``` ```
build a list of plots and use grid.arrange build a list of plots and use grid.arrange
``` ```
do.call(grid.arrange,plot_list) do.call(grid.arrange,plot_list)
``` ```
re-sort a dataframe and print each row of a column re-sort a dataframe and print each row of a column
``` ```
dim1 <- dim1[order(dim1$list),]; dim1 <- dim1[order(dim1$list),];
for (i in dim1) { for (i in dim1) {
for (j in i) { for (j in i) {
print(j); print(j);
} }
} }
``` ```
to run a script from the command line to run a script from the command line
`R --vanilla < scriptfile.R` `R --vanilla < scriptfile.R`

View File

@ -1,5 +1,5 @@
invite link invite link
https://meta.sr.ht/register/K8XW9Hyl86fdL0f925ertqEv https://meta.sr.ht/register/K8XW9Hyl86fdL0f925ertqEv
must have public key (ssh-keygen) upoaded to your account for git pushing must have public key (ssh-keygen) upoaded to your account for git pushing

90
tmux.md
View File

@ -1,45 +1,45 @@
`Ctlr+B` activiates command entry (called the prefix) `Ctlr+B` activiates command entry (called the prefix)
panes panes
---------------------------------- ----------------------------------
prefix + % = split pane right prefix + % = split pane right
prefix + " = split pane below prefix + " = split pane below
prefix + <Up>/<Left> = switch panes prefix + <Up>/<Left> = switch panes
prefix + z = maximize/minimize pane prefix + z = maximize/minimize pane
prefix + x = kill pane prefix + x = kill pane
prefix + <Arrow> = resize prefix + <Arrow> = resize
windows windows
---------------------------------- ----------------------------------
prefix + c = create new window prefix + c = create new window
prefix + w = create window selection prompt prefix + w = create window selection prompt
prefix + , = rename window prefix + , = rename window
sessions sessions
---------------------------------- ----------------------------------
prefix + d = detach session prefix + d = detach session
tmux ls = list sesions tmux ls = list sesions
tmux attach -t 0 = attach to session 0 tmux attach -t 0 = attach to session 0
colors colors
---------------------------------- ----------------------------------
setup a `.tmux.conf` file with this line `set -g default-terminal 'screen-256color'` setup a `.tmux.conf` file with this line `set -g default-terminal 'screen-256color'`
point tmux to it with `tmux source-file ~/.tmux.conf` point tmux to it with `tmux source-file ~/.tmux.conf`
fonts fonts
---------------------------------- ----------------------------------
powerline fonts powerline fonts
https://github.com/vim-airline/vim-airline https://github.com/vim-airline/vim-airline
https://github.com/powerline/fonts https://github.com/powerline/fonts
sudo apt-get install fonts-powerline sudo apt-get install fonts-powerline
plugins plugins
---------------------------------- ----------------------------------
using tmux plugin manager to install tmux-resurrect using tmux plugin manager to install tmux-resurrect
plugin manager: https://github.com/tmux-plugins/tpm plugin manager: https://github.com/tmux-plugins/tpm
resurrect: https://github.com/tmux-plugins/tmux-resurrect resurrect: https://github.com/tmux-plugins/tmux-resurrect
use <prefix> + I to install plugins use <prefix> + I to install plugins

View File

@ -1,6 +1,6 @@
for windows for windows
------------------ ------------------
* `apt install cifs-utils` * `apt install cifs-utils`
* create target folder `mkdir //mnt/onedrive` * create target folder `mkdir //mnt/onedrive`
* `sudo mount.cifs //192.168.1.89/Users/fleet/OneDrive onedrive/ -o user=fleet` * `sudo mount.cifs //192.168.1.89/Users/fleet/OneDrive onedrive/ -o user=fleet`

View File

@ -1,25 +1,25 @@
scanning services that are running: scanning services that are running:
sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-10000 sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-10000
sudo netstat --tcp --udp --listening --program sudo netstat --tcp --udp --listening --program
lists programs with port numbers: `sudo netstat -tup` lists programs with port numbers: `sudo netstat -tup`
sudo lsof +M -i4 -i6 sudo lsof +M -i4 -i6
# list all established connection that are not internal only" # list all established connection that are not internal only"
sudo sockstat | grep "ESTAB" | grep -v ".*192\.168\.1\.110.*192\.168\.1\.110.*" | grep -v ".*127\.0\.0\.1.*127\.0\.0\.1.*" sudo sockstat | grep "ESTAB" | grep -v ".*192\.168\.1\.110.*192\.168\.1\.110.*" | grep -v ".*127\.0\.0\.1.*127\.0\.0\.1.*"
let's encrypt certbot instructions for apache: let's encrypt certbot instructions for apache:
https://certbot.eff.org/lets-encrypt/ubuntubionic-apache https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
ip setup: ip setup:
https://help.ubuntu.com/lts/serverguide/network-configuration.html https://help.ubuntu.com/lts/serverguide/network-configuration.html
## network interfaces ## network interfaces
`ip link` lists all interfaces `ip link` lists all interfaces
multipass setup some dummy interfaces and left them there. multipass setup some dummy interfaces and left them there.
to delete did `ip link delete mpqemubr0-dummy` to delete did `ip link delete mpqemubr0-dummy`

View File

@ -1,43 +1,43 @@
apt update apt update
``` ```
sudo apt update sudo apt update
sudo apt upgrade sudo apt upgrade
//sometimes network-manager service is not running after update and cannot resolve addresses //sometimes network-manager service is not running after update and cannot resolve addresses
sudo service network-manager start sudo service network-manager start
sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf 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) 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 version control /etc
``` ```
cd //etc cd //etc
sudo git init sudo git init
sudo git add . sudo git add .
sudo git commit -m "initial setup" sudo git commit -m "initial setup"
``` ```
pspg pager pspg pager
``` ```
sudp apt-get install pspg sudp apt-get install pspg
``` ```
postgres postgres
``` ```
sudo vim /etc/apt/sources.list.d/pgdg.list sudo vim /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main 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 - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update sudo apt-get update
sudo apt-get install postgresql-11 sudo apt-get install postgresql-11
``` ```
vundle vundle
``` ```
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
``` ```
dotfiles (depends on vundle currently) dotfiles (depends on vundle currently)
``` ```
git clone "https://fleetside@bitbucket.com/fleetside/dotfiles.git" git clone "https://fleetside@bitbucket.com/fleetside/dotfiles.git"
cp -R ~/dotfiles/. ~/ cp -R ~/dotfiles/. ~/
sudo rm -r dotfiles/ sudo rm -r dotfiles/
``` ```

View File

@ -1,21 +0,0 @@
`//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`

86
ufw.md
View File

@ -1,43 +1,43 @@
if you dont specify a protocol it allows either tcp/udp if you dont specify a protocol it allows either tcp/udp
**ports** **ports**
``` ```
sudo ufw allow 22 sudo ufw allow 22
sudo ufw allow 22/tcp sudo ufw allow 22/tcp
``` ```
**ranges** **ranges**
``` ```
sudo ufw allow 6000:6007/tcp sudo ufw allow 6000:6007/tcp
sudo ufw allow 6000:6007/udp sudo ufw allow 6000:6007/udp
``` ```
**specific ip** **specific ip**
``` ```
sudo ufw allow from 203.0.113.4 sudo ufw allow from 203.0.113.4
sudo ufw allow from 203.0.113.4 to any port 22 sudo ufw allow from 203.0.113.4 to any port 22
``` ```
enable firewall `suod ufw enable` enable firewall `suod ufw enable`
## inquirey ## inquirey
`sudo ufw status numbered` `sudo ufw status numbered`
pt@r710:~$ sudo ufw status numbered pt@r710:~$ sudo ufw status numbered
Status: active Status: active
To Action From To Action From
-- ------ ---- -- ------ ----
[ 1] 22/tcp ALLOW IN Anywhere [ 1] 22/tcp ALLOW IN Anywhere
[ 2] 5432 ALLOW IN Anywhere [ 2] 5432 ALLOW IN Anywhere
[ 3] 5440 ALLOW IN Anywhere [ 3] 5440 ALLOW IN Anywhere
[ 4] 10000 ALLOW IN Anywhere [ 4] 10000 ALLOW IN Anywhere
[ 5] 443/tcp ALLOW IN Anywhere [ 5] 443/tcp ALLOW IN Anywhere
[ 6] 5433/tcp ALLOW IN Anywhere [ 6] 5433/tcp ALLOW IN Anywhere
[ 7] 22/tcp (v6) ALLOW IN Anywhere (v6) [ 7] 22/tcp (v6) ALLOW IN Anywhere (v6)
[ 8] 5432 (v6) ALLOW IN Anywhere (v6) [ 8] 5432 (v6) ALLOW IN Anywhere (v6)
[ 9] 5440 (v6) ALLOW IN Anywhere (v6) [ 9] 5440 (v6) ALLOW IN Anywhere (v6)
[10] 10000 (v6) ALLOW IN Anywhere (v6) [10] 10000 (v6) ALLOW IN Anywhere (v6)
[11] 443/tcp (v6) ALLOW IN Anywhere (v6) [11] 443/tcp (v6) ALLOW IN Anywhere (v6)
[12] 5433/tcp (v6) ALLOW IN Anywhere (v6) [12] 5433/tcp (v6) ALLOW IN Anywhere (v6)

169
vim.md
View File

@ -1,85 +1,84 @@
:Ex - use built in explorer to eplore at location - :Ex - use built in explorer to eplore at location
:colorscheme with autocomplete :colorscheme with autocomplete
:vs veritcale split :vs veritcale split
:sh horizontal split :sh horizontal split
:edit open a file :edit open a file
:ls list buffers :ls list buffers
:b picka buffer :b picka buffer
-
- plugins
plugins ------------------------
------------------------ Vundler
Vundler * install per below
* install per below * add to .vimrc `Plugin 'gmarik/Vundle.vim'` and run :PluginInstall
* add to .vimrc `Plugin 'gmarik/Vundle.vim'` and run :PluginInstall
NERDtree
NERDtree * add to .vimrc `Plugin 'scrooloose/nerdtree'` and run :PluginInstall
* add to .vimrc `Plugin 'scrooloose/nerdtree'` and run :PluginInstall * call with :NERDtree
* call with :NERDtree
fugitive - git command in a split
fugitive - git command in a split * add to .vimrc `Plugin 'tpope/vim-fugitive'` and run :PluginInstall
* add to .vimrc `Plugin 'tpope/vim-fugitive'` and run :PluginInstall * :Gdiff, :Gstatus etc.
* :Gdiff, :Gstatus etc.
powerline
powerline * vim status and git status info
* vim status and git status info * add to .vimrc `Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}` and run :PluginInstall
* add to .vimrc `Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}` and run :PluginInstall
Vundler
Vundler ---------------
--------------- git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
add the following to ~/.vimrc:
add the following to ~/.vimrc: ```
``` set nocompatible " be iMproved, required
set nocompatible " be iMproved, required filetype off " required
filetype off " required
" set the runtime path to include Vundle and initialize
" set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin()
call vundle#begin() " alternatively, pass a path where Vundle should install plugins
" alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here')
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim'
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end.
" Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo
" plugin on GitHub repo Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-fugitive' " plugin from http://vim-scripts.org/vim/scripts.html
" plugin from http://vim-scripts.org/vim/scripts.html " Plugin 'L9'
" Plugin 'L9' " Git plugin not hosted on GitHub
" Git plugin not hosted on GitHub Plugin 'git://git.wincent.com/command-t.git'
Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin)
" git repos on your local machine (i.e. when working on your own plugin) Plugin 'file:///home/gmarik/path/to/plugin'
Plugin 'file:///home/gmarik/path/to/plugin' " The sparkup vim script is in a subdirectory of this repo called vim.
" The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly.
" Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a
" Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else.
" different version somewhere else. " Plugin 'ascenator/L9', {'name': 'newL9'}
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
" All of your Plugins must be added before the following line call vundle#end() " required
call vundle#end() " required filetype plugin indent on " required
filetype plugin indent on " required " To ignore plugin indent changes, instead use:
" To ignore plugin indent changes, instead use: "filetype plugin on
"filetype plugin on "
" " Brief help
" Brief help " :PluginList - lists configured plugins
" :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal "
" " see :h vundle for more details or wiki for FAQ
" see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line
" Put your non-Plugin stuff after this line ```
```
after a large apt update, something got messed up with characters and colors, simply doing `syntax on` fixed the problem
after a large apt update, something got messed up with characters and colors, simply doing `syntax on` fixed the problem
when using NERDtree:
when using NERDtree: * open `o`
* open `o` * open with a horizontal split `i`
* open with a horizontal split `i` * open with a vertical split `s`
* open with a vertical split `s`

View File

@ -1,14 +1,14 @@
https://github.com/wekan/wekan-snap/wiki/Install https://github.com/wekan/wekan-snap/wiki/Install
`snap set wekan root-url='https://example.com/something'` `snap set wekan root-url='https://example.com/something'`
`snap set wekan port='3001'` `snap set wekan port='3001'`
caddy files exist but not understood: //var/snap/wekan/common caddy files exist but not understood: //var/snap/wekan/common
### Mail Setup ### Mail Setup
https://github.com/wekan/wekan/wiki/Troubleshooting-Mail https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
sudo snap set wekan mail-url='smtp://paul%40hptrow.me:password@mail.gandi.net:587/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=true' sudo snap set wekan mail-url='smtp://paul%40hptrow.me:password@mail.gandi.net:587/?ignoreTLS=true&tls={rejectUnauthorized:false}&secure=true'
sudo snap set wekan mail-from='Wekan Team Boards <paul@hptrow.me>' sudo snap set wekan mail-from='Wekan Team Boards <paul@hptrow.me>'