Skip to content

Instantly share code, notes, and snippets.

@b1uec0in
b1uec0in / k8s_list_node_resource_usage.py
Last active January 27, 2022 02:59
List kubernates node resource usage and sort by label.
# -*- coding: utf-8 -*-
"""
Usage:
# alias kres='python ~/environment/k8s_list_node_resource_usage.py'
# kres --all
node_name nodegroup instance_type cpu cpu_req (%) cpu_used (%) mem mem_req (%) mem_used (%) disk disk_used (%) mem_req/used mem_req/cpu mem_used/cpu
ip-10-121-3-44.ap-northeast-2.compute.internal base m5.large 2 600m 31% 306m 15% 8G 0.3G 3% 1.9G 26% 300.0G 6.5G 2% 13% 0.1 1.0
ip-10-121-3-153.ap-northeast-2.compute.internal be m5.2xlarge 8 5900m 74% 322m 4% 30G 8.8G 29% 5.7G 18% 300.0G 9.9G 3% 153% 1.1 0.7
ip-10-121-3-49.ap-northeast-2.compute.internal be m5.2xlarge 8 5900m 74% 262m 3% 30G 8.8G 29% 5.7G 19% 300.0G 8.9G 3% 153% 1.1 0.7
@b1uec0in
b1uec0in / 1.OpenWeatheMmapResult.xml
Last active August 29, 2015 14:27
현재 온도
<!--
http://api.openweathermap.org/data/2.5/weather?mode=xml&units=metric&q=Seoul
-->
<current>
<city id="1835848" name="Seoul">
<coord lon="126.98" lat="37.57"/>
<country>KR</country>
<sun rise="2015-08-11T20:44:47" set="2015-08-12T10:29:01"/>
@b1uec0in
b1uec0in / ClipboardComponent.java
Created May 26, 2015 10:38
Clipboard User Component
package com.applusform.testclipboard;
import android.content.ClipData;
import android.content.ClipDescription;
import android.content.ClipboardManager;
import android.content.Context;
import org.mospi.moml.framework.pub.objectapi.ObjectApiInfo;
public class ClipboardComponent extends DefaultObjectComponent {