Quickly disable all plugins in WordPress.
This plugin needs to go into the wp-content/mu-plugins/
directory. Provided you have SSH access to the server where WordPress lives, you can do this:
cd $SITE_ROOT/wp-content/mu-plugins
#!/bin/bash | |
function remove_dir () { | |
rm -rf "$1_" | |
if [ -d "$1" ] | |
then | |
mv "$1" "$1_" | |
fi | |
} |
{ | |
"targets": [ | |
{ | |
"target_name": "keypress", | |
"conditions": [ | |
['OS == "mac"', { | |
'include_dirs': [ | |
'System/Library/Frameworks/CoreFoundation.Framework/Headers', | |
'System/Library/Frameworks/Carbon.Framework/Headers', | |
], |
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
<?php | |
// Add this as a mu-plugin. | |
if ( isset( $_GET['wp_maybe_auto_update'] ) ) { | |
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' ); | |
add_action( 'template_redirect', function() { | |
$time = date( 'r' ); | |
echo "Starting... $time<br />"; | |
delete_site_option( 'auto_core_update_failed' ); |
DELETE FROM wp_usermeta | |
WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
) |
void captureScreen() | |
{ | |
CGImageRef image_ref = CGDisplayCreateImage(CGMainDisplayID()); | |
CGDataProviderRef provider = CGImageGetDataProvider(image_ref); | |
CFDataRef dataref = CGDataProviderCopyData(provider); | |
size_t width, height; | |
width = CGImageGetWidth(image_ref); | |
height = CGImageGetHeight(image_ref); | |
size_t bpp = CGImageGetBitsPerPixel(image_ref) / 8; | |
uint8 *pixels = malloc(width * height * bpp); |
#!/usr/bin/env ruby | |
commit = `git log -1 --oneline` | |
hash = commit.to_s.split(" ").first | |
message = commit.sub("#{hash} ", "") | |
unless(message.gsub("\n","").end_with?(".jpg")) | |
`lolcommits --capture` | |
repopath = `git rev-parse --show-toplevel`.gsub("\n", "") | |
repourl = `git config --get remote.origin.url`.gsub("\n", "") |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |