Skip to content

Instantly share code, notes, and snippets.


Tom Slankard twslankard

View GitHub Profile
View array_by_reference.cpp
#include <cstdio>
template <std::size_t N>
void printArray(const int (&arr)[N]) {
for (int i = 0; i < N-1; i++) {
printf("%d, ", arr[i]);
printf("%d\n", arr[N-1]);
twslankard / gist:760182
Created Dec 30, 2010
jquery load example
View gist:760182
<script src="jquery.js" type="text/javascript"></script>
<div id="container">
<script type="text/javascript">
twslankard / gist:637020
Created Oct 20, 2010
Verifying Amazon SNS Notification Signatures
View gist:637020
// get the raw HTTP post data
$postdata = file_get_contents('php://input');
// the post data is JSON, so let's decode it and grab the various fields
$json = json_decode($postdata);
$subject = $json->Subject;
$message = $json->Message;
$signature = $json->Signature;