Skip to content

Instantly share code, notes, and snippets.

View manchumahara's full-sized avatar

Sabuj Kundu manchumahara

View GitHub Profile
@Sadmansamee
Sadmansamee / flutter_starter.md
Last active February 9, 2023 03:44
Flutter Starter Kits
if ( defined('CBXPHPSPREADSHEET_PLUGIN_NAME') && cbxphpspreadsheet_loadable() ) {
//Include PHPExcel
require_once( CBXPHPSPREADSHEET_ROOT_PATH . 'lib/vendor/autoload.php' ); //or use 'cbxphpspreadsheet_load();'
//now take instance
$objPHPExcel = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
//do whatever you need to do
}
@ahmed-musallam
ahmed-musallam / Circular.js
Created January 25, 2018 22:11
A simple circular javascript data structure (backed by an array)
/**
* A simple circular data structure
*/
function Circular(arr, startIntex){
this.arr = arr;
this.currentIndex = startIntex || 0;
}
Circular.prototype.next = function(){
var i = this.currentIndex, arr = this.arr;
@sarvar
sarvar / index.html
Created November 13, 2017 18:27
Sticky Bootstrap navbar on scroll for Bootstrap 4
<nav class="navbar" data-toggle="sticky-onscroll">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="http://bootbites.com">BootBites.com</a>
</div>
</div>
</nav>
@EmranAhmed
EmranAhmed / functions.php
Last active June 8, 2023 20:34
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>';
@siamkreative
siamkreative / editorEmptyCheck.js
Created March 28, 2016 03:42
Check if a TinyMCE editor is empty in WordPress
jQuery(document).ready(function ($) {
// Check if TinyMCE is active
if (typeof tinyMCE != "undefined") {
$('form').on('submit', function () {
// Get content of active editor
var editorContent = tinyMCE.activeEditor.getContent();
if ((editorContent === '' || editorContent === null)) {
// Do stuff when TinyMCE is empty
}
@LeaVerou
LeaVerou / dabblet.css
Last active December 9, 2017 13:40
Pure CSS, accessible like button (inspired by Medium)
/**
* Pure CSS, accessible like button (inspired by Medium)
*/
.like {
position: absolute;
clip: rect(0,0,0,0);
}
.like + label {
@iamMonzurul
iamMonzurul / font-awesome-icons-array-4-3-0.php
Last active August 29, 2015 14:16
Font Awesome Icons Array which could be used in wordpress theme or plugin options
<?php
/**
* Font Awesome Icons Array (4.3.0)
* @author Monzurul Haque
* @author_uri https://github.com/farukham
**/
$icons_arr = array(
__("None", "fifothemes") => "none",
__("Adjust", "fifothemes") => "fa-adjust",