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
import urllib3 | |
import os | |
import csv | |
rows = [] | |
http=urllib3.PoolManager() | |
#load the csv list of URLs to check | |
with open('urls.csv', 'r') as input: | |
csv_reader = csv.reader(input) | |
for blog in csv_reader: |
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
function collectAnnotations() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var values = sheet.getRange(7, 5, 4).getValues(); // create array of parameters set by the user by generating an array from row 7, column 5 for 3 rows | |
// parsing the array of parameters set by the user | |
var user = values[0]; | |
var url = values[1]; | |
var tag = values[2]; | |
var anyField = values[3]; |
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 | |
$response = wp_remote_get( 'http://status.reclaimhosting.com/api/v1/components' ); //use HTTP GET to retrieve server status information from the API | |
if( is_array($response) ) { | |
$body = $response['body']; // use the content | |
$a = json_decode($body, true); //parse the json from the HTTP GET | |
$serverName1 = $a[data][7][name]; //Set a variable called serverName1 equal to the name attribute for the 7th item in the Server List | |
$status1 = $a[data][7][status_name]; //Set a variable called status1 equal to the status_name attribute for the 7th item in the Server List | |
$serverName2 = $a[data][15][name]; //Set a variable called serverName2 equal to the name attribute for the 15th item in the Server List | |
$status2 = $a[data][15][status_name]; //Set a variable called status2 equal to the status_name attribute for the 15th item in the Server List | |
if( $status1=="Operational") { |
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 | |
/** | |
* Related Post Connection | |
* Forked from: | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/manually-curated-related-posts/ | |
* | |
* @uses Posts2Posts | |
* @link https://github.com/scribu/wp-posts-to-posts/wiki |
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: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |