Skip to content

Instantly share code, notes, and snippets.

View MunifTanjim's full-sized avatar
🧐
What's happening?

Munif Tanjim MunifTanjim

🧐
What's happening?
View GitHub Profile
@MunifTanjim
MunifTanjim / index.html
Last active May 26, 2017 11:42
Gist Embedder - Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gist Embedder</title>
<script src='https://unpkg.com/gist-embedder/dist/gist-embedder.min.js'></script>
</head>
<body>
const getDigitsArray = numberString => numberString.split('')
const getProbableNumbers = (placeholder, numberString) => {
let probableNumbers = []
let stuffedDigitsArray = getDigitsArray(numberString).map(
digit =>
digit == placeholder ? [null, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] : [digit]
)

Keybase proof

I hereby claim:

  • I am muniftanjim on github.
  • I am muniftanjim (https://keybase.io/muniftanjim) on keybase.
  • I have a public key ASBtCQ0HCm8FntYup1HO5tEDjWOwW8k0nRNiUT5QvnfK6wo

To claim this, I am signing this object:

@MunifTanjim
MunifTanjim / RoutineTermSectionEdit.js
Created April 28, 2019 20:47
React Hooks Component Example
import Form from 'components/Form/Form'
import HeaderGrid from 'components/HeaderGrid'
import { connect as connectFormik, Formik } from 'formik'
import { defaultsDeep, get, groupBy, map, zipObject } from 'lodash-es'
import React, { useCallback, useEffect, useMemo, useReducer } from 'react'
import { connect } from 'react-redux'
import {
Button,
Dropdown,
FormField,
const testArr = [
/* 0 */ 0,
/* 1 */ 1,
/* 2 */ 0,
/* 3 */ -3,
/* 4 */ 1,
/* 5 */ 3,
/* 6 */ 4,
/* 7 */ 0,
/* 8 */ 1,
@MunifTanjim
MunifTanjim / str.sh
Created May 31, 2020 00:27
Shell Helpers
function str_repeat() {
local -r str="$1"
local -r n="$2"
echo "$(printf '%*s' "${n}" | tr ' ' "${str}")"
}
function str_box() {
local -r str="$1"
local -r str_len=$(( 4 + ${#str} ))
@MunifTanjim
MunifTanjim / setup-from-github-release
Created July 31, 2020 15:14
Setup from Github Release
#!/usr/bin/env bash
set -euo pipefail
command_exists() {
type "${1}" >/dev/null 2>&1
}
select_github_release() {
local -r repo="${1}"
@MunifTanjim
MunifTanjim / node-oidc-provider-database-schema-postgresql.sql
Created September 28, 2020 17:23
Node OIDC Provider - Database Schema (PostgreSQL)
begin;
create function on_update_timestamp_trigger()
returns trigger as $$
begin
new."updated_at" = current_timestamp;
return new;
end;
$$ language 'plpgsql';
@MunifTanjim
MunifTanjim / VSCode-Neovim-Keybindings.md
Last active May 19, 2024 11:03
VSCode Keyboard Shortcuts to use with vscode-neovim
@MunifTanjim
MunifTanjim / carbon.now.sh-gruvbox_dark.json
Created June 8, 2021 22:13
carbon.now.sh - gruvbox dark
{
"custom": true,
"id": "gruvbox_dark",
"name": "Gruvbox Dark",
"highlights": {
"attribute": "#d79921",
"background": "#1d2021",
"comment": "#a89984",
"definition": "#fbf1c7",
"keyword": "#fb4934",