A Pen by Mohit Aneja on CodePen.
This file contains hidden or 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
# Private key | |
$ openssl genrsa -passout pass:{STRONG-PASSWORD} -out {PATH}/private.pem -aes256 4096 | |
# Pulbic key from the | |
$ openssl rsa -passin pass:{STRONG-PASSWORD} -pubout -in {PATH}/private.pem -out {PATH}/public.pem |
This file contains hidden or 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
.close-button { | |
position: absolute; | |
top: 0; | |
right: 0; | |
width: 48px; | |
height: 48px; | |
background: #41415B; | |
border-radius: 48px; | |
margin-top: -24px; |
This file contains hidden or 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
let typingTimer; //timer identifier | |
let doneTypingInterval = 1500; //time in ms, 5 second for example | |
let $input = $('.search-sidebar-ui-blocks'); | |
//on keyup, start the countdown | |
$input.on('keyup', function () { | |
clearTimeout(typingTimer); | |
typingTimer = setTimeout(doneTyping, doneTypingInterval); | |
}); |
This file contains hidden or 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
add_filter('author_rewrite_rules', 'no_author_base_rewrite_rules'); | |
function no_author_base_rewrite_rules($author_rewrite) { | |
global $wpdb; | |
$author_rewrite = array(); | |
$authors = $wpdb->get_results("SELECT user_nicename AS nicename from $wpdb->users"); | |
foreach($authors as $author) { | |
$author_rewrite["({$author->nicename})/page/?([0-9]+)/?$"] = 'index.php?author_name=$matches[1]&paged=$matches[2]'; | |
$author_rewrite["({$author->nicename})/?$"] = 'index.php?author_name=$matches[1]'; | |
} | |
return $author_rewrite; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
#test{ | |
background: #222; | |
color: #fff; |
A Pen by Mohit Aneja on CodePen.
This file contains hidden or 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
.directive('prettyp', function(){ | |
return function(scope, element, attrs) { | |
$("[rel^='prettyPhoto']").prettyPhoto({deeplinking: false, social_tools: false}); | |
} | |
}) |
This file contains hidden or 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 serialize(obj) { | |
var str = []; | |
for (var p in obj) { | |
if (angular.isArray(obj[p])) { | |
for (var i = 0; i < obj[p].length; i++) { | |
str.push(encodeURIComponent(p) + "[]=" + obj[p][i]); | |
}; | |
} | |
if (obj.hasOwnProperty(p) && !angular.isArray(obj[p])) { | |
// str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); |
NewerOlder