I hereby claim:
- I am joeyguerra on github.
- I am joeyguerra (https://keybase.io/joeyguerra) on keybase.
- I have a public key ASBDxkxeKV2rhI1xg9U9HoLNphwjWh_qk2Sj5V969ys6fAo
To claim this, I am signing this object:
f(events) -> state | |
match f(state, event) -> state | |
f(state, command) -> events |
[Fact] | |
public async void ShouldPublishResultMessage() | |
{ | |
var messageContract = File.ReadAllText("MessageContract.json"); | |
var expected = JsonSerializer.Deserialize<Result>(messageContract); | |
var subscriber = _fixture.RedisPersistence.GetSubscriber(); | |
var tcs = new TaskCompletionSource<Result>(); | |
subscriber.Subscribe("channel:result", (channel, message) => | |
{ | |
var result = JsonSerializer.Deserialize<Result>(message); |
#!/bin/zsh | |
# example run: ./init.sh git@github.com:joeyguerra/100-days-of-code.git | |
git init | |
git remote add origin $1 | |
git add . | |
git commit -m "initial commit" | |
git push -u origin main |
docker run --rm -it --name redis-cli redis redis-cli -h $IPADDRESS -a $REDIS_PASSWORD |
Notification.requestPermission(); | |
setInterval(async ()=>{ | |
let data = await (await fetch("https://api.coindesk.com/v1/bpi/currentprice.json")).json(); | |
document.body.innerHTML = `${data.time.updated}:%20${data.bpi.USD.rate}`; | |
if(Notification.permission == "granted") new Notification(`BitCoin Price: $${data.bpi.USD.rate}`); | |
},10000); |
import assert from "assert" | |
import http2 from "http2" | |
//using mocha | |
describe("Http2", ()=>{ | |
it("Should make a get request to google with http2", done => { | |
const uri = "https://www.google.com" | |
const client = http2.connect(uri); | |
const req = client.request({ | |
[http2.constants.HTTP2_HEADER_SCHEME]: "https", | |
[http2.constants.HTTP2_HEADER_METHOD]: http2.constants.HTTP2_METHOD_GET, |
import assert from "assert" | |
describe("PropertyFile - externalize configuraiton with environment variables", ()=>{ | |
it("Should parse an env file", async done => { | |
const env = ` | |
CLIENT_ID="something" | |
CLIENT_SECRET="something" | |
# something id | |
ID=1 | |
` | |
let config = {} |
const pipe = (...fns) => x => fns.reduce((y, f) => f(y), x) |
I hereby claim:
To claim this, I am signing this object:
(function(win){ | |
/* | |
Copied from https://github.com/foolip/microdatajs/blob/master/jquery.microdata.json.js | |
without jQuery. | |
*/ | |
var Schema = (function(doc){ | |
function getTypes(node){ | |
var type = node.getAttribute('itemtype'); | |
if(!type) return []; | |
return type.split(' '); |