Swap out the two URLs (first is source, second is target) then run with curl:
curl -X POST -d @pingback.xml http://example.com/xmlrpc
<?php | |
namespace Taproot; | |
use SplQueue; | |
class FifoQueue extends SplQueue { | |
protected $capacity; | |
public function __construct($capacity) { $this->capacity = $capacity; } |
{ | |
"entries": [ | |
{ | |
"type": "post", | |
"id": "2013/07/06/4", | |
"content": "", | |
"published": "", | |
"updated": "", | |
"response_counts": { | |
"comments": 0, |
Swap out the two URLs (first is source, second is target) then run with curl:
curl -X POST -d @pingback.xml http://example.com/xmlrpc
#!/usr/bin/env python | |
# fix an Android APK built by PhoneGap Build to correct the problem of | |
# xhdpi images not being correctly added (https://github.com/phonegap/build/issues/9) | |
# | |
# REQUIRES apktool and jarsigner to already be installed and on the PATH. | |
# | |
# usage: fix_android_apk.py www/config.xml InputFile.apk OutputFile.apk | |
# | |
import os,sys,shutil,tempfile,xml.dom.minidom |
<?php | |
function gfm($text){ | |
# Extract pre blocks | |
$extractions = array(); | |
$text = preg_replace_callback('/<pre>.*?<\/pre>/s', function($matches) use (&$extractions){ | |
$match = $matches[0]; | |
$md5 = md5($match); | |
$extractions[$md5] = $match; |
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |