Allocating swap space to a vanilla ubuntu server on Azure or AWS. By default, you will have zero swap. Possibly resulting is unknown app/memory related crashes. Add a bit of swap for a buffer! fallocate -l 1G /swapfile;chmod 600 /swapfile;mkswap /swapfile;swapon /swapfile;echo “/swapfile swap swap defaults 0 0” >> /etc/fstab;swapon –show;free -h;
Enable phpmyadmin: a2enconf phpmyadmin.conf systemctl reload apache2 Disable phpmyadmin: a2disconf phpmyadmin.conf systemctl reload apache2
Windows Setup Download the Windows Raspberry Pi Compute Module Boot Loader: https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe Install the RPI Boot Setup file With the board powered off, ensure the USB Boot jumper link is enabled. Attach the Desktops USB to the ‘Micro USB Slave’ port Attach the micro USB power supply to ‘Power In’ to power up the board […]
Windows Setup Download the Windows Raspberry Pi Compute Module Boot Loader: https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe Install the RPI Boot Setup file With the board powered off, ensure the USB Boot jumper link is enabled. Attach the Desktops USB to the ‘Micro USB Slave’ port Attach the micro USB power supply to ‘Power In’ to power up the board The […]
Windows Setup Download the Windows Raspberry Pi Compute Module Boot Loader: https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe Install the RPI Boot Setup file With the board powered off, ensure the USB Boot jumper link is enabled. Attach the Desktops USB to the ‘Micro USB Slave’ port Attach the micro USB power supply to ‘Power In’ to power up the board The […]
List of all user commits on a git repo by user between 2 dates. git shortlog -sne –since=”01 Jan 2017″ –before=”01 Jan 2018″
Step 1 If you are using debian or ubuntu, install the mod-geoip package. sudo apt-get install libapache2-mod-geoip Step 2 Enable GeoIPEnable, edit geoip.conf /etc/apache2/mods-enabled/geoip.conf GeoIPEnable On Step 3 Find Country Code Lookup: https://en.wikipedia.org/wiki/ISO_3166-1 In Apache vhosts file, outside of the </Directory> tags: <Location /> ##ISO 3166 Country Codes ## Block China ## Block Costa […]
Count tables within a DB, nice and easy.. use db_name; select count(*) from information_schema.tables where table_schema = database();
Group data in MySQL every N hours Using the hour to aggregate.. in this example every 3 hours. select * from tbl_sometable group by floor(hour(time) / 3);