Skip to content

Instantly share code, notes, and snippets.

anoopsankar / UnicodeFlag.swift
Created Jul 7, 2021
Find Unicode / Emoji flag based on country code in Swift 5
View UnicodeFlag.swift
func unicodeFlag(countryCode: String) -> String {
// expects a 2-letter ISO code of the country
// Unicode flags are generated by taking the 2 letter ISO code of the country
// and mapping them to the regional indicator symbols. Font ligatures are used
// to make them into a single glymph. A more detailed explanation is available
// here ->
// This code is based on this stackoverflow answer for Java

Keybase proof

I hereby claim:

  • I am anoopsankar on github.
  • I am anoop ( on keybase.
  • I have a public key whose fingerprint is F892 85B1 B4F8 C9D2 AB79 D9D6 4EB3 E874 8C30 06FD

To claim this, I am signing this object:

anoopsankar /
Last active Dec 11, 2015
PKCS#1 digital signature
private byte[] sign(byte[] data, PrivateKey privateKey) throws GeneralSecurityException {
Security.addProvider(new BouncyCastleProvider());
Signature signer = Signature.getInstance("SHA1withRSA", "BC");
return signer.sign();
View css-flicker.html
<!DOCTYPE html>
<title>Flickering Text</title>
<script src="" type="text/javascript"></script>
View flicker-text.css
#text-block .flickr {
color: transparent;
text-shadow: white 0 0 1px;
-webkit-transition: text-shadow 0.2s ease-in-out;
-moz-transition: text-shadow 0.2s ease-in-out;
transition: text-shadow 0.2s ease-in-out;