Skip to content

Instantly share code, notes, and snippets.

View DilwoarH's full-sized avatar
👨‍💻
Coding

Dilwoar Hussain DilwoarH

👨‍💻
Coding
View GitHub Profile
@DilwoarH
DilwoarH / Laravel PHP7 LEMP AWS.md
Created February 11, 2018 15:41 — 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
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install apache2 -y
sudo apt install composer -y
sudo apt-get install nodejs -y
sudo apt-get install npm -y
sudo apt install nodejs-legacy
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/71.0.3559.0 Mobile Safari/537.36",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
"benchmarkIndex": 1237.5249500998004
},
"lighthouseVersion": "3.2.0",
"fetchTime": "2019-01-31T12:23:20.661Z",
"requestedUrl": "https://bangladesh.gov.bd/index.php",
@DilwoarH
DilwoarH / hello_world.py
Last active May 1, 2019 13:51
Hello World Examples Dilwoar
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
@DilwoarH
DilwoarH / app_config.json
Last active May 2, 2019 15:38
ELM Prayer Times
{"Logo_URL":"https://raw.githubusercontent.com/DilwoarH/Mosque-Screen/master/src/_components/logo/assets/ELM-logo-notext-white.gif","primary_colour":"#52071e","secondary_colour":"#380412","primary_text_colour":"#fff","secondary_text_colour":"#e4e4e4","clock_background_colour":"#fff","sliderTimeout":"8000","Text_Donate_Message":"<p class='top'><i>You can donate by texting</i></p>\n<p class='middle'>ELMT12 &pound;5 to 70070</p>\n<p class='bottom'><i>or &pound;1, &pound;2, &pound;3, &pound;4 or &pound;10</i></p>","Alternative_Donate_Message":"<p><i>You can donate by</i></p>\n<p><i>contactless</i></p>\n<p><i>cards and phones</i></p>","Mobile_Use_Notification":"<p><i>Please ensure your</i></p>\n<p><i>mobile phone is silent</i></p>\n<p><i>in the prayer hall</i></p>","Jummah_slot_1_label":"Khutbah","Jummah_slot_1_winter":"12:30","Jummah_slot_1_summer":"1:15","Jummah_slot_2_label":"Jammah","Jummah_slot_2_winter":"1:00","Jummah_slot_2_summer":"1:45","blackOutPeriod_fajr":"10","blackOutPeriod_zuhr":"10","blackOutPeriod
@DilwoarH
DilwoarH / homepage.json
Created May 7, 2019 13:30
GOV.UK lighthouse results
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/74.0.3729.131 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/74.0.3729.131 Safari/537.36","benchmarkIndex":1180},"lighthouseVersion":"4.3.1","fetchTime":"2019-05-07T13:30:48.966Z","requestedUrl":"https://gov.uk/","finalUrl":"https://www.gov.uk/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more
@DilwoarH
DilwoarH / .bash_aliases
Last active May 28, 2019 10:07
GOV.UK DEV VM
cd /var/govuk
function app {
cd /var/govuk/$1;
}
function dev-vm {
cd /var/govuk/govuk-puppet/development-vm;
}
{
"Logo_URL": "https://raw.githubusercontent.com/DilwoarH/Mosque-Screen/master/src/_components/logo/assets/ELM-logo-notext-white.gif",
"primary_colour": "#0f715d",
"secondary_colour": "#0c5a4b",
"primary_text_colour": "#fff",
"secondary_text_colour": "#e4e4e4",
"prayer_time_highlight_colour": "#ff3995",
"clock_background_colour": "#fff",
"time_format": "h:mm A",
"sliderMode": "slider",
# php & apache2
sudo apt-get -y update;
sudo apt-get install -y php libapache2-mod-php;
sudo apt-get install -y php7.2 php7.2-fpm php-mysql php7.2-mysql php-mbstring php-gettext libapache2-mod-php7.2 php-doctrine-dbal php7.2-pgsql php7.2-bcmath php-xml redis-server;
sudo systemctl restart php7.2-fpm;
# set up git
sudo apt-get install -y git curl wget;
# composer
@DilwoarH
DilwoarH / govuk_ssh_config_fish
Created September 23, 2019 13:27
ssh_config - for fish terminals
## CI
## --
Host ci-jumpbox
Hostname ci-jumpbox.integration.publishing.service.gov.uk
Host *.ci
ProxyCommand ssh -e none %r@ci-jumpbox -W (echo %h | sed 's/\.ci$//'):%p
## Integration
## -----------