Skip to content

Instantly share code, notes, and snippets.

Working from home

Md. Asif Khan imasif

Working from home
View GitHub Profile
imasif /
Last active Jun 22, 2020
Export mongodb database into JSON files, and import the JSON again.
if [ ! $1 ]; then
echo " Example of use: $0 database_name dir_to_store"
exit 1
if [ ! $out_dir ]; then
imasif / asound.conf
Created Oct 27, 2019
for using different mic and speaker for alsa in rasberrypi
View asound.conf
pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
pcm.mic {
type plug
slave {
pcm "hw:<Card no>,<device no>"
View main.js
(function ($) {
/* preloader */
/* latest-brand-curosel */
imasif / bd mobile regex
Last active Sep 12, 2019
Bangladeshi mobile phone regex
View bd mobile regex
bd_mobile_regex = /^(?:013|014|015|016|017|018|019)?(?:\d{8})$/;
View node_manual.txt
Add this code below ~/.bashrc file: export PATH=$HOME/local/bin:$PATH
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=$HOME/local
make install
curl -L | sh
imasif / goto method declaration
Last active Sep 12, 2019
Add mouse click `goto definition` in sublime text 3.
View goto method declaration
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
imasif / NodeJS multiple version management Linux or Mac
Last active Sep 12, 2019
NodeJS multiple version management Linux/Mac
View NodeJS multiple version management Linux or Mac
1. We will be using 'n' for it. But before using `n` we need to install make;
$ sudo apt-get install make
2. Installing `n`:
$ curl -L | bash
sets both PREFIX and N_PREFIX to $HOME/n, installs n to $HOME/n/bin,
modifies the initialization files of supported shells to export N_PREFIX and add $HOME/n/bin to the PATH,
and installs the latest stable node version.
3. . ~/.bashrc (reload .bashrc file)
View gist:5d01e4a32fc3d6022fd7
<!-- MockJax example with Bootstrap 3.2 -->
/**** MockJax to mock up an ajax response **/
url: '/like',
responseTime: 1000,
responseText: {
status: 'success',
imasif /
Last active Aug 29, 2015
How to install oh-my-zsh on Elementary OS #oh-my-zsh
# Install oh-my-zsh on Elementary OS
## We need curl, vim, git & zsh
### In Your Terminal:
$ sudo apt-get update
$ sudo apt-get install -y curl
$ sudo apt-get install -y vim
$ sudo apt-get install -y git