Skip to content

Instantly share code, notes, and snippets.

@e8035669
e8035669 / .ycm_extra_conf.py
Created December 22, 2018 01:17
use cmake with YouCompleteme
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
@e8035669
e8035669 / fileglob.cpp
Created July 21, 2018 01:29
make a wrapper of glob file
#include <glob.h> // glob(), globfree()
#include <string.h> // memset()
#include <vector>
#include <stdexcept>
#include <string>
#include <sstream>
std::vector<std::string> glob(const std::string& pattern) {
using namespace std;
@e8035669
e8035669 / letsencrypt-jetty.sh
Last active January 20, 2018 15:33 — forked from xkr47/letsencrypt-jetty.sh
How to use Letsencrypt certificate & private key with Jetty
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
# the "auth" aka "certonly" subcommand
# convert certificate chain + private key to the PKCS#12 file format
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
# convert PKCS#12 file into Java keystore format
# keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -deststoretype pkcs12 -destkeystore keystore.java.pkcs12