Skip to content

Instantly share code, notes, and snippets.

View Hello1nside's full-sized avatar
🎯
Focusing

Yevhenii Mudrahel Hello1nside

🎯
Focusing
View GitHub Profile
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Service",
"serviceType": "Medical Center",
"url" : "https://www.almariffamc.com/",
"provider": {
"@type": "LocalBusiness",
"name": "Al Mariffa Medical Center",
"telephone" : "+971402522133",
When git commit gives this error:
error: insufficient permission for adding an object to repository database .git/objects
take back ownership of all Git objects by runnning:
cd <path-to-repo>
cd .git/objects
sudo chown -R <username>:<username> *
@Hello1nside
Hello1nside / Laravel PHP7 LEMP AWS.md
Created April 8, 2018 12:01 — 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
@Hello1nside
Hello1nside / install phpmyadmin alogn with laravel
Created April 8, 2018 12:00
install phpmyadmin along with laravel, add the following lines in the server section
location /phpmyadmin {
root /usr/share/;
index index.php;
try_files $uri $uri/ =404;
location ~ ^/phpmyadmin/(doc|sql|setup)/ {
deny all;
}
location ~ /phpmyadmin/(.+.php)$ {
add_filter('robots_txt', 'addToRoboText');
function addToRoboText($robotext) {
$additions = "
User-agent: *
Disallow: /wp-admin/
";
return $robotext . $additions;
}
<script type="application/ld+json">
{ "@context" : "http://schema.org",
"@type" : "Organization",
"legalName" : "Elite SEM",
"url" : "http://elitesem.com/",
"contactPoint" : [{
"@type" : "ContactPoint",
"telephone" : "+1-646-350-2789",
"contactType" : "customer service"
}],
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>
Joomla title - index.php
$this->setTitle('new title');
--------------------- change title separator from "-" to "|" ------------------------------
<?php
$conf = JFactory::getConfig();
$pagetitles = $conf->get('sitename_pagetitles');
if ($pagetitles) {
$sitename = $conf->get('sitename');
@Hello1nside
Hello1nside / file.php
Created October 3, 2017 11:58
create wp admin
1) Create user in - wp_users TABLE
2) table wp_usermeta -
ADD
wp_user_level - 10;
wp_capabilities - a:1:{s:13:"administrator";b:1;}
@Hello1nside
Hello1nside / .htaccess
Created October 3, 2017 11:58
REDIRECTS
RewriteEngine On
*************** REMOVE LAST SLASH FROM URL *******
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ /$1 [R=302,NE,L]
*************** REDIRECT FROM DOUBLE SLASH // TO SINGLE /
RewriteCond %{THE_REQUEST} //