View exportDB.sh
#!/bin/bash | |
if [ ! $1 ]; then | |
echo " Example of use: $0 database_name dir_to_store" | |
exit 1 | |
fi | |
db=$1 | |
out_dir=$2 | |
if [ ! $out_dir ]; then | |
out_dir="./" |
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 */ | |
$(window).on('load',function(){ | |
$('#preloader').fadeOut('slow',function(){$(this).remove();}); | |
}); | |
/* latest-brand-curosel */ | |
$('.latest-brand-curosel').owlCarousel({ | |
loop:true, |
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 http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=$HOME/local | |
make install | |
curl -L https://www.npmjs.com/install.sh | sh |
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", |
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 https://git.io/n-install | 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 --> | |
<script> | |
/**** MockJax to mock up an ajax response **/ | |
$.mockjax({ | |
url: '/like', | |
responseTime: 1000, | |
responseText: { | |
status: 'success', |
View oh-my-zsh.sh
# 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 |