filetype off
set rtp+=~/.vim/bundle/Vundle.vim
-"call vundle#begin()
+call vundle#begin()
"Plugin 'VundleVim/Vundle.vim'
-"Plugin 'fatih/vim-go'
+Plugin 'fatih/vim-go'
"Plugin 'Valloric/YouCompleteMe'
"Plugin 'Lokaltog/vim-powerline'
"Plugin 'scrooloose/nerdtree'
-"call vundle#end()
+call vundle#end()
filetype plugin indent on
" youcompleteme插件相关配置
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
+export PATH=$HOME/go/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/ace/.oh-my-zsh"
plugins=(
git
zsh-autosuggestions
-# incr
)
source $ZSH/oh-my-zsh.sh
export PATH=$PATH:/usr/local/opt/go/libexec/bin
export PATH=$PATH:/Users/ace/sys/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/bin
export RTOS_PATH=$HOME/workspace/acecode/rtos/
+
CC = gcc
CPP = g++
BINS = countc htc
-SCRIPTS = cls cs
+SCRIPTS = cls cs int2ip
DST = $(HOME)/.local/bin/
%.o : %.c
"fmt"
"image"
"image/color"
- "image/jpeg"
+ "image/png"
+ //"image/jpeg"
"log"
"os"
)
f, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE, 0600)
defer f.Close()
- jpeg.Encode(f, img, nil)
+ //jpeg.Encode(f, img, nil)
+ png.Encode(f, img)
}
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# ------------------------------------------------------------------------
+# File Name: int2ip
+# Author: Zhao Yanbai
+# 2021-01-19 13:14:17 Tuesday CST
+# Description: none
+# ------------------------------------------------------------------------
+
+
+import socket
+import struct
+import sys
+
+if len(sys.argv) == 1 :
+ print("{0} <intip1> <intip2> ...".format(sys.argv[0]))
+
+for ipint in sys.argv[1:] :
+ try :
+ ipint = int(ipint)
+ except :
+ print("{0}: is not digital".format(ipint))
+ continue
+
+ ip1 = socket.inet_ntoa(struct.pack('I',ipint))
+ ip2 = socket.inet_ntoa(struct.pack('I',socket.htonl(ipint)))
+
+ print("{0}: {1} {2}".format(ipint, ip1, ip2))