pod (vv10dece4d-9avwu) failed to fit in any node fit failure on node (192.168.0.1): Insufficient CPU fit failure on node (192.168.0.2): Insufficient Memory fit failure on node (192.168.0.3): Insufficient Memory fit failure on node (192.168.0.4): Insufficient CPU fit failure on node (192.168.0.5): Insufficient CPU fit failure on node (192.168.0.6): Insufficient CPU fit failure on node (192.168.0.7): Insufficient CPU fit failure on node (192.168.0.8): Insufficient CPU fit failure on node (192.168.0.9): Insufficient CPU fit failure on node (192.168.0.10): Insufficient CPU fit failure on node (192.168.0.11): Insufficient CPU fit failure on node (192.168.0.12): Insufficient CPU fit failure on node (192.168.0.13): Insufficient CPU fit failure on node (192.168.0.14): Insufficient CPU fit failure on node (192.168.0.15): Insufficient Memory fit failure on node (192.168.0.16): Insufficient Memory fit failure on node (192.168.0.17): Insufficient CPU fit failure on node (192.168.0.18): Insufficient CPU fit failure on
This file contains hidden or 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
#!/bin/bash | |
# Under instructions in: https://blog.kapeli.com/linux-man-pages-in-dash | |
set -x | |
set -e | |
man_path_dest_dir="/usr/local/share/man" | |
man_pages_version="5.06" | |
linux_man_pages_download_link="https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-${man_pages_version}.tar.xz" |
This file contains hidden or 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
{ | |
"logPath": "/var/log/kern.log", | |
"lookback": "10m", | |
"startPattern": "Initializing cgroup subsys cpuset", | |
"bufferSize": 10, | |
"source": "npd", | |
"conditions": [ | |
{ | |
"type": "KernelDeadlock", | |
"reason": "KernelHasNoDeadlock", |
This file contains hidden or 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
type JsonSpecial float64 | |
func (value JsonSpecial) MarshalJSON() ([]byte, error) { | |
// Handle NaN, Inf and near-zero values marshalling | |
if math.IsNaN(float64(value)) || math.IsInf(fload64(value), 0) { | |
return json.Marshal(nil) | |
} else if math.Exp(float64(value)) == 1 { | |
return json.Marshal(0) | |
} |
This file contains hidden or 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
package main | |
import "fmt" | |
import "net" | |
func main() { | |
IPv4Loopback := net.ParseIP("127.0.0.1") | |
IPv6Loopback := net.ParseIP("::1") | |
NonIPv6LoopbackOne := net.ParseIP("2001:db8::1") | |
NonIPv6LoopbackTwo := net.ParseIP("fe80::1%lo0") |
This file contains hidden or 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
#/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
a = {3:4, 1:2, 5:6} | |
# Demo1 | |
# | |
# get a list of tuples consisting the dict, | |
# sort the list with tuple items | |
print sorted(a.items()) |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# | |
# Note: This may only work in CPython. For more info please see python doc about sys._getframe | |
import sys | |
# This will also show that function name(co_name) in python is bounded to function code(f_code). | |
# i.e., function assignment will not change the attribute of "co_name", function name |
This file contains hidden or 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
# [reference 1](http://www.unix.com/302702781-post2.html) | |
# awesome in using Ternary Operator | |
awk ' | |
BEGIN { | |
a["1"]="a"; | |
a["2"]="b"; | |
a["3"]="c"; | |
} | |
{ print !( $1 in a) ? "x" : a[$1]; } | |
' |
This file contains hidden or 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
single quote using in awk | |
###### Using Single QUote in awk script | |
function ltrim_single_quote(s) { return sub(/^\047+/, "", s); return s} | |
function rtrim_single_quote(s) { return sub(/'\047+$/, "", s); return s} | |
function trim_single_quote(s) { return ltrim_single_quote(rtrim_single_quote(s)) } | |
* [reference 1](http://www.gnu.org/software/gawk/manual/html_node/Quoting.html) | |