Skip to content

Instantly share code, notes, and snippets.

@thawornwit
thawornwit / kubernetes_notes.md
Created December 27, 2018 13:57 — forked from miguelmota/kubernetes_notes.md
Kubernetes Certified Administrator (KCA) notes

kubernetes notes

set master node

user@miguelmota1:~$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16
[sudo] password for user: 
^B^[kk[init] using Kubernetes version: v1.11.2
[preflight] running pre-flight checks
I0901 00:44:36.182370   16584 kernel_validator.go:81] Validating kernel version
@thawornwit
thawornwit / cython_tricks.md
Created February 28, 2018 09:29 — forked from ctokheim/cython_tricks.md
cython tricks

Cython

Cython has two major benefits:

  1. Making python code faster, particularly things that can't be done in scipy/numpy
  2. Wrapping/interfacing with C/C++ code

Cython gains most of it's benefit from statically typing arguments. However, statically typing is not required, in fact, regular python code is valid cython (but don't expect much of a speed up). By incrementally adding more type information, the code can speed up by several factors. This gist just provides a very basic usage of cython.

@thawornwit
thawornwit / bash-cheatsheet.sh
Created August 3, 2017 16:18 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@thawornwit
thawornwit / api.py.patch
Created July 31, 2016 13:17 — forked from windows98SE/api.py.patch
[fix] LINE API function login ( api.py ) / new examples
@@ -55,7 +55,21 @@
After login, make `client` and `client_in` instance
to communicate with LINE server
"""
- raise Exception("Code is removed because of the request of LINE corporation")
+
+ self.transport = THttpClient.THttpClient(self.LINE_HTTP_URL)
+ self.transport_in = THttpClient.THttpClient(self.LINE_HTTP_IN_URL)
+
+ self.transport.setCustomHeaders(self._headers)