Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
Doing collaborative stuff and real life stuff

StefansArya StefansArya

🖥️
Doing collaborative stuff and real life stuff
View GitHub Profile
@StefansArya
StefansArya / about.md
Created May 22, 2020
A longer version of me
View about.md

Still testing

With this markdown

On my profile

var got = "highlighted?";
@StefansArya
StefansArya / moment.loadLocale.js
Last active Mar 31, 2020
Dynamically load locale for moment.js
View moment.loadLocale.js
;(function(){
if(window.moment === void 0)
return console.error("Moment.js must be loaded first");
var cdnLink = 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/locale/';
var loaded = new Set();
var available = ['af','ar-dz','ar-kw','ar-ly','ar-ma','ar-sa','ar-tn','ar','az','be','bg','bm','bn','bo','br','bs','ca','cs','cv','cy','da','de-at','de-ch','de','dv','el','en-au','en-ca','en-gb','en-ie','en-il','en-nz','en-SG','eo','es-do','es-us','es','et','eu','fa','fi','fo','fr-ca','fr-ch','fr','fy','ga','gd','gl','gom-latn','gu','he','hi','hr','hu','hy-am','id','is','it-ch','it','ja','jv','ka','kk','km','kn','ko','ku','ky','lb','lo','lt','lv','me','mi','mk','ml','mn','mr','ms-my','ms','mt','my','nb','ne','nl-be','nl','nn','pa-in','pl','pt-br','pt','ro','ru','sd','se','si','sk','sl','sq','sr-cyrl','sr','ss','sv','sw','ta','te','tet','tg','th','tl-ph','tlh','tr','tzl','tzm-latn','tzm','ug-cn','uk','ur','uz-latn','uz','vi','x-pseudo','yo','zh-cn','zh-hk','zh-tw'];
moment.lo
View locale.csv
Locale Identifier Description
af Afrikaans
af_NA Afrikaans (Namibia)
af_ZA Afrikaans (South Africa)
agq Aghem
agq_CM Aghem (Cameroon)
ak Akan
ak_GH Akan (Ghana)
am Amharic
am_ET Amharic (Ethiopia)
View try-catch-finally.go
package main
import (
"fmt"
)
type Block struct {
Try func()
Catch func(Exception)
Finally func()