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
.custom-select { | |
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='255' height='255'%3E%3Cpath d='M0 63.75l127.5 127.5L255 63.75z'/%3E%3C/svg%3E"); | |
} |
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
button { | |
position: relative; | |
outline: 1px solid transparent; | |
border-radius: 50%; | |
border: 1px solid #bdc3c7; | |
width: 80px; | |
height: 80px; | |
background: none; | |
user-select: none; | |
} |
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 randomInteger(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
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
// REF https://stackoverflow.com/questions/3163615/how-to-scroll-html-page-to-given-anchor-using-jquery-or-javascript | |
jQuery(document).ready(function($){ | |
$(document).on('click', 'a.scroll-to', function(e) { | |
e.preventDefault(); | |
scrollToAnchor( $(this).attr('href') ); | |
}); | |
}); | |
function scrollToAnchor(aid){ | |
var aTag = jQuery(aid); |
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
<?php | |
//REF http://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-in-wordpress-using-ftp/ | |
function wpb_admin_account(){ | |
$user = 'Username'; | |
$pass = 'Password'; | |
$email = '[email protected]'; | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); |
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
.aligner { | |
display: flex; | |
align-items: center; | |
} | |
.aligner-center { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} |
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
body.spam table[data-restricted="true"] { | |
-webkit-filter: blur(0.8px); | |
filter: blur(0.8px); | |
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50) progid:DXImageTransform.Microsoft.Blur(PixelRadius='0.8'); | |
opacity: 0.5; | |
} |
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
/* | |
Speed Test Class | |
Tests a code block X number of times and returns an average of the execution time | |
https://www.codeschool.com/courses/javascript-best-practices | |
*/ | |
var SpeedTest = function(testImplement,testParams,repetitions){ | |
this.testImplement = testImplement; | |
this.testParams = testParams; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |