python snapshot.py 1.flv snapshot.jpg 300 300 --run
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
| "" required! | |
| set nocompatible | |
| syntax on | |
| set t_Co=256 | |
| filetype on | |
| colorscheme desert | |
| set title | |
| set number |
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
| # 列出所有节点的资源 | |
| $ kubectl get nodes -o custom-columns=NAME:metadata.name,RES:status.allocatable | |
| NAME RES | |
| 172.27.128.108 map[cpu:40 ephemeral-storage:22823831300Ki hugepages-1Gi:0 hugepages-2Mi:0 memory:528168460Ki pods:220] | |
| 172.27.128.144 map[cpu:40 ephemeral-storage:22823830276Ki hugepages-1Gi:0 hugepages-2Mi:0 memory:527968996Ki nvidia.com/gpu:4 pods:220] | |
| 172.27.128.150 map[cpu:40 ephemeral-storage:22823831300Ki hugepages-2Mi:0 memory:528166440Ki nvidia.com/gpu:4 pods:220] | |
| # 列出所有pod占用的资源 | |
| kubectl get pod --all-namespaces -o custom-columns=NAMESPACES:.metadata.namespace,NAME:.metadata.name,RES:.spec.containers[*].resources | |
| NAMESPACES NAME RES |
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
| # pane配色修改为红色 | |
| set -g pane-active-border-fg red | |
| # 状态栏修改为红色 | |
| set -g status-fg red | |
| # 状态栏当前窗口文字颜色为白色 | |
| set -g window-status-current-fg white |
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
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.net.InetSocketAddress; | |
| import com.sun.net.httpserver.HttpExchange; | |
| import com.sun.net.httpserver.HttpHandler; | |
| import com.sun.net.httpserver.HttpServer; | |
| public class SimpleHTTPServer { |
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 | |
| /sbin/modprobe nvidia | |
| if [ "$?" -eq 0 ]; then | |
| # Count the number of NVIDIA controllers found. | |
| NVDEVS=`lspci | grep -i NVIDIA` | |
| N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l` | |
| NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l` |
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
| public enum JedisInfoSection { | |
| server, | |
| clients, | |
| memory, | |
| persistence, | |
| stats, | |
| replication, | |
| cpu, | |
| commandstats, | |
| cluster, |
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
| import java.util.Arrays; | |
| /** | |
| * use BytesBitSet avoid to converting between long[](java.util.BitSet) and byte[] | |
| * | |
| * @author yu | |
| */ | |
| public class BytesBitSet { | |
| /** | |
| * BitSets are packed into arrays of "words". Currently a word |
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 -*- | |
| import glob | |
| from os.path import join, getmtime | |
| if __name__ == '__main__': | |
| html = "<html><head><titile></titile>" | |
| html += '<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">' |
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 -*- | |
| import asynchat | |
| import asyncore | |
| import logging | |
| import random | |
| import socket | |
| import struct | |
| import time |
NewerOlder