Skip to content

Instantly share code, notes, and snippets.

View zymawy's full-sized avatar
🐛
Debugging

Hamza Ironside zymawy

🐛
Debugging
View GitHub Profile
@zymawy
zymawy / PHP Countries Array
Created March 4, 2017 20:50 — forked from DHS/PHP Countries Array
PHP array of all country names
<?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
@zymawy
zymawy / word_country_data.sql
Created March 5, 2017 16:51 — forked from jaconza/word_country_data.sql
MySQL script for creation and population of country, city and countryLanguage tables with the most popular cities and countries already inserted.
-- 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 */;
@zymawy
zymawy / !NOTE.md
Created January 8, 2018 02:39 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
@zymawy
zymawy / Laravel PHP7 LEMP AWS.md
Last active July 8, 2018 10:28 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#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.

Install PHP 7 on Ubuntu

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
@zymawy
zymawy / web.php
Last active April 7, 2018 13:53
Listen for illuminate queries
// routes web.php
\Event::listen('illuminate.query', function($sql) {
var_dump($sql);
\Log::info($sql);
});
@zymawy
zymawy / ForgotPasswordController.php
Created June 18, 2018 11:37 — forked from nasrulhazim/ForgotPasswordController.php
Reset and Update Password from API
<?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;
'<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>' +
@zymawy
zymawy / allTheSchoolNamesOnMakkehRegion.json
Last active September 12, 2018 02:46
جميع اسماء مدارس منطقة مكة المكرمة
Array[6329][
{
"Id": 2,
"ArabicName": "معهد الحرم المكي الشريف - بنين",
"EnglishName": "معهد الحرم المكي الشريف - بنين",
"SchoolCode": "00001",
"RegionName": "مكة المكرمة",
"CityName": "مكة المكرمة"
},
{
@zymawy
zymawy / UsersIndex.vue
Created November 24, 2018 09:14 — forked from paulredmond/UsersIndex.vue
UsersIndex component for use with vue-router - https://laravel-news.com/building-vue-spa-laravel-part-3
<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 }}
@zymawy
zymawy / addUserToSever.md
Last active November 29, 2018 10:22
Create a User On The Server

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