Skip to content

Instantly share code, notes, and snippets.

@josialoos
josialoos / jft-steifscript.js
Created May 4, 2012 07:29
Kopiro Steifscript (enc)
javascript:eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 j=1S.1h(1g,w,C,u,y,w,10,Y,x,1L,u,1G,1k,Z,y,u,C,x);2 q="1.3";2 o=1e("16 D "+j+" "+q+"\\14 p 1d 1I m l a z A m 17\'s 1c D B 1i 1j!\\n\\1l 1m 1o B A, 1q 1t 1y: \\n%5% (F)\\n%4% (F e S)\\n\\n","T %4%, U V W X.");2 7,4,5,9;2 r=8 11();6(o){o+="\\n(12 13 "+j+")";2 t=$$(".7");15(2 i=0;i<t.18;i++){7=t[i];9="";4="";5="";6(7){h{9=7.19("1a-9");6(!9)1b;h{2 c=7.E[1];6(!c)c=7.E[0];6(c){4=c.R;5=4.1f(" ")[0]}}f(d){}6(!4)4="";6(!5)5="";2 v=o.G(8 H("%5%","g"),5).G(8 H("%4%","g"),4);2 J=1n()+1;2 K=1p.L();2 1r=8 1s().L();2 M={1u:J,1v:K,m:9,1w:1,1x:N,1z:v,1A:1B};h{8 1C().1D(M).1E("/1F/z/l.O").1H(P).l();r.1J(4)}f(d){}}f(d){}}}1K(j+" "+q,"<Q>1M p 1N 1O 1P!</Q>\\n<b>I 1Q 1R m: </b>"+r);h{2 k=8 1T();k.
@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');
@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]
Version: WP 3.5.x
bei Wordpress-Plugins suchen: TW Recent Posts Widget
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 );
@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');
@josialoos
josialoos / gist:6086762
Created July 26, 2013 06:38
WP best Slider
http://dev7studios.com
@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 / 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 / README.md
Last active May 16, 2019 19:57 — forked from hofmannsven/README.md
MySQL CLI Cheatsheet