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 | |
/** | |
* Available Font Awesome icons | |
* | |
* Get all icons from a font-awesome.css file and list in json mode | |
* | |
* @author Alessandro Gubitosi <gubi.ale@iod.io> | |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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 | |
// The function to count words in Unicode strings | |
function count_unicode_words( $unicode_string ){ | |
// First remove all the punctuation marks & digits | |
$unicode_string = preg_replace('/[[:punct:][:digit:]]/', '', $unicode_string); | |
// Now replace all the whitespaces (tabs, new lines, multiple spaces) by single space | |
$unicode_string = preg_replace('/[[:space:]]/', ' ', $unicode_string); | |
// The words are now separated by single spaces and can be splitted to an array | |
// I have included \n\r\t here as well, but only space will also suffice | |
$words_array = preg_split( "/[\n\r\t ]+/", $unicode_string, 0, PREG_SPLIT_NO_EMPTY ); |
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
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |