Skip to content

Instantly share code, notes, and snippets.

Avatar

Wasseem Khayrattee 7php

View GitHub Profile
View What is server_names_hash_bucket_size.md

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@7php
7php / varnish.service
Created May 13, 2020 — forked from ThijsFeryn/varnish.service
varnish systemd service
View varnish.service
[Unit]
Description=Varnish Cache Plus, a high-performance HTTP accelerator
After=network-online.target
[Service]
Type=forking
KillMode=process
# Maximum number of open files (for ulimit -n)
LimitNOFILE=131072
@7php
7php / keybase.md
Created Aug 12, 2019
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am 7php on github.
  • I am khayrattee (https://keybase.io/khayrattee) on keybase.
  • I have a public key ASCTUUyLA7B8jUihjxq1h0GhxvF4DRmmaGFBicaNjYGPowo

To claim this, I am signing this object:

@7php
7php / APACHE_content-security-policy.conf
Last active Apr 18, 2017
APACHE to NGINX | content-security-policy.conf
View APACHE_content-security-policy.conf
# REF: https://github.com/h5bp/server-configs-apache/blob/master/src/security/content-security-policy.conf
<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
Header unset Content-Security-Policy
</FilesMatch>
</IfModule>
View LIST OF ISO COUNTRIES
--
-- Table structure for table `country_t`
--
CREATE TABLE IF NOT EXISTS `country_t` (
`country_id` int(5) NOT NULL AUTO_INCREMENT,
`iso2` char(2) DEFAULT NULL,
`short_name` varchar(80) NOT NULL DEFAULT '',
`long_name` varchar(80) NOT NULL DEFAULT '',
`iso3` char(3) DEFAULT NULL,
@7php
7php / TheBadCode
Last active Dec 28, 2015
Wrongly Positioning a 'Return' Statement Inside An Inner 'Finally' Block Can Be Lethal
View TheBadCode
<?php
/**
* To demonstrate the effect of a return in a finally
*
* @author Khayrattee Wasseem <wasseem@khayrattee.com>
* @link http://7php.com (blog)
* @link http://Khayrattee.com (website)
* @copyright 2007-2015 Khayrattee.com
*/
@7php
7php / gist:c18a78e11bb8d14f3fd2
Last active Aug 29, 2015
7PHP Temptative Interview for #20yearsofphp
View gist:c18a78e11bb8d14f3fd2
>> The first PHP Person that you met & that probably played a vital part in your PHP life
>> If you look back at the previous 20yrs, what is the one lesson that you've learned:
- by using PHP as a language
- by sticking to PHP as a community
>> One reason why PHP has survived and even transcend itself into success since the last 20yrs
>> Your message to New PHPers who will join us now looking forward for the next 20yrs
@7php
7php / gist:5161f607ac116cddeb5f
Last active Aug 29, 2015
Composer Hanging after extracting symfony/http-kernel (v2.7.0)
View gist:5161f607ac116cddeb5f
root@e2c2b31affb9:/var/www/khayrattee/sample_project# composer.phar -o -vvv update -v
Reading ./composer.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Executing command (CWD): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
You can’t perform that action at this time.