Skip to content

Instantly share code, notes, and snippets.

@jkudish
jkudish / always-login.php
Created January 13, 2012 21:08
Always logged in with WordPress
<?php
/**
* keeps a user always logged in
* don't use this on a production site, ever!
*/
add_action('init', 'auto_login');
add_action('admin_init', 'auto_login');
function auto_login() {
@markjaquith
markjaquith / plugin-deploy.sh
Created November 16, 2012 05:04 — forked from scribu/plugin-deploy.sh
Plugin deploy script
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH
@markjaquith
markjaquith / gist:6225805
Last active September 5, 2024 01:41
WordPress multi-tenant directory structure sharing core files for opcode awesomeness, fast deployments, and low disk usage. With inspiration from @weskoop. "=>" indicates a symlink.
sites
|__ ms.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
| |__ wp-config.php
|__ one.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
@grtaylor2
grtaylor2 / woocommerce.css
Created November 29, 2013 19:21
Clean Woo Commerce CSS -- Replace the plugin's woocommerce.css file with a decompressed formatted stylesheet. This is the original CSS with no edits -- the code is just formatted in a way that makes edits much easier.
/*Stylesheet cleaned up and organized by Marketing Press*/
.clear {
clear:both
}
.nobr {
white-space:nowrap;
}
@einkoro
einkoro / hhvm_setcookie_fix.php
Last active August 29, 2015 14:00
Must-use plugin for a quick and dirty work around for HHVM indexing cookies by name and overwriting WordPress's logged_in and auth cookies.
<?php
/**
* Plugin Name: WP HHVM setcookie fix
* Plugin URI: http://bitpiston.com/
* Description: Quick n dirty alternative to setcookie() to work around HHVM indexing cookies by name and overwriting multiple cookies of the same name
* Author: BitPiston Studios
* Author URI: http://bitpiston.com/
* Version: 1.0
* Licence: BSD
*/
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active October 7, 2024 13:13
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();