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
@mayeenulislam
mayeenulislam / how-to-disable-html-links-with-css.md
Created March 21, 2017 03:42 — forked from nepsilon/how-to-disable-html-links-with-css.md
How to disable HTML links with CSS? — First published in fullweb.io issue #92
@mayeenulislam
mayeenulislam / functions.php
Created February 7, 2017 06:38 — forked from EmranAhmed/functions.php
Hook Info. Get Action hook info. What functions are hooked to an action / filter in WordPress? How can I see all the actions attached to an "add_action" hook?
<?php
if ( ! function_exists( 'hippo_plugin_hook_info' ) ):
function hippo_plugin_hook_info( $hook_name ) {
global $wp_filter;
$docs = array();
$template = "\t - %s Priority - %s.\n\tin file %s #%s\n\n";
echo '<pre>';
@mayeenulislam
mayeenulislam / index.html
Last active November 21, 2019 04:40 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!DOCTYPE html>
<title>Site Maintenance - {{sitename}}</title>
<style>
body { text-align: center; padding: 10%; }
h1 { font-size: 50px; margin-bottom: 0; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 90%; max-width: 700px; margin: 0 auto; }
a { color: #19a15e; text-decoration: none; font-weight: bold; }
a:hover { color: #333; text-decoration: none; }
</style>
@mayeenulislam
mayeenulislam / scroll.css
Created August 4, 2016 11:51
CSS Only scroll indicator
/** Source: http://codepen.io/MadeByMike/pen/ZOrEmr | Author: Mike (http://codepen.io/MadeByMike) **/
html, body {
margin: 0;
}
header {
position: fixed;
top: 0;
height: 125px;
@mayeenulislam
mayeenulislam / liner.css
Created August 4, 2016 04:23
Display Inline horizontal rule using simple CSS flex design (Source: https://codepen.io/oaviv/pen/GqXwYp | Author: Ohad)
/** Source: https://codepen.io/oaviv/pen/GqXwYp | Author: Ohad **/
body {
padding: 50px;
background-color: #11151C;
color: #7D4E57;
line-height: 170%;
font-family: sans-serif;
}
body .container {
@mayeenulislam
mayeenulislam / Preferences.sublime-settings
Last active December 18, 2019 09:17
Collection of favourite Sublime Text 3 packages and my personal sublime settings
{
"added_words":
[
"Permalink",
"clientele"
],
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Agila Theme/Agila Light Solarized.tmTheme",
"draw_minimap_border": true,
<?php
$data_dir = 'c:/server/www/dev/data/';
$releases = [ ];
foreach ( range( 3.2, 4.0, 0.1 ) as $version ) {
$version = number_format( $version, 1 );
$data = json_decode( file_get_contents( $data_dir . $version . '.json' ), true );
$groups = wp_list_pluck( $data['groups'], 'data' );
@mayeenulislam
mayeenulislam / reset-wordpress-db-password.php
Created February 16, 2016 17:28
Change mySQL password without SQL manager or PHPmyAdmin for WordPress
<?php
/**
* Tutorial by: nanodesigns (@nanodesigns)
* URL: http://tuts.nanodesignsbd.com/change-wordpress-password-without-sql-manager/
* by: Mayeenul Islam (@mayeenulislam)
*/
//Connect to mySQL First
$connection = mysql_connect('DB_HOST','DB_USER','DB_PASSWORD');
@mayeenulislam
mayeenulislam / functions.php
Created February 16, 2016 06:59 — forked from hasinhayder/functions.php
Redirect WordPress posts to the editor if someone types /edit at the end of the permalink
<?php
function init_url_rewrite_rule(){
add_rewrite_endpoint( 'edit',EP_PERMALINK | EP_PAGES | EP_ATTACHMENT );
if(get_option("EDIT_REWRITE_RULE")!=1){
flush_rewrite_rules();
update_option("EDIT_REWRITE_RULE",1);
}
}
function redirect_edit_url(){
@mayeenulislam
mayeenulislam / show-wordpress-db-queries.php
Last active November 1, 2015 09:05
Show WordPress database queries at the footer only to the admin if WP_DEBUG is enabled
<?php
/**
* db QUERIES
* Prerequisite: define('SAVEQUERIES', true)
*/
function nano_enqueue_db_queries() {
global $wpdb;
echo '<h2>Database Last Query</h2>';
echo $wpdb->last_query;
echo '<hr>';