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
############################## Master side (ESP)################################################ | |
#define v_2 13 //GPIO13 // MOSI | |
#define v_3 12 //GPIO12 // MISO | |
#define v_4 14 //GPIO14 //SCK | |
#define v_5 16 //GPIO16 | |
#define v_6 adc //ADC | |
#define v_7 reset //RESET | |
#define g_2 15 //GPIO15 //SS | |
#define g_3 2 //GPIO29 //TX1 |
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
apt-get remove virtualbox -y && | |
apt-get autoremove -y && | |
apt-get update -y; apt-get upgrade -y; apt-get dist-upgrade -y | |
mkdir virtualBox | |
cd virtualBox | |
#wget http://http.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u3_amd64.deb && | |
#wget http://http.us.debian.org/debian/pool/main/libv/libvpx/libvpx1_1.3.0-3_amd64.deb | |
apt-get install libssl1.1 libvpx4 libsdl-ttf2* libpng16* -y | |
#wget http://download.virtualbox.org/virtualbox/5.1.14/Oracle_VM_VirtualBox_Extension_Pack-5.1.14-112924.vbox-extpack | |
#wget http://download.virtualbox.org/virtualbox/5.1.4/VBoxGuestAdditions_5.1.4.iso |
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
echo "Installing OpenCV" | |
echo "Removing any pre-installed ffmpeg and x264" | |
sudo apt-get -qq remove ffmpeg x264 libx264-dev | |
echo "Installing Dependenices" | |
sudo apt-get install -y libopencv-dev pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils qt5-default libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev libsdl1.2-dev libvpx-dev libgstreamer0.10-0 gstreamer0.10-tools gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad libgtk2.0-0 libgtk |
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
Install avahi with the following commands on the Raspberry Pi: | |
sudo apt-get install avahi-daemon | |
Update boot startup for avahi-daemon | |
sudo insserv avahi-daemon | |
Apply the new configuration with: | |
sudo /etc/init.d/avahi-daemon restart |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] | |
</IfModule> | |
define('FORCE_SSL_ADMIN', true); | |
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
cd /var/log/apache2 | |
tail access.log | |
grep -o 191.96.249.80 acceess.log | wc -l | |
cd /etc/apache2/sites-available/ | |
sudo nano 000-default.conf #whatever the working config is for that website #by default its 000-default if not added/changed. | |
<Files xmlrpc.php> | |
order allow,deny | |
deny from 191.96.249.80 |
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) XML Tools #=> use the shortcut Ctrl+Alt+Shift+B (or menu -> Plugins -> XML Tools -> Pretty Print) |
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
ssh -i file.pem ubuntu@elastic-ip | |
sudo apt-get update -y && sudo apt-get upgrade -y; | |
##installing LAMP | |
sudo apt-get install -y apache2 mysql-server php5-mysql php5 libapache2-mod-php5 php5-mcrypt phpmyadmin | |
#Test LAMP | |
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php | |
<?php phpinfo(); ?> |
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
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 |
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
sudo apt-get install libpng-dev libfreetype6-dev | |
pip install matplotlib |