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 cookies = document.cookie.split(";"); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = cookies[i]; | |
var eqPos = cookie.indexOf("="); | |
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; | |
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; | |
} |
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
function http_response_code($code = NULL) { | |
if ($code !== NULL) { | |
switch ($code) { | |
case 100: $text = 'Continue'; break; | |
case 101: $text = 'Switching Protocols'; break; | |
case 200: $text = 'OK'; break; | |
case 201: $text = 'Created'; break; | |
case 202: $text = 'Accepted'; break; |
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
Running the following commands fixes the audio volume controls and brightness lag response issues. | |
~ sudo killall coreaudiod | |
~ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist | |
~ sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist | |
Thanks to: http://apple.stackexchange.com/questions/116572/delay-when-using-the-volume-buttons |
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> | |
$percentage-width: 3.75em; | |
.progress-indicator { | |
overflow: hidden; | |
margin: 1em 0; | |
.indicator { | |
float: none; |
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
$request = 'code_in_the_url'; | |
$response = 'code_returned'; | |
if ( $_SERVER['REQUEST_URI'] === ( '/.well-known/acme-challenge/' . $request ) ) { | |
echo $request . '.' . $response; | |
exit; | |
} |
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 | |
/* | |
* tl;dr | |
* Adding `Helpers::add_hooks($this);` to your class constructor loads any needed add_action and add_filters hooks. | |
*/ | |
class Class_Helpers { | |
/** |
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
_.each(['onStart', 'onBefore', 'onRetain', 'onSuccess', 'onError', 'onExit', 'onFinish'], | |
transitionHook => { | |
$transitions[transitionHook]({}, function () { | |
console.log(transitionHook); | |
}); | |
}); |
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
Find: | |
function ([a-z_]+)\(([a-z $,_]+)\s\) | |
Replace: | |
function $1( $2 ) |
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 | |
/** | |
* Shortcodes Base Class | |
* | |
* Adds dynamically named shortcodes using a child class's functions. | |
* Shortcode will not be created for functions prefixed with an underscore (_); | |
* Prefix is optional (recommended). | |
* | |
*/ |
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
{"Awesome":true} |