Skip to content

Instantly share code, notes, and snippets.

View Splint3r7's full-sized avatar
🎯
Focusing

Hassan Khan Yusufzai Splint3r7

🎯
Focusing
View GitHub Profile
@pgooch
pgooch / wordpress wp_redirect redirect().php
Created April 5, 2012 02:06
Wordpress Redirects with wp_redirect()
// The Base Function
wp_redirect('http://www.urlofsite.com/path/to/location',301);
/* This needs to be run on an action, or at least I wanted able to get it to run outside of an action, I suggest template_redirect */
// In Use Example
add_action('template_redirect', 'redirect');
function redirect(){
if($redirect){
wp_redirect(get_bloginfo('url').'/wp-content/plugins/redirector/site/index.php',302);
@spacecowboy
spacecowboy / master.py
Created September 8, 2011 16:04
A simple proof of concept for building your own super computer in python, assuming you have access to many machines.
from multiprocessing.managers import BaseManager
from mathenate import mathenate
#Define manager
class QueueManager(BaseManager): pass
QueueManager.register('get_job_queue')
QueueManager.register('get_result_queue')
#Connect to server
m = QueueManager(address=('my.computer.org', 50000), authkey='password')