Skip to content

Instantly share code, notes, and snippets.

View Jimmea's full-sized avatar

Hungokata Jimmea

  • Vnp group
  • Hà Nội
View GitHub Profile
@Jimmea
Jimmea / keywordsbyurl.php
Created June 29, 2020 06:37 — forked from stefanocudini/keywordsbyurl.php
php keywords generator by url page
<?
//inspired by: http://nadeausoftware.com/articles/2008/04/php_tip_how_extract_keywords_web_page
function keywordsByUrl($url, $minwordlen = 4, $minwordnum = 3, $maxwords = 10)
{
$text = strip_html_tags(file_get_contents($url));
$text = html_entity_decode($text, ENT_QUOTES, "utf-8");
$text = strip_punctuation($text);
$text = strip_symbols($text);
# /etc/nginx/nginxconfig.io/general.conf
# favicon.ico
location = /favicon.ico {
log_not_found off;
access_log off;
}
# robots.txt
location = /robots.txt {
# File: /etc/nginx/nginxconfig.io/php_fastcgi.conf
# 404
try_files $fastcgi_script_name =404;
# default fastcgi_params
include fastcgi_params;
# fastcgi settings
docker network create elasticsearch-kibana
docker run \
--name elasticsearch_container \
--network elasticsearch-kibana \
--publish 9200:9200 \
--publish 9300:9300 \
--env "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch:7.6.2
docker network create elasticsearch-kibana
docker run \
--name elastic_container \
--network elasticsearch-kibana \
--publish 9200:9200 \
--publish 9300:9300 \
--env "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch:6.4.2
docker network create elasticsearch-kibana
docker run \
--name elastic_container \
--network elasticsearch-kibana \
--publish 9200:9200 \
--publish 9300:9300 \
--env "discovery.type=single-node" \
docker.elastic.co/elasticsearch/elasticsearch:6.4.2
@Jimmea
Jimmea / nginx.default.conf
Created March 29, 2020 16:02 — forked from ArunMichaelDsouza/nginx.default.conf
Default NGINX Configuration
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class