Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mrityunjai Kumar MrityunjaiKumar

🎯
Focusing
View GitHub Profile
@MrityunjaiKumar
MrityunjaiKumar / wifi_adb.sh
Last active Mar 8, 2017
Debug/Run/Install Android applications wirelessly (over wifi)
View wifi_adb.sh
#!/bin/bash
#On the HOST side ie. your PC
#Initiate the connection on port 5555
adb tcpip 5555
#Replace <DEVICE_IP_ADDRESS> with IP of mobile
adb connect <DEVICE_IP_ADDRESS>:5555
#To revert back the debugging via USB use
View install_tmux_vim.sh
#!/bin/bash
sudo apt-get update -y &&
sudo apt-get install vim git tmux -y &&
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle &&
git clone https://github.com/MrityunjaiKumar/tmux-vim-configurations.git &&
cd tmux-vim-configurations &&
cp .tmux.conf ~/ &&
cp .vimrc ~/ &&
vim +PluginInstall +qall
View Install_LAMP.sh
#!/bin/bash
sudo apt-get install apache2 -y &&
sudo apt-get install mysql-server -y &&
sudo apt-get install php5 libapache2-mod-php5 -y &&
sudo /etc/init.d/apache2 restart
View install_nvm.sh
#!/bin/bash
apt-get install -y build-essential g++ curl libssl-dev apache2-utils git libxml2-dev &&
apt-get remove nodejs &&
git clone git://github.com/creationix/nvm.git ~/nvm &&
echo '. ~/nvm/nvm.sh' >> ~/.bashrc && . ~/.bashrc &&
nvm install v4.1.0 &&
nvm use v4.1.0 &&
node -v
View pm2_Production_process_manager.sh
npm install pm2 -g
pm2 start app.js
sudo env PATH=$PATH:/usr/local/bin pm2 startup -u username
View MySQLdb with python
sudo apt-get install python-pip python-dev libmysqlclient-dev
pip install MySQL-python
View cron_python_script
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
View matplotlib_installation
sudo apt-get install libpng-dev libfreetype6-dev
pip install matplotlib
View CUPS_setup
sudo apt-get install cups
sudo usermod -a -G lpadmin pi
http://www.openprinting.org/printer/samsung/samsung-ML-4500
http://www.openprinting.org/ppd-o-matic.php?driver=gdi&printer=samsung-ML-4500&show=0
< Location / >
# Restrict access to the server...
Order allow,deny
*Allow @local