Skip to content

Instantly share code, notes, and snippets.

View HKhademian's full-sized avatar
Working from home

Hossain Khademian HKhademian

Working from home
View GitHub Profile
#!/usr/bin/env bun
import { EventButs } from "./EventBu";
enum MyEvents1 {
Val1 = 'Val1',
Event1 = 'Event1',
Event2 = 'Event2',
Event3 = 'Event3',
HKhademian /
Created March 17, 2022 05:41
Sample objectives you can inspire to put in your CV

  1. Enthusiastic and self-motivated individual looking for a Preschool Teacher position at Treasure School; coming with ability to recognize and evaluate the educational needs and potentials of young children and develop suitable educational plans that can meet their needs and potentials.

  2. To secure a position as an Elementary School Teacher that will enhance my dedication to children’s educational essentials and development.

  3. Smart and intelligent high school graduate with proficiencies in math and language skills seeks to add value as an Assistant Teacher at Mayfield School.

  4. Conscientious child care worker with very strong ability to coordinate, go along with, and provide activities suitable for the opportunity age of children, desires the position of Child Care Worker at Priceless Children Center.

import {useState, useEffect} from 'preact/hooks';
export const getStorage = (key, initValue = undefined, session = false, decode = data => data) => {
if (typeof window == "undefined") return initValue;
const item = session ?
window.sessionStorage.getItem(key) :
return item !== undefined && item !== null ? decode(item) : initValue;
import {useEffect, useState} from "preact/hooks";
export const useFetch = (
url, // request url
parse = 'json', // default body parser
placeholder = undefined, // when error|loading return this as data
key = undefined, // to track different changes (latter to cache)
...options // fetch() options like methods , ...
} = {}
HKhademian / LCP.js
Created June 13, 2020 10:30
Tri Data Struct in JavaScript
// to run this code :
// node ./LCP.js
const Tri = require("./Tri.js");
Tri.prototype.LCP = function() {
var node = this.root, keys = undefined;
while((keys=Object.keys(node.children)).length == 1) {
node = node.children[keys[0]];
HKhademian /
Created May 5, 2020 19:20
This file contains console texts wrote and responded in a learning video:
[1, "hi", 'h']
[1, 'hi', 'h']
list1 = []
list2 = [ "red", "blue", "yellow" ]
Traceback (most recent call last):
HKhademian /
Created February 11, 2016 22:10
A simple Android Rating View that extends LinearLayout and fill it with ImageViews
package hco.widget;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
HKhademian /
Last active February 10, 2016 10:12
Android TreeView using ListViews
public interface TreeElement extends Serializable {
public void addChild(TreeElement child);
public String getId();
public void setId(String id);
public String getOutlineTitle();
public void setOutlineTitle(String outlineTitle);