Skip to content

Instantly share code, notes, and snippets.

View mirismaili's full-sized avatar

S. Mahdi Mir-Ismaili mirismaili

View GitHub Profile
@mirismaili
mirismaili / lang-codes.d.ts
Last active April 11, 2023 12:15
ISO 639-1 standard language codes (typescript)
/**
* **ISO 639-1 standard language codes**
*
* To regenerate, run this query:<br>
* <code>
* [...document.querySelector('#Table > tbody').children].map(tr => `'${tr.children[1].innerText}'`).sort().join('|')
* </code><br>
* on {@link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes this page}.
* @See {@link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes}
*/
@mirismaili
mirismaili / .editorconfig
Last active August 11, 2022 14:10
Editor Configuraion File
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 2
trim_trailing_whitespace = false # disable due to IntellijIdea 2021.1.1 bug: https://stackoverflow.com/questions/2977324/disable-reformatting-code-when-saving-files#comment119066928_2978824
ij_continuation_indent_size = 2
@mirismaili
mirismaili / download-pipe-extract.js
Last active February 14, 2024 10:26
Fast download>--pipe-->extract using node.js. For `tar` and `.tar.gz` files
/**
* Download and extract `.tar.gz` file using node.js
*
* Created on 1400/2/7 (2021/4/27).
* @author {@link https://mirismaili.github.io S. Mahdi Mir-Ismaili}
*/
import http from 'http'
import https from 'https'
import tar from 'tar'
@mirismaili
mirismaili / unicode-numbering-systems.js
Created February 22, 2020 14:25
Unicode Numbering Systems
/**
* Created on 1398/12/3 (2020/2/22).
* @author {@link https://mirismaili.github.io S. Mahdi Mir-Ismaili}
*/
'use strict'
// console.log((1234567890).toLocaleString('en-u-nu-arab', {useGrouping: false}))
// console.log((1234567890).toLocaleString('en-u-nu-arabext', {useGrouping: false}))
// console.log((1234567890).toLocaleString('en-u-nu-bali', {useGrouping: false}))
// console.log((1234567890).toLocaleString('en-u-nu-beng', {useGrouping: false}))
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
@cougrimes
cougrimes / velocity-marketo-npp.xml
Created July 3, 2017 17:29
Velocity syntax highlighting for Notepad++, Marketo-specific
<NotepadPlus>
<UserLang name="Velocity" ext="vm" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03#* 04*# 00## 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@evantoli
evantoli / GitConfigHttpProxy.md
Last active June 19, 2024 00:17
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

apply plugin: 'java'
apply plugin: 'java-library-distribution'
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.commons:commons-lang3:3.3.2'
}
@Thermionix
Thermionix / userDefineLang_Groovy.xml
Last active January 18, 2024 21:20
Groovy user defined language for notepad++
<NotepadPlus>
<UserLang name="Groovy" ext="groovy" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03/* 04*/ 00// 01 02</Keywords>
<Keywords name="Keywords1">abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true</Keywords>
<Keywords name="Keywords2">as assert def mixin property test using in it</Keywords>
@ghosh
ghosh / fonts
Last active November 21, 2021 05:43
Easy font face declarations using Sass lists, mixins and loops!
/**
* The path to the fonts folder, relative to the
* compiled stylesheet
*
* @type String
*/
$font-path: "../fonts/" !default;
/**