This file contains 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
const http = require("http"), | |
fs = require("fs"), | |
path = require("path"), | |
log = console.log; | |
//this will response with file type with specifiq content and encode | |
function response(res, file, contentType, encode) { | |
if (file != "404") { | |
res.writeHead(200, { "Content-type": contentType }); | |
if (encode) { |
This file contains 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
$headers = ‘MIME-Version: 1.0′ . “\r\n”; | |
$headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”; | |
$headers .= ‘From: [email protected]’ . “\r\n”; | |
mail(“[email protected]”,”test subject”,”test body”,$headers); |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading | |
# slashes. | |
# If your page resides at | |
# http://www.example.com/mypage/test1 | |
# then use | |
# RewriteBase /mypage/test1/ | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f |
This file contains 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 function is reponsible for rest the database. | |
* take two parameter first is array for connection to the database | |
* It will like ["hostname","dbuser","dbpass","dbname"] | |
* Secound argument for the reset db file location. | |
* first establish the connection , and then tranclate all table, | |
* Then read the content form the database file, | |
* insert all db file content using multiquery |
This file contains 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
define( 'SHORTINIT', true ); | |
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; | |
$url = $_SERVER['REQUEST_URI']; | |
$my_url = explode('wp-content' , $url); | |
$path = $_SERVER['DOCUMENT_ROOT']."/".$my_url[0]; |
This file contains 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 seoUrl($string) { | |
//first trim everyting... :) | |
$string = trim($string); | |
//Lower case everything | |
$string = strtolower($string); | |
//Make alphanumeric (removes all other characters) | |
$string = preg_replace("/[^a-z0-9_\s-]/", "", $string); | |
//Clean up multiple dashes or whitespaces | |
$string = preg_replace("/[\s-]+/", " ", $string); | |
//Convert whitespaces and underscore to dash |
This file contains 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
var COMMENT_PSEUDO_COMMENT_OR_LT_BANG = new RegExp( | |
'<!--[\\s\\S]*?(?:-->)?' | |
+ '<!---+>?' // A comment with no body | |
+ '|<!(?![dD][oO][cC][tT][yY][pP][eE]|\\[CDATA\\[)[^>]*>?' | |
+ '|<[?][^>]*>?', // A pseudo-comment | |
'g'); |
This file contains 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
Show hidden characters
{ | |
"disable_formatted_linebreak": true, | |
"snippets": { | |
"html": { | |
"abbreviations": { | |
"template": "!!!+html>(head>meta:utf+meta:compat+meta:vp+title${title}+link:css)+body>script:src", | |
"bs-nav": "nav#$.navbar.navbar-default>.container-fluid>(.navbar-header>a[href='#'].navbar-brand{BrandName})+ul.nav.navbar-nav>li*6>a[href='#']", | |
"bs-dropdown": ".dropdown>(button.btn.btn-primary.dropdown-toggle[type='button' data-toggle='dropdown']{Dropdown}>span.caret)+ul.dropdown-menu>li*4>a[href='#']{Menu Item}", | |
"bs-accordion": ".panel-group#accordion>(.panel.panel-default>(.panel-heading>.panel-title>a[data-toggle='collapse' data-parent='#accordion' href='#collapse$'])+#collapse$.panel-collapse.collapse>.panel-body>lorem10)*3", |
This file contains 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
Raw Javascript library: | |
http://youmightnotneedjqueryplugins.com/ | |
CSS Browser Selector | |
https://raw.githubusercontent.com/rafaelp/css_browser_selector/master/css_browser_selector.js | |
https://mx.nybsys.com.bd/?loginOp=logout | |
[email protected] |
This file contains 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
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/CVS": true, | |
"**/.DS_Store": true, | |
// root level folder exclue | |
"node_modules": true, | |
".vscode": true, |
OlderNewer