I hereby claim:
- I am defite on github.
- I am defite (https://keybase.io/defite) on keybase.
- I have a public key whose fingerprint is 3D0F 94ED CE43 3998 15E8 21FF DF37 CB6F 407B C202
To claim this, I am signing this object:
/** | |
* Split a string into chunks of the given size | |
* @param {String} string is the String to split | |
* @param {Number} size is the size you of the cuts | |
* @return {Array} an Array with the strings | |
*/ | |
function splitString (string, size) { | |
var re = new RegExp('.{1,' + size + '}', 'g'); | |
return string.match(re); | |
} |
// ### Content Helper | |
// | |
// *Usage example:* | |
// `{{content}}` | |
// `{{content words="20"}}` | |
// `{{content characters="256"}}` | |
// `{{content preview="true"}}` | |
// | |
// Turns content html into a safestring so that the user doesn't have to | |
// escape it or tell handlebars to leave it alone with a triple-brace. |
/* | |
Adaption of Hexo's hexo\node_modules\hexo-util\lib\util\highlight.js | |
original code highlighter uses <figure> and <table>s as gutter. Had some validation issues. Also did not accept | |
standard higlightjs themes (https://github.com/isagalaev/highlight.js/tree/master/src/styles) which are now | |
just drop in. | |
captions still require a tiny bit of css of your own because they're not standard in highlightjs. | |
I'm accompanying this by a tiny JS that adds .hljs to every pre tag that doesn't contain it, so it applies to |
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
/* Comment */ | |
.highlight .err { | |
color: #960050; | |
background-color: #1e0010; | |
} | |
/* Error */ | |
.highlight .k { | |
color: #66d9ef; | |
} |
digitHelper: function(digit) { | |
return digit.toString().replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 '); | |
} |
/* Методы jQuery .bind(), .live(), и .delegate() пишутся с использованием введеного в jQuery 1.7 метода .on() */ | |
// Bind | |
$( "#members li a" ).on( "click", function( e ) {} ); | |
$( "#members li a" ).bind( "click", function( e ) {} ); | |
// Live | |
$( document ).on( "click", "#members li a", function( e ) {} ); | |
$( "#members li a" ).live( "click", function( e ) {} ); |
<div class="accordion" id="accordion2"> | |
<?php | |
//get all children of category "General", then display posts in each cat | |
$taxonomy = 'category'; | |
$param_type = 'category__in'; | |
$cat_id = get_cat_ID('General'); | |
$term_args=array( | |
'orderby' => 'name', | |
'order' => 'ASC', |
<style> | |
.b-map-popup { | |
position: relative; | |
background: #fefefe; | |
border: 1px solid #fefefe; | |
-webkit-border-radius:4px; | |
border-radius:4px; | |
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3); | |
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3); | |
z-index:100; |