Skip to content

Instantly share code, notes, and snippets.

View Kirun1's full-sized avatar

Kirunda Brian Kirun1

View GitHub Profile
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'new-multisite-setup.dev');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
@Kirun1
Kirun1 / Ajaxify your WordPress comments
Created July 3, 2021 14:58 — forked from jayseventwo/Ajaxify your WordPress comments
Ajaxify your WordPress comments - no more submitting to a new page.
/* ------------------------------------------------------------------ajax comments - add to functions.php ------- */
add_action('comment_post', 'ajaxify_comments',20, 2);
function ajaxify_comments($comment_ID, $comment_status){
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
switch($comment_status){
case "0":
wp_notify_moderator($comment_ID);
case "1": //Approved comment
echo "success";
@Kirun1
Kirun1 / README.md
Created November 20, 2018 07:03 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@Kirun1
Kirun1 / countries.html
Created June 20, 2018 14:36 — forked from soul-wish/countries.html
HTML Select List Of Countries (english and russian versions, sorted by alphabet)
<select name="countries">
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
@Kirun1
Kirun1 / index.html
Created June 19, 2018 07:06 — forked from johan/index.html
HTML5 GPS tracker
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 GPS</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="style.css">
</head>
# Atom Cheatsheet.
# Project Key Bindings.
- 'cmd-shift-p': open the command palette.
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file.
- 'cmd-b': look for a file that is already open.
- 'cmd-shift-b': search the list of files modified and untracked in your project repository.
- 'ctrl-0': open and focus the the tree view.
/* *******************************************************************************************
* GLOBAL OBJECTS > ARRAY
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
* ******************************************************************************************* */
// Global object: properties
Array.length // Reflects the number of elements in an array
// Global object: methods
@Kirun1
Kirun1 / nodejs-cheatsheet.js
Created June 12, 2018 06:41 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Guest List"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
@Kirun1
Kirun1 / .block
Created April 11, 2018 14:45 — forked from mbostock/.block
Rainbow Perceptual Distance
license: gpl-3.0