uci set network.lan.ipaddr=192.168.2.1;
uci commit;
/etc/init.d/network restart
uci add firewall rule
uci set firewall.@rule[-1].name='Allow-WEB-wan'
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
#!/bin/sh | |
# BACKUP SCRIPT | |
CONTACT="[email protected]" | |
MAIL="/tmp/mail" | |
if [ -e "/var/lock/backup.lock" ] | |
then | |
echo " BACKUP ALREADY STARTED !!" > $MAIL |
//https://stackoverflow.com/questions/282670/easiest-way-to-sort-dom-nodes | |
var list = document.querySelectorAll('.row.page-0'); | |
var items = list[0].childNodes; | |
var itemsArr = []; | |
for (var i in items) { | |
if (items[i].nodeType == 1) { // get rid of the whitespace text nodes | |
itemsArr.push(items[i]); | |
} |
cat << 'EOF' > /etc/uci-defaults/reset_wan | |
#!/bin/sh | |
(crontab -l ; echo "*/5 * * * * sh /usr/bin/reset_wan") | sort | uniq | crontab - | |
/etc/init.d/cron start | |
/etc/init.d/cron enable | |
exit 0 | |
EOF | |
chmod +x /etc/uci-defaults/reset_wan | |
cat << 'EOF' > /usr/bin/reset_wan |
#install git with user | |
yum install git | |
adduser git | |
passwd git | |
su git | |
cd | |
#add public keys to folder and generate autorized keys | |
mkdir /home/git/.ssh | |
chmod 700 /home/git/.ssh |
yum -y install httpd mod_ssl | |
systemctl start httpd.service | |
systemctl enable httpd.service | |
yum -y install epel-release yum-utils | |
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
yum-config-manager --enable remi-php72 | |
yum -y install php php-fpm php-mysql php-mbstring php-dom php-xml php-gd | |
cat << EOF > /etc/yum.repos.d/MariaDB.repo |
<?php | |
namespace Incenteev\MailerBundle\Mailer; | |
class TwigRenderer implements RendererInterface | |
{ | |
private $twig; | |
private $styleInliner; | |
/** |
Raw CSV data is made available by Common Data Hub here:
http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes
http://www.commondatahub.com/live/geography/country/iso_3166_country_codes
The table cdh_state_codes
(see cdh-schema.sql
below) is designed to hold the raw data, which should import readily using most common database tools, or directly into MySQL via LOAD DATA, e.g.:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE iso3166
.cdh_state_codes
;