Skip to content

Instantly share code, notes, and snippets.

@orlov0562
orlov0562 / vk_emojify.php
Created April 2, 2020 07:57 — forked from nokimaro/vk_emojify.php
replace unicode emoji with img src
<?php
function vk_emojify($string)
{
$emoji_list = array('๐Ÿ˜','๐Ÿ˜‚','๐Ÿ˜ƒ','๐Ÿ˜„','๐Ÿ˜…','๐Ÿ˜†','๐Ÿ˜‰','๐Ÿ˜Š','๐Ÿ˜‹','๐Ÿ˜Œ','๐Ÿ˜','๐Ÿ˜','๐Ÿ˜’','๐Ÿ˜“','๐Ÿ˜”','๐Ÿ˜–','๐Ÿ˜˜','๐Ÿ˜š','๐Ÿ˜œ','๐Ÿ˜','๐Ÿ˜ž','๐Ÿ˜ ','๐Ÿ˜ก','๐Ÿ˜ข','๐Ÿ˜ฃ','๐Ÿ˜ค','๐Ÿ˜ฅ','๐Ÿ˜จ','๐Ÿ˜ฉ','๐Ÿ˜ช','๐Ÿ˜ซ','๐Ÿ˜ญ','๐Ÿ˜ฐ','๐Ÿ˜ฑ','๐Ÿ˜ฒ','๐Ÿ˜ณ','๐Ÿ˜ต','๐Ÿ˜ท','๐Ÿ˜ธ','๐Ÿ˜น','๐Ÿ˜บ','๐Ÿ˜ป','๐Ÿ˜ผ','๐Ÿ˜ฝ','๐Ÿ˜พ','๐Ÿ˜ฟ','๐Ÿ™€','๐Ÿ™…','๐Ÿ™†','๐Ÿ™‡','๐Ÿ™ˆ','๐Ÿ™‰','๐Ÿ™Š','๐Ÿ™‹','๐Ÿ™Œ','๐Ÿ™','๐Ÿ™Ž','๐Ÿ™','๐Ÿš€','๐Ÿšƒ','๐Ÿš„','๐Ÿš…','๐Ÿš‡','๐Ÿš‰','๐ŸšŒ','๐Ÿš','๐Ÿš‘','๐Ÿš’','๐Ÿš“','๐Ÿš•','๐Ÿš—','๐Ÿš™','๐Ÿšš','๐Ÿšข','๐Ÿšค','๐Ÿšฅ','๐Ÿšง','๐Ÿšจ','๐Ÿšฉ','๐Ÿšช','๐Ÿšซ','๐Ÿšฌ','๐Ÿšญ','๐Ÿšฒ','๐Ÿšถ','๐Ÿšน','๐Ÿšบ','๐Ÿšป','๐Ÿšผ','๐Ÿšฝ','๐Ÿšพ','๐Ÿ›€','๐Ÿ…ฐ','๐Ÿ…ฑ','๐Ÿ…พ','๐Ÿ…ฟ','๐Ÿ†Ž','๐Ÿ†‘','๐Ÿ†’','๐Ÿ†“','๐Ÿ†”','๐Ÿ†•','๐Ÿ†–','๐Ÿ†—','๐Ÿ†˜','๐Ÿ†™','๐Ÿ†š','๐Ÿˆ','๐Ÿˆ‚','๐Ÿˆš','๐Ÿˆฏ','๐Ÿˆฒ','๐Ÿˆณ','๐Ÿˆด','๐Ÿˆต','๐Ÿˆถ','๐Ÿˆท','๐Ÿˆธ','๐Ÿˆน','๐Ÿˆบ','๐Ÿ‰','๐Ÿ‰‘','๐Ÿ€„','๐Ÿƒ','๐ŸŒ€','๐ŸŒ','๐ŸŒ‚','๐ŸŒƒ','๐ŸŒ„','๐ŸŒ…','๐ŸŒ†','๐ŸŒ‡','๐ŸŒˆ','๐ŸŒ‰','๐ŸŒŠ','๐ŸŒ‹','๐ŸŒŒ','๐ŸŒ','๐ŸŒ‘','๐ŸŒ“','๐ŸŒ”','๐ŸŒ•','๐ŸŒ™','๐ŸŒ›','๐ŸŒŸ','๐ŸŒ ','๐ŸŒฐ','๐ŸŒฑ','๐ŸŒด','๐ŸŒต','๐ŸŒท','๐ŸŒธ','๐ŸŒน','๐ŸŒบ','๐ŸŒป','๐ŸŒผ','๐ŸŒฝ','๐ŸŒพ','๐ŸŒฟ','๐Ÿ€','๐Ÿ','๐Ÿ‚','๐Ÿƒ','๐Ÿ„','๐Ÿ…','๐Ÿ†','๐Ÿ‡','๐Ÿˆ','๐Ÿ‰','๐ŸŠ','๐ŸŒ','๐Ÿ','๐ŸŽ','๐Ÿ','๐Ÿ‘','๐Ÿ’','๐Ÿ“','๐Ÿ”','๐Ÿ•','๐Ÿ–','๐Ÿ—','๐Ÿ˜','๐Ÿ™','๐Ÿš','๐Ÿ›','๐Ÿœ','๐Ÿ','๐Ÿž','๐ŸŸ','๐Ÿ ','๐Ÿก','๐Ÿข','๐Ÿฃ','๐Ÿค','๐Ÿฅ','๐Ÿฆ','๐Ÿง','๐Ÿจ','๐Ÿฉ','๐Ÿช','๐Ÿซ','๐Ÿฌ','๐Ÿญ','๐Ÿฎ','๐Ÿฏ','๐Ÿฐ','๐Ÿฑ','๐Ÿฒ','๐Ÿณ','๐Ÿด','๐Ÿต','๐Ÿถ','๐Ÿท','๐Ÿธ','๐Ÿน','๐Ÿบ','๐Ÿป','๐ŸŽ€','๐ŸŽ','๐ŸŽ‚','๐ŸŽƒ','๐ŸŽ„','๐ŸŽ…','๐ŸŽ†','๐ŸŽ‡','๐ŸŽˆ','๐ŸŽ‰','๐ŸŽŠ','๐ŸŽ‹','๐ŸŽŒ','๐ŸŽ','๐ŸŽŽ','๐ŸŽ','๐ŸŽ','๐ŸŽ‘','๐ŸŽ’','๐ŸŽ“','๐ŸŽ ','๐ŸŽก','๐ŸŽข','๐ŸŽฃ
@orlov0562
orlov0562 / nginx-tuning.md
Created July 5, 2019 16:55 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@orlov0562
orlov0562 / insert-posts.php
Created February 7, 2018 10:02
Insert a post into WordPress from an external script
<?php
// Load WordPress
require_once 'path/to/www/wp-load.php';
require_once ABSPATH . '/wp-admin/includes/taxonomy.php';
// Set the timezone so times are calculated correctly
date_default_timezone_set('Europe/London');
// Create post
@orlov0562
orlov0562 / visor-archivos-online.md
Created October 6, 2016 12:31 — forked from rolldever/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@orlov0562
orlov0562 / Linux Static IP
Created March 3, 2016 13:58 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static