Skip to content

Instantly share code, notes, and snippets.

View pshaddel's full-sized avatar
🏋️‍♀️

Poorshad Shaddel pshaddel

🏋️‍♀️
View GitHub Profile
@henrik
henrik / eu_country_codes.rb
Last active December 20, 2023 12:20
EU (European Union) country codes, ISO 3166-1 alpha-2. (This Gist is from 2012. Please see comments for updates.)
# Note: VAT identification numbers for Greece use "EL", not "GR".
COUNTRY_CODES_EU = %w[
AT BE BG CY CZ DK EE FI FR DE GR HU IE IT
LV LT LU MT NL PL PT RO SK SI ES SE GB
]
@jofftiquez
jofftiquez / firebase-admin-multi-apps-init-ES6.md
Last active March 12, 2024 01:29
Firebase admin - how to initialise multiple applications in ES6 nodejs.

Firebase Admin Multi App Initialization - ES6

This is a snippet that uses firebase's firebase-admin to initialize multiple firebase projects in one admin application.

ES5 version

Using ES6

import 'firebase';
@Gictorbit
Gictorbit / iran-nationalcode-location.json
Created May 6, 2020 00:27
json کد شهرستان و استان برای کد ملی فایل
{
"000": {
"province": "-",
"city": "-"
},
"001": {
"province": "تهران",
"city": "تهران مرکزی"
},
"002": {
@rishitells
rishitells / Jest_GitLab_CI.md
Last active July 22, 2024 06:47
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@ali-master
ali-master / typescript-session1.ts
Created December 10, 2021 19:13
Typescript Workshop(First session)
////////////////////
// Exclude
////////////////////
type MyExclude<T, L> = T extends L ? never : T;
type TestExclude = MyExclude<"a" | "b" | "c" | "d", "a" | "b">
////////////////////
// Extract
////////////////////
type MyExtract<T, L> = T extends L ? T : never;