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
{ | |
"Id": "Policy1234", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1234", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::foo/*", |
/* | |
wordArray: { words: [..], sigBytes: words.length * 4 } | |
*/ | |
// assumes wordArray is Big-Endian (because it comes from CryptoJS which is all BE) | |
// From: https://gist.github.com/creationix/07856504cf4d5cede5f9#file-encode-js | |
function convertWordArrayToUint8Array(wordArray) { | |
var len = wordArray.words.length, | |
u8_array = new Uint8Array(len << 2), | |
offset = 0, word, i |
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
This gist assumes:
www-data
(may be apache
on other systems)/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
package main | |
import "code.google.com/p/go-tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
// Allocate two-dimensioanl array. | |
a := make([][]uint8, dy) | |
for i := 0; i < dy; i++ { | |
a[i] = make([]uint8, dx) | |
} |
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key | |
* 2. Set your AWS secret_key | |
* 3. Set your CloudFront Distribution ID | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php cf-invalidate.php |