This file contains 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
// -- Usage | |
struct Content: View { | |
@State var open = false | |
@State var popoverSize = CGSize(width: 300, height: 300) | |
var body: some View { | |
WithPopover( | |
showPopover: $open, | |
popoverSize: popoverSize, |
This file contains 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
class PopupViewController:UIViewController{ | |
let frame:CGRect | |
let content:AnyView | |
required init?(coder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func viewDidLoad() { |
This file contains 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
# make temp file that will cause iocage to install some packages | |
echo '{"pkgs":["ca_root_nss"]}' > /tmp/pkg.json | |
# create jail | |
iocage create -n "rslsync" -p /tmp/pkg.json -r 11.3-RELEASE ip4_addr="vnet0|YOURRESILIOIP/24" defaultrouter="ROUTERIP" vnet="on" allow_raw_sockets="1" boot="on" | |
# remove the temp file | |
rm /tmp/pkg.json | |
#make our iocage directories | |
iocage exec rslsync mkdir -p /config | |
iocage exec rslsync mkdir -p /mnt/syncdata |
This file contains 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
all-ping enable | |
broadcast-ping disable | |
ipv6-name allow-all-6 { | |
default-action accept | |
rule 1 { | |
action accept | |
state { | |
established enable | |
related enable | |
} |
This file contains 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
configure | |
set serivce gui https-port 8443 | |
commit | |
save | |
#make sure to open the port in our lan-local config. | |
configure | |
edit firewall | |
edit name lan-local |
This file contains 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
#based on http://www.forshee.me/2016/03/02/ubiquiti-edgerouter-lite-setup-part-2-firewall-setup.html | |
configure | |
edit firewall name allow-est-drop-inv | |
set default-action drop | |
set enable-default-log | |
set rule 1 action accept | |
set rule 1 state established enable | |
set rule 1 state related enable | |
set rule 2 action drop |