Skip to content

Instantly share code, notes, and snippets.

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

Ali Sherief ZenulAbidin

🎯
Focusing...
View GitHub Profile
@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,
@ZenulAbidin
ZenulAbidin / WideNumberInput.js
Last active April 27, 2023 11:08
Number Input for Material UI v5, suitable for mobile devices
// 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 / NumberInputv2.js
Last active April 27, 2023 11:08
Number Input for Material UI v5 (mark 2)
// 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 / NumberInputv1.js
Last active April 27, 2023 11:09
Number Input for Material UI v5 (mark 1)
// 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 / non-recursive.py
Created September 5, 2022 22:04
non-recursive functions in Python
# Credits: https://medium.com/@ujjawalsinhacool16021998/easily-convert-recursive-solutions-to-non-recursive-alternatives-4fa6e1acf702
# Simple function, two branches which does not return a value
def simple2_noreturn(inputs):
CALL, HANDLE = 0, 1
call_stack = [(CALL, inputs)]
while call_stack:
action, data = call_stack.pop()
if action == CALL:
call_stack.append((HANDLE, some_data))
@ZenulAbidin
ZenulAbidin / button-render.py
Last active April 27, 2023 11:11
Render duotone button plugin in GIMP
# Copyright 2021 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,
const path = require('path');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
another: './src/another-module.js',
index: {
import: './src/index.js',
dependOn: 'shared',
const Person = props => {
const { person } = props;
// You can validate `person` object here, for example
const { name, age, skill } = person;
return (
<div>
<h2>
I am {name},My age is {age},I know {skill}
</h2>
</div>