Skip to content

Instantly share code, notes, and snippets.

common.js:

// Import Barba.js
import barba from '@barba/core';
import home from './home';

// Import GSAP
import { gsap } from 'gsap';

export default {
@josialoos
josialoos / README.md
Last active May 16, 2019 19:57 — forked from hofmannsven/README.md
MySQL CLI Cheatsheet
@josialoos
josialoos / all_possible-combinations
Created December 20, 2018 16:18
Google Docs - Alle Möglichkeiten kombinieren - Keywords generieren
// this combines all possible combinations of cells in row A and B in two rows:
=ArrayFormula(
VLOOKUP(
CEILING(ROW(OFFSET(A1,,,COUNTA(A2:A)*COUNTA(B2:B)))/COUNTA(B2:B)) ,
{ROW(A2:A)-row(A1),A2:A} , 2, )
)
// this combines the two new rows C and D and makes one expression out of them:
@josialoos
josialoos / gist:04c46c462f25cc0c5305e118e2b4cb70
Last active September 15, 2024 21:41
Woocommerce: Activate image gallery features on archive page same as on product page
Add this to your functions.php in wordpress theme folder:
add_action( 'wp_enqueue_scripts', 'gallery_scripts', 20 );
function gallery_scripts() {
if ( is_archive()) {
if ( current_theme_supports( 'wc-product-gallery-zoom' ) ) {
wp_enqueue_script( 'zoom' );
}
if ( current_theme_supports( 'wc-product-gallery-slider' ) ) {
@josialoos
josialoos / gist:6086762
Created July 26, 2013 06:38
WP best Slider
http://dev7studios.com
@josialoos
josialoos / WP Memory Limit
Created June 13, 2013 08:33
Memory Limit erhöhen oder reduzieren/genau definieren
in wp-config.php einsetzen (hinter <?php ... vor Datenbankname, etc.)
/** Memory-Limit hochsetzen */
define('WP_MEMORY_LIMIT', '32M');
WP-Version: 3.5.x
in wp-content/themes/"themeordner"/functions.php einsetzen (nicht ganz am Schluss):
/**
* Function to change excerpt length
*/
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Version: WP 3.5.x
bei Wordpress-Plugins suchen: TW Recent Posts Widget
@josialoos
josialoos / WP htaccess mit php 5.3
Last active December 16, 2015 19:39
server php version per .htaccess anpassen
Version: WP 3.5.x
Erste Zeile ändert die php-Version. Wichtig ist, dass der Befehl in der htaccess möglichst ganz oben steht.
addhandler php53-cgi .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
@josialoos
josialoos / WP MySQL Search & Replace
Last active December 16, 2015 19:09
Wie werden bei Wordpress alle Pfade auf einmal geändert, beispielsweise nach einem Umzug.
Version: WP 3.5.x
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.eureurl.de/altesverzeichnis/wp-content/uploads/', 'http://www.eureurl.de/neuesverzeichnis/wp-content/uploads/');
Beispiel post content für reichenberger:
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://reichenberger.josialoos.com/', 'http://reichenberger.nachbarschaftshaus.de/');
Beispiel guid:
UPDATE wp_posts SET guid = REPLACE(guid, 'reichenberger.josialoos.com', 'reichenberger.nachbarschaftshaus.de');