This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Authenticate Users Remotely | |
Author: Christopher Davis | |
Author URI: http://www.christopherguitar.net/ | |
License: GPL2 | |
*/ | |
add_filter('xmlrpc_methods', 'wpse39662_add_login_method' ); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Check if users can register. */ | |
$registration = get_option( 'users_can_register' ); | |
/* If user registered, input info. */ | |
$userdata = array( | |
'user_pass' => esc_attr( $args[2] ), | |
'user_login' => esc_attr( $args[0] ), | |
'first_name' => esc_attr( "" ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"timestamp": "ISODate('2015-10-10T23:06:37.000Z')", | |
"post": { | |
"blog": "2", | |
"type": "post", | |
"id": "148355", | |
"title": "20 ways to have a relationship", | |
"permalink": "http:\/\/ktis.pdpw-kltr.accessdomain.com\/2014\/02\/twenty-20-ways-to-have-a-relationship\/", | |
"tax": [{ | |
"taxonomy": "category", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Remote Login | |
Description: Log into the site with creds that work on remote site (as defined in plugin). The remote site must have XML-RPC enabled. | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com/ | |
THIS IS NOT COMPLETE - DO NOT USE IN PRODUCTION | |
The remote site (defined below in $server) is the "master" site. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.unique = function () { | |
var r = new Array(); | |
o:for(var i = 0, n = this.length; i < n; i++) | |
{ | |
for(var x = 0, y = r.length; x < y; x++) | |
{ | |
if(r[x]==this[i]) | |
{ | |
alert('this is a DUPE!'); | |
continue o; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import time | |
username = 'backup' | |
password = 'password' | |
hostname = 'localhost' | |
filestamp = time.strftime('%Y%m%d') | |
database_list_command = "mysql -u%s -p%s -h%s --silent -N -e 'show databases'" % (username, password, hostname) | |
for database in os.popen(database_list_command).readlines(): | |
database = database.strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# chkconfig: 35 99 99 | |
# description: Node.js /home/nodejs/sample/app.js | |
# | |
. /etc/rc.d/init.d/functions | |
# Creamos un fichero PID para monit | |
SCRIPT="$(basename $0)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param = { | |
params: [], | |
set: function(key, value){ | |
if(!this.update(key, value)){ | |
this.add(key, value); | |
} | |
}, | |
add: function(key, value) { | |
param_obj = {}; | |
param_obj[key] = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//requires: | |
//npm install nodegit | |
//npm install fs-extra | |
var git = require('nodegit'), | |
fs = require('fs-extra'), | |
path = './webfiles', | |
repo = 'https://[email protected]/alloyking/bracket-app-auto-update.git'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UrlRequest.h | |
// form | |
// | |
// Created by timshultis on 12/26/13. | |
// Copyright (c) 2013 timshultis. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |