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 TemplateEngine = function(html, options) { | |
var re = /<%([^%>]+)?%>/g, | |
reExp = /(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g, | |
code = 'var r=[];\n', | |
cursor = 0, | |
add = function(line, js) { | |
js? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') : | |
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : ''); | |
return add; | |
}; |
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 | |
/** | |
* A Compatibility library with PHP 5.5's simplified password hashing API. | |
* | |
* @author Anthony Ferrara <ircmaxell@php.net> | |
* @license http://www.opensource.org/licenses/mit-license.html MIT License | |
* @copyright 2012 The Authors | |
*/ | |
if (!defined('PASSWORD_DEFAULT')) { |
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
/** | |
<style> | |
.var-test:before { | |
content: 'hello'; | |
} | |
</style> |
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 | |
function fuzzy_search($search, $text, $distance = 3){ | |
$needles = explode(' ', mb_strtolower($search, 'UTF-8')); | |
$tokens = explode(' ', mb_strtolower($text, 'UTF-8')); | |
$score = 0; | |
$levenshtein_utf8 = function ($s1, $s2) { | |
$map = []; |
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
/* | |
* LetterAvatar | |
* | |
* Create Letter avatar based on Initials - | |
* based on https://gist.github.com/leecrossley/6027780 | |
*/ | |
(function(w, d){ | |
function LetterAvatar (name, size) { |
OlderNewer