Skip to content

Instantly share code, notes, and snippets.

View imhamad's full-sized avatar
💭
Equilibrium

Hamad imhamad

💭
Equilibrium
View GitHub Profile
@imhamad
imhamad / .htaccess
Last active October 27, 2023 14:02 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
#<IfModule mod_rewrite.c>
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#</IfModule>
# ----------------------------------------------------------------------
# | Activate CORS
# ----------------------------------------------------------------------
@imhamad
imhamad / disable-zoom-on-mobile.html
Created July 7, 2020 09:07 — forked from codedrops-io/disable-zoom-on-mobile.html
Disable zoom on mobile with HTML.
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
@imhamad
imhamad / slow-loading-checker.js
Created July 7, 2020 09:07 — forked from codedrops-io/slow-loading-checker.js
Check if a feature of your project is loading slow.
setTimeout(() => {
if (!HAS_LOADED_CONDITION) {
// This should be sent to your error tracking system
console.error('⚠️ Slow connection!')
}
}, 10000)
@imhamad
imhamad / themename.info.yml
Created November 5, 2020 10:41 — forked from steffenr/themename.info.yml
Embed external fonts in Drupal 8 theme (fonts are added in custom themename.libraries.yml)
name: Theme name
type: theme
description: Theme description
package: Custom
core: 8.x
libraries:
- themename/fonts
- themename/global-styling
base theme: classy
@imhamad
imhamad / index.html
Created August 25, 2021 12:49 — forked from katjad/index.html
One page JS Quiz App
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Quiz built in JS</title>
<style>
body {
font-family: Verdana, sans-serif;
font-size: 16px;
line-height: 1.6;
@imhamad
imhamad / .gitignore
Created June 2, 2022 13:09
Drupal 9 and onwards proper gitignore file structure
# Ignore IDE files from tracking
.idea
.DS_Store
# Ignore configuration files that may contain sensitive information from tracking
*/settings*.php
web/sites/*/*settings*.php
web/sites/*/*services*.yml
web/sites/*/settings*.php
web/sites/*/services*.yml
@imhamad
imhamad / index.html
Created August 13, 2022 10:39 — forked from gaearon/index.html
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@imhamad
imhamad / .gitconfig
Created December 12, 2023 12:27 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .