Skip to content

Instantly share code, notes, and snippets.

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

Dilwoar Hussain DilwoarH

👨‍💻
Coding
View GitHub Profile
.govuk-link{font-family:"GDS Transport",arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;text-decoration-thickness:max(1px, .0625rem);text-underline-offset:.1em}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:"GDS Transport";font-style:normal;font-weight:normal;src:url(https://www.gov.uk/assets/static/light-94a07e06a1-v2-01565b0034e61d4609689bbb7ae0be844701f3812c8fe029fa1659b7ef3aa94f.woff2) format("woff2"),url(https://www.gov.uk/assets/static/light-f591b13f7d-v2-369b1da7f442cafca0e8ac0faf1bb64df8170f9c3c7015da1195c8529df5837e.woff) format("woff");font-display:fallback}@font-face{font-family:"GDS Transport";font-style:normal;font-weight:bold;src:url(https://www.gov.uk/assets/static/bold-b542beb274-v2-35bf540bb39615b6a517986f3aa83f7fefa1efd1878603eeeb196488078542d1.woff2) format("woff2"),url(http
@DilwoarH
DilwoarH / LaravelBuild.sh
Last active October 3, 2021 10:55
LaravelBuild.sh
docker info > /dev/null 2>&1
# Ensure that Docker is running...
if [ $? -ne 0 ]; then
echo "Docker is not running."
exit 1
fi
docker run --rm \
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4143.7 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36",
"benchmarkIndex": 1137,
"credits": {
"axe-core": "3.5.5"
}
},
@DilwoarH
DilwoarH / Prayer times App script.js
Last active July 23, 2021 21:19
Prayer times App script
function doGet(e){
if (!e.parameter["google_sheet_id"]) {
var error = JSON.stringify({
"error": "google_sheet_id parameter is required"
});
return ContentService.createTextOutput(error).setMimeType(ContentService.MimeType.JSON);
}
// Change Spread Sheet url
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 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_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36",
"benchmarkIndex": 1281
},
"lighthouseVersion": "5.7.0",
"fetchTime": "2020-04-28T11:07:26.066Z",
"requestedUrl": "https://www.islamiclandmarks.com/",
@DilwoarH
DilwoarH / mocha_test.js
Created December 6, 2019 11:56
Template for mocha test
const Mocha = require("mocha");
const assert = require("assert");
const mocha = new Mocha();
describe("Something", () => {
it("does something", () => {
assert.equal(1, 1);
});
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@edusensys.com
Redirect 301 / https://www.example.com
DocumentRoot /var/www/example.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule ^/(.*) https://www.example.com/$1 [L,R]
# Lets Encrypt - https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot python-certbot-apache -y
sudo certbot certonly --apache
# enable ssl
<VirtualHost *:80>
ServerAdmin webmaster@example.com
Redirect 301 / https://www.example.com
DocumentRoot /var/www/example.com
</VirtualHost>
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule ^/(.*) https://www.example.com/$1 [L,R]
ServerAdmin webmaster@example.com
DocumentRoot /var/www/example.com
<Directory "/var/www/example.com">
Options Indexes FollowSymLinks