This gist was getting a lot of comments/questions, but since there are no notifications when someone replies to a gist, I've moved the setup instructions and a bunch of sample code to a dedicated Github repo.
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
<?php | |
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
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
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686) | |
-- | |
-- Host: 127.0.0.1 Database: world | |
-- ------------------------------------------------------ | |
-- Server version 5.1.51-debug-log | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
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
// routes web.php | |
\Event::listen('illuminate.query', function($sql) { | |
var_dump($sql); | |
\Log::info($sql); | |
}); |
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
<?php | |
namespace App\Http\Controllers\Auth; | |
use App\Http\Controllers\Controller; | |
use App\Transformers\Json; | |
use App\User; | |
use Illuminate\Foundation\Auth\SendsPasswordResetEmails; | |
use Illuminate\Http\Request; |
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
'<option value="هندسة مدنية" title="">هندسة مدنية</option>' + | |
'<option value="هندسة معمارية" title="">هندسة معمارية</option>' + | |
'<option value="هندسة ميكانيكية" title="">هندسة ميكانيكية</option>' + | |
'<option value="هندسة كهربائية" title="">هندسة كهربائية</option>' + | |
'<option value="هندسة إلكترونية" title="">هندسة إلكترونية</option>' + | |
'<option value="هندسة اتصالات" title="">هندسة اتصالات</option>' + | |
'<option value=" تخطيط المدن والأقاليم" title=""> تخطيط المدن والأقاليم.</option>' + | |
'<option value="هندسة المعادن" title="">هندسة المعادن</option>' + | |
'<option value="هندسة الوقاية من الإشعاع" title="">هندسة الوقاية من الإشعاع</option>' + | |
'<option value="هندسة نووية" title="">هندسة نووية</option>' + |
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
Array[6329][ | |
{ | |
"Id": 2, | |
"ArabicName": "معهد الحرم المكي الشريف - بنين", | |
"EnglishName": "معهد الحرم المكي الشريف - بنين", | |
"SchoolCode": "00001", | |
"RegionName": "مكة المكرمة", | |
"CityName": "مكة المكرمة" | |
}, | |
{ |
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
<template> | |
<div class="users"> | |
<div v-if="error" class="error"> | |
<p>{{ error }}</p> | |
</div> | |
<ul v-if="users"> | |
<li v-for="{ id, name, email } in users"> | |
<strong>Name:</strong> {{ name }}, | |
<strong>Email:</strong> {{ email }} |
Let's create a new user and then setup some security.
- New User
# login first
sudo adduser zymawy
# Create password
# Skip extra field
# Set Y to save the new user
OlderNewer