- for an empty checkboxP
- for a checked checkboxP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// Replace React.lazy(() => import('x')); | |
// with retryDynamicImport(() => import('x')); | |
import { ComponentType, lazy } from 'react'; | |
const MAX_RETRY_COUNT = 15; | |
const RETRY_DELAY_MS = 500; | |
// Regex to extract the module URL from the import statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------- 1 ---------------- | |
# Make sure that both methods work as expected | |
go test | |
# Output -> | |
# PASS | |
# ok github.com/alireza-ahmadi/isempty 0.677s | |
# ----------------- 2 ---------------- | |
# Run benchmark to understand the performance difference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases | |
alias o="open ." | |
alias pi="ping blogfa.com" | |
alias gis="git status" | |
alias gad="git add" | |
alias gil="git log" | |
alias s="source" | |
alias sp="spotify" | |
alias google-chrome="open -a 'Google Chrome'" | |
alias y="yarn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # Usage | |
// | |
// Save this file and replace username and password on the last line of the file with | |
// your Snapp username and password then run the following commands: | |
// | |
// yarn init && yarn add request | |
// node SnappTotalPriceCalculator.js | |
// | |
const request = require('request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ack | |
autoconf | |
automake | |
awscli | |
axel | |
cairo | |
cassandra | |
ccat | |
cctools | |
cloc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bullet Theme v0.1.0 | |
# | |
# @author Alireza Ahmadi <[email protected]> | |
PROMPT=' %{$fg_bold[black]%}●%{$fg_bold[green]%}%p %{$fg_bold[blue]%}%c $(git_prompt_info)% %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_CLEAN="> %{$fg_bold[cyan]%}✛ " | |
ZSH_THEME_GIT_PROMPT_DIRTY="> %{$fg_bold[red]%}✕ " | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}<" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
[Decrease dock's auto-hide delay]
defaults write com.apple.dock autohide-delay -float 0 && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock
defaults delete com.apple.dock autohide-delay && defaults delete com.apple.dock autohide-time-modifier && killall Dock
[Speed up mission control animations]
defaults write com.apple.dock expose-animation-duration -float 0.12 && killall Dock
defaults delete com.apple.dock expose-animation-duration && killall Dock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Insert `ALL_PROXY=socks5://server:port` before the command by pressing | |
# ESC and p. Heavily inspired by oh-my-zsh's sudo plugin. | |
# | |
# ------------------------------------------------------------------------------ | |
# Authors | |
# ------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Loop { | |
public static void main(String[] args) | |
{ | |
Integer total = 500000000; | |
Integer chunk = 50000000; | |
Integer i = 0; |
NewerOlder