Skip to content

Instantly share code, notes, and snippets.

View giabao's full-sized avatar

Bùi Việt Thành giabao

View GitHub Profile
@giabao
giabao / dummy0.netdev
Created July 3, 2021 15:53 — forked from kquinsland/dummy0.netdev
How to get consul-agent and systemd.resolvd to co-exist peicefully and still be able to resolve *.consul hostsnames from within docker
# Creates a "dummy" network interface
# we'll configure this interface with a link-local address
# See: https://www.freedesktop.org/software/systemd/man/systemd.netdev.html
##
[NetDev]
Name=dummy0
Kind=dummy
#!/bin/bash
# This script add letsencrypt certs to $JAVA_HOME/jre/lib/security/cacerts
# see https://community.letsencrypt.org/t/will-the-cross-root-cover-trust-by-the-default-list-in-the-jdk-jre/134/22
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$JAVA_HOME" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
alias keytool=$JAVA_HOME/bin/keytool
# Add this to your nginx.conf under http { }
server {
listen 843;
server_name localhost;
location / {
rewrite ^(.*)$ /crossdomain.xml;
}
@giabao
giabao / script.js
Last active December 28, 2015 23:59 — forked from juandopazo/result.js
var fs = require('fs');
var http = require('http');
var ProgressBar = require('progress');
var Handlebars = require('handlebars');
var lineSep = '\r\n';
var typeSep = /\|+|\/|\sor\s|\:/g;
var invalidNameRegEx = /\.|\:|\-|\[|\]|\(\)/g;
var typeCleanupRegex = /\{|\}.*/g;
var indentation = ' ';