I did some spring-cleaning on my Github repositories a few days ago.
I was doing it manually at first, by going through the repository settings page, clicked on the delete button in the Danger Zone section, went through several popups and finally entered the repository name to confirm the deletion. Yeah… it’s such a boring chore.
Then, I remembered that Github has a cli client that I have been using for creating repo and pull requests. Figured I might take a look again at their docs to see if there’s a command for deleting a repository or setting a repository to private, and there is one! The usage is simple too. Here’s how.
To modify repository access, run the following command:
gh repo edit $REPO --visibility=private
Replace $REPO with the repo name. You can use either the full URL or the repo name. For example.
# to delete using urlgh repo delete https://github.com/faizmokh/dummyrepo
# to modify access using repo namegh repo edit faizmokh/dummyrepo --visibility=private
That’s all. Go through the docs, if you want to know what else you can do with gh
My Apple Developer account renewal lapsed early last year because my bank flagged it as foreign transaction. They did call me to verify it but the transaction had been declined by Apple by the time my bank approved it. Long story short, I did not renew my membership.
But now I felt like renewing it again to release all my “almost finished” side projects. I headed to the Apple Developer website, but to my surprised, the price is RM399/year now. I’m pretty sure it was cheaper last year.
So I checked the Developer app to see if the price is different, and it is! It is still RM369/year on the app. Somewhat weird, but my guess is this has something to do with the App Store having less “dynamic” pricing as compared to the website. From what I noticed over the years, there will be a lot of news whenever they upgrade their App Store Tier pricing.
So if you’re looking to subscribe or renew your Apple Developer account, maybe you can try subscribing it through the app.
Today I learned how to convert SSL certificate that is using crt format to der format while working on
updating the certificate that was pinned in our iOS app. Here’s a quick guide on the how-to.
First of all make sure you have openssl installed in your machine. Then run the following command in your terminal:
openssl x509 -in input_cert.crt -out output_cert.der -outform der
Make sure to replace input_cert.crt and output_cert.der with the actual filenames of your certificates.
Brew Cask is an extension of Homebrew that allows us to install GUI tools or 3rd party binaries easily just by using command line.
It is so convenient and I have been using it to install most of my app like Chrome, Android Studio or VSCode for years. One of the app I used regularly is Periphery, which is a tool for identifying unused codes in iOS projects.
Recently, I ran brew upgrade and unfortunately the update caused Periphery app to stop working. The latest version(2.15.0) requires Swift 5.7 but I’m still using Xcode 14.1. I thought I could just run brew install periphery@2.14.0 to downgrade the version but it did not work.
Did some googling but the steps aren’t straightforward so I will document it down here for my future self.
So here’s the steps:
Google the casks that you want to install the specific version of here. If it’s not part of brew, search it on Github. For example here’s the page for periphery
There’s another way to install by using brew edit.
Here’s the steps:
Run brew edit [APP_NAME]. Note that running this for the first time will trigger the following warning message since you will be editing the Cask file directly
Warning: edit is a developer command, so Homebrew's
developer mode has been automatically turned on.
To turn developer mode off, run:
brew developer off
Update the version and sha256 value based on the version that you want to install. You can find the info on Github. Using the same example:
cask 'periphery' do
- version '2.15.0'
- sha256 '7f0d05c7e9d04925f8c8ed4365146c23abd3b4ac1a5865f125438ce9851f93f7'
+ version '2.14.0'
+ sha256 'f44af8004706416610709ed4f913cedc06e458941a6968c095c475bef54e1920'
url "https://github.com/peripheryapp/periphery/releases/download/#{version}/periphery-#{version}.zip"
name 'Periphery'
homepage 'https://github.com/peripheryapp/periphery'
binary 'periphery'
depends_on macos: '>= :catalina'
```
zap delete: [
'~/Library/Caches/com.github.peripheryapp',
'~/Library/Caches/com.peripheryapp.periphery'
]
end
While upgrading Carthage libraries for Xcode 14.3.1, one of the libraries that my team depends on is throwing errors.
I checked the repo and found out that the library have been archived. I forked the repo and tried to run it locally.
It threw the following error when I ran it:
ld: file not found: /Applications/Xcode-14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently, this is because with Xcode 14.3.1 the minimum deployment target have been set to iOS 11. DZNEmptyDataSet is still using iOS 8 as its minimum deployment target. Upgrading it to iOS 11 fixed the error.
p/s: Yeah I know the usage of this library is somewhat unecessary but it’s already being used everywhere and replacing it with our implementation will require huge effort. Maybe some day. Not today.