Skip to content

Instantly share code, notes, and snippets.

View veggiemonk's full-sized avatar

Julien Bisconti veggiemonk

View GitHub Profile
@veggiemonk
veggiemonk / inlineworker.js
Created January 15, 2017 14:57 — forked from SunboX/inlineworker.js
Create web workers without a separate worker JS files. Source: http://jsbin.com/owogib/8/
function worker() {
setInterval(function() {
postMessage({foo: "bar"});
}, 1000);
}
var code = worker.toString();
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}"));
var blob = new Blob([code], {type: "application/javascript"});
@veggiemonk
veggiemonk / README-Template.md
Last active June 22, 2018 19:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@veggiemonk
veggiemonk / main.go
Created January 10, 2018 13:28 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@veggiemonk
veggiemonk / useful.sh
Last active November 5, 2018 19:49
Useful commands
# Commands that are useful once in a while but not always for everyday usage
# Remove all node_modules forlder recursively
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
# List globally installed npm package
npm list -g --depth=0
# Loop over files in the current dir
for f in *; do
@veggiemonk
veggiemonk / error.js
Created March 4, 2018 08:49
Javascript: Custom error with stack
/*
http://jsbin.com/rolojuhuya/1/
https://stackoverflow.com/questions/8802845/inheriting-from-the-error-object-where-is-the-message-property
https://stackoverflow.com/questions/783818/how-do-i-create-a-custom-error-in-javascript
*/
function CustomError(message, somethingElse) {
var error = Error.call(this, message);
@veggiemonk
veggiemonk / useful.js
Created March 5, 2018 10:54
Javascript snippets
const pipe = (...fns) => x => fns.reduce((acc, fn) => fn(acc), x);
@veggiemonk
veggiemonk / keybase.md
Created June 6, 2018 09:05
keybase proof

Keybase proof

I hereby claim:

  • I am veggiemonk on github.
  • I am jbisconti (https://keybase.io/jbisconti) on keybase.
  • I have a public key ASAvfjo-DwSJ4vxfSOY_eQTNExUvvJLQhlkUeNhEPja35Ao

To claim this, I am signing this object:

@veggiemonk
veggiemonk / chaos-eng-istio.html
Last active June 22, 2018 16:17 — forked from ryanj/gist-reveal.it-slides.html
Chaos Engineering with Service mesh presentations - http://gist-reveal.it/fd6fc28156ee1e770998ced4be39aca1
<section data-transition='concave' data-state='blackout'>
<h1>CHAOS ENGINEERING</h1>
<h2>with</h2>
<h1>SERVICE MESH</h1>
</section>
<section data-transition='concave' id="inquiry">
<h2>Questions to the audience</h2>
<ol>
<!-- <li>Who uses containers ?</li> -->