PUB_IF="eth0"
WG_IF="wg0"
# Forward incoming UDP:8964 on public IP → laptop (10.7.0.2:8964)
sudo iptables -t nat -A PREROUTING -i $PUB_IF -p udp --dport 8964 -j DNAT --to-destination 10.7.0.2:8964
# Allow the traffic to be forwarded
sudo iptables -A FORWARD -i $PUB_IF -o $WG_IF -p udp --dport 8964 -d 10.7.0.2 -j ACCEPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| caddy: | |
| image: caddy:2.7.4 | |
| restart: always | |
| volumes: | |
| - caddy_data:/data | |
| - ./Caddyfile:/etc/caddy/Caddyfile | |
| ports: | |
| - 80:80 | |
| - 443:443 | |
| volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'\''"' |
OlderNewer
