Skip to content

Instantly share code, notes, and snippets.

View victusfate's full-sized avatar
🚀

Mark Essel victusfate

🚀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am victusfate on github.
  • I am victusfate (https://keybase.io/victusfate) on keybase.
  • I have a public key ASDS8B9y783Zl7MUVoUx5LrNDJMMkSMZ4Ht3XAZnWGgMTQo

To claim this, I am signing this object:

defmodule MyApp.CLI do
def main(_args) do
IO.puts("Hello from MyApp!")
end
end
@victusfate
victusfate / app.roll20.net-20170930T140438.json
Created September 30, 2017 18:11
roll20 app performance test
This file has been truncated, but you can view the full file.
{
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/59.0.3033.0 Mobile Safari/537.36",
"lighthouseVersion": "2.0.0",
"generatedTime": "2017-09-30T18:04:38.086Z",
"initialUrl": "https://app.roll20.net/editor/",
"url": "https://app.roll20.net/editor/",
"audits": {
"is-on-https": {
"score": false,
"displayValue": "3 insecure requests found",
@victusfate
victusfate / async_await_error_test.js
Last active August 17, 2017 19:01
async await errors bubble up as expected
let pFunc = async () => {
return new Promise( (resolve,reject) => {
setTimeout( () => {
reject(Error('pFunc failed message'))
},1)
})
}
let go = async () => {
await pFunc()
}
ffmpeg -i input.flv -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - gif:- | convert -layers Optimize - output.gif
@victusfate
victusfate / loot.js
Last active July 23, 2017 20:54
monty haul D&D 5e loot.js (for use with roll20)
on("ready", function() {
on("chat:message", function (msg) {
if (msg.type === "api" && msg.content === "!MontyHaulLoot") {
Loot('montyHaul',msg);
}
if (msg.type === "api" && msg.content === "!MinorLoot") {
Loot('minor',msg);
}
});
});
@victusfate
victusfate / exampleOfPagedCursor.js
Created July 21, 2017 21:14
google cloud datastore node.js paged cursor
function runPageQuery (pageCursor) {
let query = datastore.createQuery('Task')
.limit(pageSize);
if (pageCursor) {
query = query.start(pageCursor);
}
return datastore.runQuery(query)
.then((results) => {
@victusfate
victusfate / Procfile
Last active June 23, 2017 19:26
errors finding dependencies after checking in package lock file, node v8.1 npm5 on heroku
web: node --optimize_for_size --max_old_space_size=460 --gc_interval=100 app.js
@victusfate
victusfate / loot.js
Created June 13, 2017 10:21
D&D 5e Loot enhanced
on("ready", function() {
on("chat:message", function (msg) {
if (msg.type === "api" && msg.content === "!MediumLoot") {
Loot('medium');
}
if (msg.type === "api" && msg.content === "!MinorLoot") {
Loot('minor');
}
});
@victusfate
victusfate / producerConsumer.cc
Created April 13, 2017 17:28
simple producer consumer in c++11 using threads
#include <iostream>
#include <cstdlib>
#include <thread>
#include <mutex>
#include <vector>
#include <unordered_map>
#include <queue>
#include <chrono>
using namespace std;