check which port postgres is working on:
# check the log
tail /var/log/postgresql/postgresql-14-main.log
# or check the cluster list
pg_lsclusters
| interface ITableCellSpec { | |
| id: string; | |
| rows: number; | |
| columns: number; | |
| origin: { rowIndex: number; cellIndex: number }; | |
| } | |
| const areaToTableSpec = (arr: string[][]) => { | |
| const output: ITableCellSpec[][] = []; |
| # credits: | |
| # 1. https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723 | |
| # 2. https://dev.to/vishnumohanrk/wsl-port-forwarding-2e22 | |
| If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
| $arguments = "& '" + $myinvocation.mycommand.definition + "'" | |
| Start-Process powershell -Verb runAs -ArgumentList $arguments | |
| Break | |
| } |
| # install php5.6 | |
| sudo apt install software-properties-common | |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt update | |
| sudo apt install php5.6 | |
| php --version | |
| # install required php plugins | |
| sudo apt install php5.6-curl php5.6-xml php5.6-mbstring |
| // import $ from 'https://cdn.skypack.dev/cash-dom'; | |
| import { computePosition, offset } from 'https://cdn.skypack.dev/@floating-ui/[email protected]'; | |
| const tooltip = document.createElement('div'); | |
| tooltip.id = 'tooltip'; | |
| tooltip.setAttribute('role', 'tooltip'); | |
| const tooltipArrow = document.createElement('div'); | |
| tooltipArrow.id = 'arrow'; |
| const git = require('nodegit'); | |
| const pathToRepo = require("path").resolve("./.git"); | |
| const uniqBy = require('../../utils').uniqBy | |
| let $repo = null; | |
| /** Blame last file change | using commit id */ | |
| async function blameLast_old(filePath, callback) { | |
| const repo = $repo ? $repo : await git.Repository.open(pathToRepo); | |
| const blame = await git.Blame.file(repo, filePath.slice(2)); |
check which port postgres is working on:
# check the log
tail /var/log/postgresql/postgresql-14-main.log
# or check the cluster list
pg_lsclusters
| import type { Props, Plugin, LifecycleHooks } from 'tippy.js'; | |
| // eslint-disable-next-line @typescript-eslint/no-empty-interface | |
| interface CustomProps {} | |
| type FilteredProps = CustomProps & | |
| Omit<Props, keyof CustomProps | keyof LifecycleHooks>; | |
| type ExtendedProps = FilteredProps & LifecycleHooks<FilteredProps>; |
| ffmpeg -i video.mp4 -c:v vp9 -pix_fmt yuva420p -b:v 1M -vf "fps=30,scale=512:-1" -an video.webm |