Skip to content

Instantly share code, notes, and snippets.

View ZenulAbidin's full-sized avatar
🎯
Focusing...

Ali Sherief ZenulAbidin

🎯
Focusing...
View GitHub Profile
import { Component, OnInit } from '@angular/core';
import { isValidPhoneNumber, parsePhoneNumber} from 'libphonenumber-js';
import { phoneNumbers } from './phone-numbers';
export interface Profile {
firstName?: string;
lastName?: string;
org?: string;
orgTitle?: string;
.profile-info {
ion-label {
margin-right: 1em;
min-width: 7em;
line-height: 45px;
}
ion-input, ion-select {
min-height: 45px;
max-width: 50%;
<div class="profile-info">
<ion-row>
<ion-label>First Name:</ion-label>
<ion-input [(ngModel)]="profile.firstName"></ion-input>
</ion-row>
<ion-row>
<ion-label>Last Name:</ion-label>
<ion-input [(ngModel)]="profile.lastName"></ion-input>
</ion-row>
<ion-row>
export const phoneNumbers = [
{ text: '🇺🇸 +1 United States', code: '+1', country: 'US' },
{ text: '🇨🇦 +1 Canada', code: '+1', country: 'CA' },
{ text: '🇷🇺 +7 Russia', code: '+7', country: 'RU' },
{ text: '🇪🇬 +20 Egypt', code: '+20', country: 'EG' },
{ text: '🇿🇦 +27 South Africa', code: '+27', country: 'ZA' },
{ text: '🇬🇷 +30 Greece', code: '+30', country: 'GR' },
{ text: '🇳🇱 +31 Netherlands', code: '+31', country: 'NL' },
{ text: '🇧🇪 +32 Belgium', code: '+32', country: 'BE' },
{ text: '🇫🇷 +33 France', code: '+33', country: 'FR' },
@ZenulAbidin
ZenulAbidin / example.module.ts
Last active November 29, 2023 08:33
Angular module for phone number component
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'
import { IonicModule } from '@ionic/angular';
import { PhoneNumberComponent } from './phone-number.component';
@NgModule({
imports: [
CommonModule,
FormsModule,
@ZenulAbidin
ZenulAbidin / asciikeyboard.html
Created October 29, 2023 11:22
ASCII keyboard with hex codes
<html><head>
<style>
.kb {
display: grid;
grid-template-columns: repeat(13, 1fr);
grid-gap: 5px;
margin: 20px;
}
.k {
@ZenulAbidin
ZenulAbidin / cldr-locale-helper.sh
Last active April 27, 2023 11:05
Basic shell script to drive cldr-gen-locale-data.py
# Copyright 2023 Ali Sherief
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ZenulAbidin
ZenulAbidin / cldr-gen-locale-data.py
Last active April 27, 2023 11:05
Parses i18n data form CLDR metadata and the local distribution /usr/share/i18n/locales folder.
# Copyright 2023 Ali Sherief
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ZenulAbidin
ZenulAbidin / cldr-harvest-language-maps.py
Last active April 27, 2023 11:06
Scans a CLDR folder heirarchy for language files, and extracts the language names out of them.
# Copyright 2022 Ali Sherief
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ZenulAbidin
ZenulAbidin / cldr-date-harvest.py
Last active April 27, 2023 11:06
Scans a CLDR folder heirarchy for language files, and extracts the month and week names out of them.
# Copyright 2023 Ali Sherief
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,