- Install deps
sudo apt install chromium-browser chromium-codecs-ffmpeg
and specify flags and path
const browser = await puppeteer.launch({
headless: true,
executablePath: '/usr/bin/chromium-browser',
import 'package:flutter/widgets.dart'; | |
class Responsive { | |
bool get isXl => width >= 1200; | |
bool get isLg => width >= 992 && width < 1200; | |
bool get isMd => width >= 768 && width < 992; | |
bool get isSm => width >= 576 && width < 768; |
#docker setup | |
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | sudo tee /etc/apt/sources.list.d/docker.list | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt update | |
sudo apt install docker-ce docker-ce-cli containerd.io pigz | |
#execution permission | |
sudo usermod -aG docker $USER | |
#docker compose |
const object = { | |
"customer.firstname": "raj", | |
"customer.lastname": "sharma", | |
"kop.shak.rap": 99, | |
"kop.shak.saip": 99, | |
simon: "regular", | |
}; | |
function convertPathObjectToObject(object: any) { | |
function injectInChild(arr: any, val: any, obj: any = {}, k: any = 0) { |
// https://stackoverflow.com/questions/326679/choosing-an-attractive-linear-scale-for-a-graphs-y-axis | |
var min=89; | |
var max=173; | |
var actualHeight=1200; // 500 pixels high graph | |
var tickCount =Math.round(actualHeight/100); | |
// we want lines about every 100 pixels. | |
if(tickCount <3) tickCount =3; | |
var range=Math.abs(max-min); |
caddy: | |
image: caddy:2.7.4 | |
restart: always | |
volumes: | |
- caddy_data:/data | |
- ./Caddyfile:/etc/caddy/Caddyfile | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: |
alias watch_netstat='watch -n 1 "echo '\''Proto Recv-Q Send-Q Local Address Foreign Address State'\'' && sudo netstat -ant | grep ESTABLISHED | awk '\''\$2 > 0 || \$3 > 0'\''"' |