Skip to content

Instantly share code, notes, and snippets.

apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: byoh-cluster-md-0
namespace: default
spec:
template:
spec: {}
---
apiVersion: cluster.x-k8s.io/v1beta1
@phamquy
phamquy / self-signed-certificate-with-custom-ca.md
Created October 14, 2019 07:07 — 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
@phamquy
phamquy / self-signed-certificate-with-custom-ca.md
Created October 14, 2019 07:07 — 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
@phamquy
phamquy / cloudSettings
Last active September 25, 2020 18:59
vscode-settings
{"lastUpload":"2020-09-25T18:59:16.175Z","extensionVersion":"v3.4.3"}
@phamquy
phamquy / install.txt
Created April 10, 2018 22:53 — forked from cburgmer/install.txt
Take a screenshot with selenium from node
npm install selenium-webdriver
npm install selenium-server-standalone-jar
npm install phantomjs
@phamquy
phamquy / 0_reuse_code.js
Created October 19, 2016 17:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
//------------------------------------------------------------------------------
//
// kLineCount is number of line in truncated mode
-(NSString *)thumbnailString:(NSString*)string {
NSInteger lenght = [string length];
NSString *showMoreString = @"see more";
UIFont* displayFont = <your font>;
@phamquy
phamquy / mint141516.md
Last active August 29, 2015 14:12 — forked from hgomez/mint141516.md

Mint upgrade procedures

Some investigation and tests on how to upgrade Mint machine.

Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.

As usual you could break your machine, so please do backups before and cross fingers.

Mint 14 -> Mint 15

NSURLConnection | NSURLSession
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connectionShouldUseCredentialStorage: |
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler:
| N

After wresting the traditional git submodule + static library dependency chain, it became a giant headache. I tried to get it all to work for a long time. You must:

  1. Create a workspace and drag your child projects in.
  2. Add their targets as binary linked libraries.
  3. Manually add header search paths.
  4. And all your dependency projects must be set up a certain way for this to work too. So that's a lot of work.

A much better way is to use submodules to include the child projects into the parent project and then use cocoapods to include those child projects (instead of linking them in statically and dealing with the millions of headaches that brings).

For example, I've added my dependency tree as a series of git submodules and then I have a Podfile that looks like this: