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
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
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)); |
// import $ from 'https://cdn.skypack.dev/cash-dom'; | |
import { computePosition, offset } from 'https://cdn.skypack.dev/@floating-ui/dom@0.1.7'; | |
const tooltip = document.createElement('div'); | |
tooltip.id = 'tooltip'; | |
tooltip.setAttribute('role', 'tooltip'); | |
const tooltipArrow = document.createElement('div'); | |
tooltipArrow.id = 'arrow'; |
# 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 |
interface ITableCellSpec { | |
id: string; | |
rows: number; | |
columns: number; | |
origin: { rowIndex: number; cellIndex: number }; | |
} | |
const areaToTableSpec = (arr: string[][]) => { | |
const output: ITableCellSpec[][] = []; |
// Code from https://github.com/leighhalliday/generate-og-image/blob/master/src/chromium.ts | |
// and https://github.com/wesbos/wesbos/blob/master/functions/ogimage/ogimage.js | |
// and thanks wes.bos for the video on this at https://youtu.be/A0Ww-SU7K5E | |
exports.handler = async (event, context, callback) => { | |
const url = event.queryStringParameters.url; | |
const r = await fetch( | |
`https://publish.twitter.com/oembed?url=${url}&hide_thread=true` | |
).then((r) => r.json()); |
// Code from https://github.com/leighhalliday/generate-og-image/blob/master/src/chromium.ts | |
// and https://github.com/wesbos/wesbos/blob/master/functions/ogimage/ogimage.js | |
// and thanks wes.bos for the video on this at https://youtu.be/A0Ww-SU7K5E | |
async function getScreenshot(html, isDev) { | |
const options = await getOptions(isDev); | |
console.log("📸"); | |
const browser = await puppeteer.launch(options); | |
const page = await browser.newPage(); |
// Code from https://github.com/leighhalliday/generate-og-image/blob/master/src/chromium.ts | |
// and https://github.com/wesbos/wesbos/blob/master/functions/ogimage/ogimage.js | |
// and thanks wes.bos for the video on this at https://youtu.be/A0Ww-SU7K5E | |
const chrome = require("chrome-aws-lambda"); | |
const puppeteer = require("puppeteer-core"); | |
const exePath = "/usr/bin/google-chrome"; | |
async function getOptions(isDev) { |
Springer Publications has recently released a huge list of books that are now free to access, Let's grab download links for them.
List of books is available as an google sheet.
you can also use this repository to download them.
but, it's a python script to download them and is probably slow and as far as I checked is not using download managers like aria2
, so I decided to grab the download links automatically and download them using IDM.