Skip to content

Instantly share code, notes, and snippets.

View pageman's full-sized avatar

Paul Pajo pageman

View GitHub Profile
@pageman
pageman / TokenValidator.cs
Created October 23, 2015 09:04 — forked from anonymous/TokenValidator.cs
Validate JSON Web Token (JWT) With .NET JWT Library
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IdentityModel.Tokens;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
using System.Text;
// g++ UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o libcryptopp.a -o bootstrap.out -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS -lpthread bootstrap.cpp
#include "BlockUtils.h"
int main(void)
{
string btcdir("/home/chris/.bitcoin");
string bootstrap(btcdir + "/" + "bootstrap.dat");
BlockDataManager_FileRefs::GetInstance().SelectNetwork("Main");
BlockDataManager_FileRefs & bdm = BlockDataManager_FileRefs::GetInstance();
import java.io.IOException;
/**
* Class that copies stdin to stdout, as compained about as not being cleanly
* writable in Java on Hacker News.
* In real code, you would just write IOUtils.copy(System.in, System.out),
* which does basically the same thing.
* This does not catch any exceptions as a) this is just an "exercise" and
* b) all we could do with them is pretty-print them. So let the runtime
* print them for you.
@pageman
pageman / cache.manifest
Created November 19, 2011 06:44 — forked from mrspeaker/cache.manifest
Demo files for "flash card" app demonstrating HTML5 offline cache manifest. Full repo at https://github.com/mrspeaker/Eng2Fr
CACHE MANIFEST
# v0.1
index.html
lib/jquery-1.4.4.min.js
main.css
main.js
images/eng2fr.png