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
| /* | |
| * Stripe WebGl Gradient Animation | |
| * All Credits to Stripe.com | |
| * ScrollObserver functionality to disable animation when not scrolled into view has been disabled and | |
| * commented out for now. | |
| * https://kevinhufnagl.com | |
| */ |
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
| Remember token: | |
| git config --global credential.helper cache | |
| Clear token cache: | |
| git config --global --unset credential.helper |
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
| git init | |
| git remote add origin PATH/TO/REPO | |
| git fetch | |
| git checkout -t origin/dev -f |
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 | |
| /** | |
| * Use ACF image field as avatar | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/acf-pro-simple-local-avatars/ | |
| * @uses ACF Pro image field (tested return value set as Array ) | |
| */ | |
| add_filter('get_avatar', 'tsm_acf_profile_avatar', 10, 5); | |
| function tsm_acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) { |
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
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
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
| document.getElementsByTagName('button')[0].onclick = function () { | |
| scrollTo(document.body, 0, 1250); | |
| } | |
| function scrollTo(element, to, duration) { | |
| var start = element.scrollTop, | |
| change = to - start, | |
| currentTime = 0, | |
| increment = 20; | |
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 | |
| /* | |
| * ----------------------------------------------------------------------------- | |
| * Advanced Custom Fields Modifications | |
| * ----------------------------------------------------------------------------- | |
| */ | |
| function PREFIX_apply_acf_modifications() { | |
| ?> | |
| <style> |
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
| /** | |
| * Selective/Conditional CSS and JS Loading in WordPress | |
| * Loads CSS and JS file based on matched page/post slug | |
| */ | |
| class ConditionalAsset { | |
| private function assetName() { | |
| $post_type = get_post_type(); | |
| $slug = get_post_field( 'post_name' ); |
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
| #cursor { | |
| --size: 20px; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| height: var(--size); | |
| width: var(--size); | |
| background-color: #000; | |
| border-radius: 50%; | |
| transform: translate3d( |
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 | |
| /* Enable Debugging (only on front-end) */ | |
| $is_admin = strpos($_SERVER['REQUEST_URI'], 'wp-admin'); | |
| if ($is_admin == false){ | |
| define( 'WP_DEBUG', true ); | |
| } | |
| /* That's all, stop editing! Happy publishing. */ |
NewerOlder