const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
| #!/bin/sh | |
| print_usage() { | |
| echo "usage: compress_video <input_file>" | |
| echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
| } | |
| get_extension() { | |
| f="${1##*/}" | |
| case "$f" in |
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
| /** | |
| * Tier 1 – Dotted | |
| */ | |
| * { outline: 2px dotted purple; } | |
| * * { outline: 2px dotted blue; } | |
| * * * { outline: 2px dotted green; } | |
| * * * * { outline: 2px dotted yellow; } | |
| * * * * * { outline: 2px dotted orange; } | |
| * * * * * * { outline: 2px dotted red; } |
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
| <html> | |
| <head> | |
| <title>Stripe Gradient</title> | |
| </head> | |
| <body> | |
| <canvas id="gradient-canvas" data-js-darken-top data-transition-in> | |
| <!-- | |
| Remove data-js-darken-top to keep the same brightness in the upper part of the canvas | |
| --> | |
| </canvas> |
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
| const SCROLL_UP = "up"; | |
| const SCROLL_DOWN = "down"; | |
| const useScrollDirection = ({ | |
| initialDirection, | |
| thresholdPixels, | |
| off | |
| } = {}) => { | |
| const [scrollDir, setScrollDir] = useState(initialDirection); |
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
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| class SignUp extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| newsLetter: true, | |
| email: '' | |
| }; |
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 | |
| $args = array( | |
| 'post_type' => 'location', | |
| 'posts_per_page' => -1, | |
| 'order' => 'ASC', | |
| 'orderby' => 'title', | |
| 'facetwp' => true, | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'advertiser-level', |
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
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
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
| /** | |
| * Element.prototype.classList for IE8/9, Safari. | |
| * @author Kerem Güneş <[email protected]> | |
| * @copyright Released under the MIT License <https://opensource.org/licenses/MIT> | |
| * @version 1.2 | |
| * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList | |
| */ | |
| ;(function() { | |
| // Helpers. | |
| var trim = function(s) { |
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 in conjunction with https://gist.github.com/DanielSantoro/948c5000850c4695f30db8542f8bc966 | |
| <a class="cart-customlocation" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> |
NewerOlder