Skip to content

Instantly share code, notes, and snippets.

View nurul-umbhiya's full-sized avatar
🎯
Focusing

Nurul Umbhiya nurul-umbhiya

🎯
Focusing
View GitHub Profile
"use strict";
/* A version number is useful when updating the worker logic,
allowing you to remove outdated cache entries during the update.
*/
var version = 'v1::';
/* These resources will be downloaded and cached by the service worker
during the installation process. If any resource fails to be downloaded,
then the service worker won't be installed either.
{
"short_name": "madewithlove",
"name": "madewithlove",
"icons": [
{
"src": "img/launcher-icon@2x.png",
"sizes": "96x96",
"type": "image/png"
},
{
@nurul-umbhiya
nurul-umbhiya / sql_import.php
Created January 24, 2017 20:47 — forked from b4oshany/sql_import.php
PHP PDO sql file import.
<?php
namespace libs\mysql;
class PDODbImporter{
private static $keywords = array(
'ALTER', 'CREATE', 'DELETE', 'DROP', 'INSERT',
'REPLACE', 'SELECT', 'SET', 'TRUNCATE', 'UPDATE', 'USE',
'DELIMITER', 'END'
);
@nurul-umbhiya
nurul-umbhiya / php-wp-add-tinymce-button.php
Created June 3, 2016 15:08 — forked from rxnlabs/php-wp-add-tinymce-button.php
WordPress - Add button to TinyMCE editor in WordPress. Great for creating menus so users can add shortcodes without having to remember the syntax
<?php
/*Add this code to your functions.php file of current theme OR plugin file if you're making a plugin*/
//add the button to the tinymce editor
add_action('media_buttons_context','add_my_tinymce_media_button');
function add_my_tinymce_media_button($context){
return $context.=__("
<a href=\"#TB_inline?width=480&inlineId=my_shortcode_popup&width=640&height=513\" class=\"button thickbox\" id=\"my_shortcode_popup_button\" title=\"Add My Shortcode\">Add My Shortcode</a>");
}