Skip to content

Instantly share code, notes, and snippets.

View mayeenulislam's full-sized avatar
🤖
AI won't replace you

Mayeenul Islam mayeenulislam

🤖
AI won't replace you
View GitHub Profile
@obiPlabon
obiPlabon / do-shortcode-callback.php
Created March 8, 2021 09:56
Call a shortcode function by tag name
<?php
/**
* Call a shortcode function by tag name.
*
* @param string $tag The shortcode whose function to call.
* @param array $atts The attributes to pass to the shortcode function. Optional.
* @param array $content The shortcode's content. Default is null (none).
*
* @return string|bool False on failure, the result of the shortcode on success.
*/
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 30, 2024 12:19
crack activate Office on mac with license file
@nepsilon
nepsilon / how-and-why-to-sign-your-commits-with-gpg.md
Last active June 30, 2017 22:21
How and why to sign your commits with GPG? — First published in fullweb.io issue #105

How and why to sign your commits with GPG?

When a team signs their commits, it’s easy to verify the commits are actually from the team members.

If you don’t have a GPG key yet, generate one with gpg --gen-key. Enter the info at the prompt, and then type gpg --list-secret-keys --keyid-format LONG to view your key info. At the line starting with sec, the string between the / and the space is your PUBLIC_KEY_ID. Note it down, and add run the following command to instruct git to use it:

git config user.signingkey PUBLIC_KEY_ID
git config gpg.program gpg
git config commit.gpgsign true
@nepsilon
nepsilon / how-to-secure-your-site-with-https.md
Last active August 9, 2018 11:19
How to secure your site with HTTPS? — First published in fullweb.io issue #101

How to secure your site with HTTPS?

With HTTP everything is visible when traveling on the Internet. By generating an SSL certificate and configuring your webserver you can force browsers to use HTTPS. Here is how to proceed:

# 1. Install letsencrypt
sudo pip install letsencrypt
@croxton
croxton / SSL-certs-OSX.md
Last active March 3, 2024 18:58 — forked from leevigraham/Generate ssl certificates with Subject Alt Names on OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@squarestar
squarestar / install-wp-plugins.php
Last active April 20, 2024 08:02
Programmatically install and activate wordpress plugins
<?php
/**
* Programmatically install and activate wordpress plugins
*
* Usage:
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the
* plugins you want to install and activate
* 2. Upload this file to the wordpress root directory (the same directory that contains the
* 'wp-admin' directory).
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed
@nepsilon
nepsilon / 5-ways-to-check-if-a-string-contains-a-substring-in-avascript.md
Last active May 28, 2024 22:27
5 ways to check if a string contains a substring in Javascript — First published in fullweb.io issue #89

5 ways to check if a string contains a substring in Javascript

1. ES6 .includes():

var S = "fullweb";
S.includes("web");

2. RegExp .search():

@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@prionkor
prionkor / Company_Validator.php
Created June 9, 2015 18:52
Company Validator
<?php
namespace Numstock\Controllers;
use Numstock\Models\Company_Query;
class Company_Validator extends General_Validator{
public function __construct(Company_Query $query){
$this->query = $query;