Use imageWithContentsOfFile only when you are sure it’s used once since iOS won’t cache it; otherwise, use imageNamed.
Month: July 2018
Access levels
open/public: cross-moduleinternal: the default, within same modulefileprivate: within same fileprivate: within same enclosing declaration and extensions
Moving a placeholder site from Squarespace to Github Page
I have been owning a domain and an LLC with the same name.
Squarespace was my choice since I was about put in more than just a placeholder. $144/year was not bad considering the time it saves me given the features, designs, and flexibility it provides.
However, it ends up a nice looking one-pager is all I need for now. The yearly renewal is around the corner. I decided to move it to Github Page, which is totally free.
Here are the steps:
- Create a Github Page.
- Login to Github with your username (e.g., examplegithublogin)
- Create a new empty repo, examplegithublogin.github.io
- Use SourceTree to check it out to a folder locally
- Find a free template (on https://www.free-css.com/ etc.), put in the folder, commit and push.
- Go to the site (examplegithublogin.github.io) directly. Double check everything works fine.
- Unlink from Squarespace
- log in to Squarespace -> settings -> domains, then Unlink
- If needed, stop auto-renew on Squarespace.
- Setup A record
- For example, if your domain is registered with Google domains, log in to Google Domains
- Remove the Squarespace “Synthetic records”
- Add a “@” record, points to the following 4 IP’s (185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153).
- Add the custom domain to Github Page settings
- Go back to the examplegithublogin.github.io repo -> settings -> GitHub Pages -> Custom domain -> put yourcustomdomain.com in -> save
- Check yourcustomdomain.com and http://www.yourcustomdomain.com (with and without https://)
- It works for me immediately, but it could take you more time depends on your DNS propagation.
- For me, SSL took about 3 mins to start working. (Github needs to issue a certificate behind the scene.)
- Done.