A Pen by Cloud Dark on CodePen.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<div id="data-table"> | |
<p id="loading-message">Loading...</p> | |
<p id="data-count"></p> | |
<table> | |
<thead> | |
<tr> | |
<th>Title</th> | |
<th>Description</th> | |
<th>Link</th> | |
<th>Category</th> |
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 count = 0; | |
function getAllButtons() { | |
return document.querySelectorAll('button.is-following') || []; | |
} | |
async function unfollowAll() { | |
const buttons = getAllButtons(); |
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
/** | |
* array_contains | |
* Check if string contains word from array. | |
* | |
* @since 1.0.0 | |
* @version 1.0.0 | |
**/ | |
function array_contains($str, array $arr){ | |
foreach($arr as $a){ | |
if(stripos($str, $a) !== false) return true; |
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 | |
/** | |
* Get hearder Authorization | |
* */ | |
function getAuthorizationHeader(){ | |
$headers = null; | |
if (isset($_SERVER['Authorization'])) { | |
$headers = trim($_SERVER["Authorization"]); | |
} | |
else if (isset($_SERVER['HTTP_AUTHORIZATION'])) { //Nginx or fast CGI |
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 | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* | |
* @author Jason Davis - https://www.codedevelopr.com/ | |
* | |
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/ | |
* | |
* Updated with suggested performance improvement by @PhiSYS. |