Skip to content

Instantly share code, notes, and snippets.

*://awesomeopensource.com/*
*://www.libhunt.com/*
#!/bin/sh
echo "/key/swarm/psk/1.0.0/";
echo "/base16/";
echo "$(openssl rand -hex 32)";
@dcharbonnier
dcharbonnier / index.ts
Created December 27, 2019 15:58
got-issue
import * as got from "got"
import * as request from "request"
<!doctype html>
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div aurelia-app="src/configure">
Loading...
@dcharbonnier
dcharbonnier / docker-compose.yml
Last active March 20, 2018 09:51
NATS.io stack for docker swarm
version: '3.4'
services:
nats-init:
image: 'nats:latest'
entrypoint: "/gnatsd --cluster nats://0.0.0.0:6222 --no_advertise --tls --tlscert /run/secrets/nats.crt --tlskey /run/secrets/nats.key --auth ${TOKEN} -DV"
secrets:
- nats.crt
- nats.key
nats:
image: 'nats:latest'
version: '3.2'
services:
minio1:
image: minio/minio:${MINIO_VERSION:-latest}
volumes:
- minio-data:/export
ports:
- "9001:9000"
- target: 9000
@dcharbonnier
dcharbonnier / Dockerfile
Last active July 13, 2017 08:04
alpine node-libcurl
FROM node:7.5-alpine
RUN mkdir -p /opt/node-lib-curl
WORKDIR /opt/node-lib-curl
RUN apk add -q --no-progress --no-cache libcurl openssl openssl-dev python python-dev alpine-sdk curl-dev py-pip \
&& npm install shelljs mocha
ADD test.js ./test/
ADD pycurl_exec.py .
ADD node-libcurl.js .
RUN ./node_modules/mocha/bin/mocha -c --timeout 60000
FROM alpine:3.4
RUN apk add --no-cache dcron
COPY cron /opt/cron/
COPY crontab /etc/crontabs/root
COPY entrypoint.sh /
COPY backup.sh /
COPY restore.sh /
@dcharbonnier
dcharbonnier / gist:7fe4936cc6000a5f6538566581ea5908
Created November 14, 2016 12:20
istanbul ignore with grunt for typescript
grunt.loadNpmTasks('grunt-text-replace');
grunt.initConfig({
'replace': {
default: {
src: ['lib/**/*.js'],
overwrite: true,
replacements: [
{
from: 'var __extends = (this && this.__extends)',
ls|grep -v index|grep \.ts|while read f;do echo -n "export { ";cat $f|grep 'export '|sed -e 's/\s*export \([a-z]\+\) \([A-Za-z0-9]\+\).*/\2/g'|xargs echo -n| sed -e 's/ /,/g'; echo " } from \"`echo -n $f|sed 's/\.ts//g'`\"" ; done;