This file contains hidden or 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
export LANGUAGE='en_GB.UTF-8' | |
export LC_ALL="en_GB.UTF-8" | |
sudo dpkg-reconfigure locales | |
sudo apt-get update && sudo apt-get upgrade | |
pi@raspberrypi:~# cd /usr/src | |
pi@raspberrypi:/usr/src $ sudo wget https://github.com/coova/coova-chilli/archive/1.3.1.4.tar.gz | |
pi@raspberrypi:/usr/src $ sudo tar zxvf 1.3.1.4.tar.gz | |
pi@raspberrypi:/usr/src $ cd coova-chilli-1.3.1.4/ |
This file contains hidden or 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
pi@raspberrypi:~ $ sudo apt-get install hostapd -y | |
pi@raspberrypi:~ $ sudo nano /etc/default/hostapd | |
#----------- | |
# add this to the end of line | |
DAEMON_CONF="/etc/hostapd/hostapd.conf" | |
#----------- | |
pi@raspberrypi:~ $ sudo nano /etc/hostapd/hostapd.conf | |
#----------- |
This file contains hidden or 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
export LANGUAGE='en_GB.UTF-8' | |
export LC_ALL="en_GB.UTF-8" | |
sudo dpkg-reconfigure locales | |
pi@raspberrypi:~ $ sudo apt-get update | |
pi@raspberrypi:~ $ sudo apt-get install apache2 -y | |
pi@raspberrypi:~ $ sudo apt-get install php5 libapache2-mod-php5 -y | |
pi@raspberrypi:~ $ sudo apt-get install mysql-server php5-mysql -y | |
sudo service apache2 restart | |
#password: raspberry |
This file contains hidden or 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
Andorra | ||
---|---|---|
United Arab Emirates | ||
Afghanistan | ||
Antigua and Barbuda | ||
Anguilla | ||
Albania | ||
Armenia | ||
Netherlands Antilles | ||
Angola | ||
Antarctica |
This file contains hidden or 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
<input name="sample[]" type="checkbox" value="1"> Test 1 | |
<input name="sample[]" type="checkbox" value="2"> Test 2 | |
<input name="sample[]" type="checkbox" value="4"> Test 3 | |
<input name="sample[]" type="checkbox" value="8"> Test 4 | |
<input name="sample[]" type="checkbox" value="16"> Test 5 | |
=========== | |
1. DB relationship |
This file contains hidden or 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
This file contains hidden or 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
<?php | |
session_start(); | |
if (!isset($_SESSION['count'])) { | |
$_SESSION['count'] = 0; | |
} else { | |
$_SESSION['count']++; | |
} | |
echo "count {$_SESSION['count']}"; |
This file contains hidden or 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
Yii::$app->session->setFlash('success', "Rekod telah didaftar"); | |
Yii::$app->session->setFlash('success', "Rekod telah dikemaskini"); | |
Yii::$app->session->setFlash('success', "Rekod telah dihapuskan"); |
This file contains hidden or 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
([0-9][0-9])((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))([0-9][0-9])([0-9][0-9][0-9][0-9]) |
This file contains hidden or 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
docker run -it --rm -v "$(pwd):/app" -w /app composer create-project --prefer-dist laravel/laravel src --ignore-platform-reqs | |
docker run -it --rm -v "$(pwd):/app" -w /app composer update --ignore-platform-reqs | |
docker exec -it -w /var/www/projects/spark/src php7.fpm php artisan spark:install --force | |
docker exec -it -w /var/www/projects/spark/src php7.fpm php artisan storage:link | |
docker run -it --rm -v "$(pwd):/app" -w /app node:alpine npm install | |
docker run -it --rm -v "$(pwd):/app" -w /app node:alpine npm run dev |