Skip to content

Instantly share code, notes, and snippets.

View PeterLi's full-sized avatar

Peter Li PeterLi

  • Sydney
View GitHub Profile
@PeterLi
PeterLi / Enabling DNSSEC for domains registered on GoDaddy and Managed on AWS Route53 with Load Balancer - SOLVED and finally working
Created September 20, 2022 23:32
Enabling DNSSEC for domains registered on GoDaddy and Managed on AWS Route53 with Load Balancer - SOLVED and finally working
First what is DNSSEC and other info of interest:
A nice overview and explanation:
https://www.upguard.com/blog/dnssec
Which led me to want to know more about Root Authority, and also Root Cert Authorities:
https://www.makeuseof.com/tag/your-data-given-to-nsa/ - scary
https://www.tomshardware.com/news/google-bans-cnnic-root-ca,28873.html - nothing surprising
https://www.iana.org/domains/root/servers - looks like mostly US entities, who ultimately will do what the government says. Looks like one country controls the internet.
@PeterLi
PeterLi / Apple M1 (ARM) computer using Xcode Organizer failing on Distribute App with "The data couldn't be read because it isn't in the correct format" - SOLVED!
Last active February 25, 2022 04:10
Apple M1 (ARM) computer using Xcode Organizer failing on Distribute App with "The data couldn't be read because it isn't in the correct format" - SOLVED!
Exporting/Distribute App from Xcode Organizer generates an error on Apple M1 (ARM) computers/laptops... logs say the following.
2022-02-25 03:19:31 +0000 Running /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool '/var/folders/53/pg_50pq11q9grc5v9d0797880000gn/T/IDEDistributionOptionThinning.~~~pUVwZB' '--json' '/var/folders/53/pg_50pq11q9grc5v9d0797880000gn/T/ipatool-json-filepath-~~~u1TMB8' '--toolchain' '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr' '--platforms' '/Applications/Xcode.app/Contents/Developer/Platforms' '--app-store-tools-build-version' '13C100' '--info' '--no-validate-bitcode'
2022-02-25 03:19:31 +0000 ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
2022-02-25 03:19:31 +0000 /Library/Ruby/Gems/2.6.0/gems/CFPropertyList-3.0.3/lib/cfpropertylist/rbCFPropertyList.rb:83: warning: assigned but unused variable - temp
2022-02-25 03:19:31 +0000 /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': dlsy
@PeterLi
PeterLi / Encrypted Realm with secret in keychain in app supporting background fetch intermittently causes realm to fail to initialize and crash app at try! - SOLVED
Last active February 8, 2023 20:53
Encrypted Realm with secret in keychain in app supporting background fetch intermittently causes realm to fail to initialize and crash app at try! - SOLVED
This is like a drop-in replacement for realms example swift project enabling encryption using the function getKey().
https://github.com/realm/realm-cocoa/blob/master/examples/ios/swift/Encryption/ViewController.swift
The following swift function is a drop in replacement, it documents the painful experience of an issue
which has been unsolved for years till crashlytics revealed a very useful hint, which lead to the root cause
and fix.
Comments included for education on what the symptoms were, the cause and fix and other notes.
@PeterLi
PeterLi / nginx.conf
Created November 28, 2018 23:06 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@PeterLi
PeterLi / nginx.conf
Created March 28, 2017 15:07 — forked from cpswan/nginx.conf
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
@PeterLi
PeterLi / Apple OSX "Create NAT64 Network" to help test IPv6 is just not working for my laptop or computer or iPhone or iPad devices - SOLVED.txt
Last active February 6, 2020 06:33
Apple OSX "Create NAT64 Network" to help test IPv6 is just not working for my laptop or computer or iPhone or iPad devices - SOLVED
Overview:
=========
So you want to test your application, whether it be desktop, mobile or tablet for IPv6 compatibility.
Apple make this easy as OSX has a nice hidden feature to enable your Apple laptop to create an IPv6 ONLY personal hotspot by sharing your existing (IPv4) internet connection. The problem is, you follow the instructions, but it is JUST NOT WORKING for you!
Well, if you are like me and you spent way longer than you would have wanted, trying to get this working, this snippet of info may save you some time.
Reference:
==========
@PeterLi
PeterLi / svn 1.8 working with Xcode 6 on OS X 10.10
Created December 12, 2014 00:57
svn 1.8 working with Xcode 6 on OS X 10.10
Follow below instructions to install svn 1.8 on OSX Yosemite 10.10/xcode6 install which comes with svn 1.7.17
Open Terminal:
sudo -s
#
# create link to toolchain
#
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain