This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controlplane $ kubectl describe pod metrics-server-5d79fcb458-cx7rp | |
Error from server (NotFound): pods "metrics-server-5d79fcb458-cx7rp" not found | |
controlplane $ kubectl get pod metrics-server-5d79fcb458-cx7rp | |
Error from server (NotFound): pods "metrics-server-5d79fcb458-cx7rp" not found | |
controlplane $ kubectl describe pod metrics-server-5d79fcb458-cx7rp -n kube-system | |
Name: metrics-server-5d79fcb458-cx7rp | |
Namespace: kube-system | |
Priority: 2000000000 | |
Priority Class Name: system-cluster-critical | |
Service Account: metrics-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: nginx | |
release: stable | |
environment: dev | |
tier: frontend | |
app.kubernetes.io/name: "inv-app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stateDiagram-v2 | |
Pending: Pending | |
note left of Pending | |
kube-scheduler หา node | |
pod pull image / create container | |
end note | |
Running: Running | |
note left of Running | |
At least one container is still running, | |
or is in the process of starting or restarting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ | |
RUN apk --update add zip git curl --no-cache | |
RUN apk cache clean | |
RUN adduser -D invs | |
RUN rm -rf /bin/cat | |
RUN rm -rf /bin/touch | |
RUN rm -rf /bin/ls | |
RUN rm -rf /bin/touch | |
RUN rm -rf /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'How to | |
' 1. Aceess VBA Project (ALT + F11) | |
' 2. Add Module | |
' 3. Tools > References : Add a reference to Microsoft VBScript Regular Expressions 5.5 | |
' 4. Paste Code and Run | |
'Ref: https://stackoverflow.com/questions/25184019/trim-all-types-of-whitespace-including-tabs | |
Sub ExcelToPipeDelimitedText() | |
Const Delimiter As String = "|" | |
Dim iSheet As Worksheet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
traefik2: | |
image: traefik:latest | |
restart: always | |
command: | |
- "--log.level=DEBUG" | |
- "--api.insecure=true" | |
- "--providers.docker=true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InvsRequestHandler : AbstractBaseRequestHandler, IRTRequestHandler | |
{ | |
protected override void run() | |
{ | |
try | |
{ | |
while (true) | |
{ | |
NetworkStream ns = clientSocket.GetStream(); | |
StringBuilder response = new StringBuilder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void sendRequest(ParamDTO message) | |
{ | |
try | |
{ | |
NetworkStream ns = clientSocket.GetStream(); | |
ns.WriteTimeout = WriteTimeOut; | |
Byte[] mb = serializeObject<RequestDictionaryMessage>(message); //PING | |
ns.Write(mb, 0, mb.Length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JSONHelper | |
private static readonly JsonSerializerSettings _SerializerSettings = new JsonSerializerSettings() | |
{ | |
NullValueHandling = NullValueHandling.Ignore | |
}; | |
public static Byte[] serializeObject<T>(T pObj) | |
{ | |
String JSON = JsonConvert.SerializeObject(pObj, typeof(T), _SerializerSettings); | |
return Encoding.Unicode.GetBytes(JSON); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InvsRequestHandler : AbstractBaseRequestHandler, IRTRequestHandler | |
{ | |
protected override void run() | |
{ | |
try | |
{ | |
while (true) | |
{ | |
NetworkStream ns = clientSocket.GetStream(); | |
object deserialized =((IFormatter)new BinaryFormatter()).Deserialize((Stream)ns); |