Skip to content

Instantly share code, notes, and snippets.

View jerrykrinock's full-sized avatar

Jerry Krinock jerrykrinock

View GitHub Profile
@jerrykrinock
jerrykrinock / PackageExtensions.sh
Last active August 22, 2017 00:06
Script which packages browser extensions for Firefox, Opera and Chrome
packExtensionForBrowser () {
echo "#"
echo "##### Building $productName as $type for $browser #####"
cd $sourceDir
# Remove .DS_Store file, if any
rm -f $productName/BrowserCommon.DS*
# Make a temporary directory path which we shall use for building
@jerrykrinock
jerrykrinock / gist:82bf441bdd1ab78cbe769d8158b4df0f
Created January 26, 2021 03:44
How to replace deprecated CFURLCreateStringByAddingPercentEscapes() with -[NSString stringByAddingPercentEncodingWithAllowedCharacters:]
Question: Which NSCharacterSet should I pass to -[NSString stringByAddingPercentEncodingWithAllowedCharacters:]
so that it works exactly like the deprecated CFURLCreateStringByAddingPercentEscapes() did?
Answer: Either URLFragmentAllowedCharacterSet or URLQueryAllowedCharacterSet
Explanation:
That answer comes from the following program output, which is the result of running
the code below it.
Frag Host Pswd Path Qery User CFnd