✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
SUPPORT MY WORK - Everything Helps Thanks
YouTube 🔗 https://YouTube.GetMeTheGeek.com
Buy Me a Coffee ☕ https://www.buymeacoffee.com/getmethegeek
Hire US 🔗 https://getmethegeek.com
Digital Ocean referral 🔗 https://tiny.cc/plxdigitalocean
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Levenshtein function | |
| -- Source: https://openquery.com.au/blog/levenshtein-mysql-stored-function | |
| -- Levenshtein reference: http://en.wikipedia.org/wiki/Levenshtein_distance | |
| -- Arjen note: because the levenshtein value is encoded in a byte array, distance cannot exceed 255; | |
| -- thus the maximum string length this implementation can handle is also limited to 255 characters. | |
| DELIMITER $$ | |
| DROP FUNCTION IF EXISTS LEVENSHTEIN $$ | |
| CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8) |
When setting these options consider the following:
- How long is your average request?
- What is the maximum number of simultaneous visitors the site(s) get?
- How much memory on average does each child process consume?
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Retrieves the thumbnail from a youtube or vimeo video | |
| * @param - $src: the url of the "player" | |
| * @return - string | |
| * @todo - do some real world testing. | |
| * | |
| **/ | |
| function get_video_thumbnail( $src ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_vimeoid( $url ) { | |
| $regex = '~ | |
| # Match Vimeo link and embed code | |
| (?:<iframe [^>]*src=")? # If iframe match up to first quote of src | |
| (?: # Group vimeo url | |
| https?:\/\/ # Either http or https | |
| (?:[\w]+\.)* # Optional subdomains | |
| vimeo\.com # Match vimeo.com | |
| (?:[\/\w:]*(?:\/videos)?)? # Optional video sub directory this handles groups links also | |
| \/ # Slash before Id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from requests.auth import HTTPBasicAuth | |
| import argparse | |
| from getpass import getpass | |
| """ | |
| @origin https://gist.github.com/cdefgah/35f127fe39b1ebf2caa2d53d675f1019#file-revokeaccesstounwantedbitbucketrepository-py | |
| @author silasrm <silasrm@gmail.com> | |
| In some cases you may want to remove yourself from a different user's private repository in bitbucket. |
#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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This class can add WSSecurity authentication support to SOAP clients | |
| * implemented with the PHP 5 SOAP extension. | |
| * | |
| * It extends the PHP 5 SOAP client support to add the necessary XML tags to | |
| * the SOAP client requests in order to authenticate on behalf of a given | |
| * user with a given password. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Split PDF file | |
| * | |
| * <p>Split all of the pages from a larger PDF files into | |
| * single-page PDF files.</p> | |
| * | |
| * @package FPDF required http://www.fpdf.org/ | |
| * @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Blink for Webkit and others | |
| (Chrome, Safari, Firefox, IE, ...) | |
| */ | |
| @-webkit-keyframes blinker { | |
| from {opacity: 1.0;} | |
| to {opacity: 0.0;} | |
| } | |
| .blink{ | |
| text-decoration: blink; |
NewerOlder