Skip to content

Instantly share code, notes, and snippets.

View edussx's full-sized avatar

Chenxiao Ma edussx

  • Microsoft
  • Suzhou, China
View GitHub Profile
@edussx
edussx / self-signed-certificate-with-custom-ca.md
Created January 25, 2019 03:49 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@edussx
edussx / gist:4970604
Last active December 13, 2015 20:29
CareerCup 1.4
//CareerCup 1.4
//by edussx
#include <string>
using std::string;
string spaceReplacer(const string s)
{
string new_string;
for (int i = 0; i < s.size(); i++)
@edussx
edussx / gist:4970544
Created February 17, 2013 07:28
CareerCup 1.3
//CareerCup 1.3
//by edussx
#include <string>
using std::string;
//sort a string, return the sorted string
//not an efficient sorting algorithm, though
string sort(const string& str)
{
@edussx
edussx / gist:4970428
Last active December 13, 2015 20:28
CareerCup 1.1
//CareerCup 1.1
//by edussx
#include <string>
//assume the given string is a c++ string
bool ifUnique(std::string s)
{
for(int i = 0; i < s.size()-1; i++)
{
for (int j = i+1 ; j < s.size(); j++)