log4e

log4e Log4e是一个免费的Eclipse Plugin,它可帮助你在你的Java工程中快速加入Log; 我们可以在http://log4e.jayefem.de/index.php/Download 网站上下载Log4e最新版本。下载后将相应文件夹拷贝到Eclipse的插件目录下,重新Eclipse,在首选项中会多出一个Log4e选项。 go to http://log4e.jayefem.de/ Eclipse Update URL: http://log4e.jayefem.de/update

2011-08-29 · 1 min · 12 words · -

javadoc

javadoc eclipse 在项目列表中按右键,选择Export (导出) ,然后在Export(导出)对话框中选择java下的javadoc. Java8下 忽略Javadoc编译错误 org.apache.maven.plugins maven-javadoc-plugin 2.10.3 attach-javadocs jar -Xdoclint:none http://www.javajia.com/JAVAbiancheng/7713.html

2011-08-28 · 1 min · 14 words · -

OpenVSCode Server

OpenVSCode Server podman run -d --name openvscode -p 1025:3000 -v "openvscode-data:/home/workspace:cached" gitpod/openvscode-server

2011-08-27 · 1 min · 12 words · -

gitea

gitea Gitea是一款使用Golang编写的可自运营的代码管理工具。 在这个领域,名气最响的应该是Gitlab。但实际使用中Gitlab也有点问题,首先就是资源占用。Gitlab是使用ruby编写的,好几年之前刚出来的时候,一台1G内存的虚拟主机连安装运行都做不到,着实震惊。时至今日都已经发展到了以docker镜像分发,gitlab仍旧会有体积和运行时资源占用的问题。另一点就是功能,对于一般标准团队来说,gitlab的功能太过于丰富,这是往好的地方说,往坏的地方说就是它包含了太多不需要的东西,而这些东西还占用磁盘和运行时资源。 于是着手查看开源的alternative方案,很快就找到了golang研发的gitea。使用golang研发的软件分发都很容易,体积小,安装使用简单,运行时占用资源少。且gitea的功能很完备,某些自身不具备的功能也能通过第三方来解决,比如CI就可以结合同样是golang研发的drone来实施。 https://xenojoshua.com/2019/12/gitea-note/

2011-08-19 · 1 min · 5 words · -

emacs 启动 窗口最大化

emacs 启动 窗口最大化 (defun fullscreen (&optional f) (interactive) (x-send-client-message nil 0 nil “_NET_WM_STATE” 32 ‘(2 “_NET_WM_STATE_MAXIMIZED_VERT” 0)) (x-send-client-message nil 0 nil “_NET_WM_STATE” 32 ‘(2 “_NET_WM_STATE_MAXIMIZED_HORZ” 0))) (add-hook ‘window-setup-hook ‘fullscreen)

2011-08-18 · 1 min · 29 words · -

RSA

RSA Java cipher What is Java Cipher? 在计算机系统中,Java Cryptography Architecture (JCA) 是一个使用 Java 编程语言处理加解密相关操作的框架。它是 Java 安全 API 的一部分,最早是在 JDK1.1 版本的java.security包中引入的。JCA 基于”provider“架构,并且包含一系列不同作用的 API,比如加密、秘钥生成与管理、安全随机数生成、证书验证等等。这些 API 为开发人员提供了在应用代码中集成安全操作的简易方式。 Java Cryptography Extension (JCE) 是 Java 平台的一个官方标准扩展,也是 JCA 体系的一部分。JCE 为加密、密码生成和管理、消息认证码等操作提供了一个框架和具体实现。其实 Java 平台本身就包含摘要生成、数字签名等操作的接口和具体实现,JCE 提供了一个更丰富的补充。而javax.crypto.Cipher 类则是 JCE 扩展的核心。 Cipher 实例化 我们可以通过调用静态getInstance方法,传入具体的转换模式名称,就可以实例化一个 Cipher 对象。下面是实例化 Cipher 的示例代码: public class Encryptor { public byte[] encryptMessage(byte[] message, byte[] keyBytes) throws InvalidKeyException, NoSuchPaddingException, NoSuchAlgorithmException { Cipher cipher = Cipher.getInstance(“AES/ECB/PKCS5Padding”); //… } } 转换模式 (transformation) 的具体含义 转换模式 (transformation) 是 Cipher 实例化的一个核心参数。transformation 参数的格式是: 算法/工作模式/填充模式(algorithm/mode/padding),如上述示例中AES/ECB/PKCS5Padding。 ...

2011-07-28 · 1 min · 126 words · -

vscode, java, remote ssh

vscode, java 在vscode 中下载以下插件 Extension Pack for Java Language Support for Java™ by Red Hat Debugger for Java Test Runner for Java Maven for Java Project Manager for Java Extension Pack for Java java config

2011-07-18 · 1 min · 35 words · -

gitosis install

gitosis install 用apt-get update 和 apt-get upgrade 更新当前系统. 安装OpenSSH Server: sudo apt-get install openssh-server 修改ssh服务端配置文件/etc/ssh/sshd_config Port 22 # 修改成你想要的登陆端口,如2222 PermitRootLogin no # 禁止root用户登陆 检查密钥的用户和权限是否正确,默认打开的 设置ssh在接收登录请求之前是否检查用户家目录和rhosts文件的权限和所有 权。这通常是必要的,因为新手经常会把自己的目录和文件设成任何人都有写权限。 StrictModes yes RSAAuthentication yes # 启用 RSA 认证 PubkeyAuthentication yes # 启用公钥认证 ServerKeyBits 1024 #将ServerKey强度改为1024比特 PermitEmptyPasswords no # 禁止空密码进行登录 #修改完成后,重启ssh服务: sudo /etc/init.d/ssh restart 4.安装git: sudo apt-get install git-core 5.安装gitosis (1)建一个临时文件夹,用来存放下载的gitosis文件,如 mkdir ~/tmp (2)安装gitosis cd ~/tmp git clone git://eagain.net/gitosis git://eagain.net/gitosis.git cd gitosis sudo python setup.py install ...

2011-05-04 · 1 min · 106 words · -

git diff

git diff git diff 查看尚未暂存的文件更新了哪些部分 git diff filename 查看尚未暂存的某个文件更新了哪些 git diff –cached 查看已经暂存起来的文件和上次提交的版本之间的差异 git diff –cached filename 查看已经暂存起来的某个文件和上次提交的版本之间的差异 git diff ffd98b291e0caa6c33575c1ef465eae661ce40c9 b8e7b00c02b95b320f14b625663fdecf2d63e74c 查看某两个版本之间的差异 git diff ffd98b291e0caa6c33575c1ef465eae661ce40c9:filename b8e7b00c02b95b320f14b625663fdecf2d63e74c:filename 查看某两个版本的某个文件之间的差异 显示颜色 ~/.gitconfig 中加三行 [color] status = auto branch = auto ui = auto

2011-05-02 · 1 min · 41 words · -

emacs copy current line

emacs copy current line ;;copy current line (global-set-key (kbd “C-c C-w”) ‘copy-lines) (defun copy-lines(&optional arg) (interactive “p”) (save-excursion (beginning-of-line) (set-mark (point)) (next-line arg) (kill-ring-save (mark) (point)) ) )

2011-04-30 · 1 min · 28 words · -

emacs 自动补全括号

emacs 自动补全括号 ;;; use groovy-mode when file ends in .groovy/.gradle or has #!/bin/groovy at start (autoload ‘groovy-mode “groovy-mode” “Groovy editing mode.” t) (add-to-list ‘auto-mode-alist ‘(".groovy$" . groovy-mode)) (add-to-list ‘interpreter-mode-alist ‘(“groovy” . groovy-mode)) (add-to-list ‘auto-mode-alist ‘(".gradle$" . groovy-mode)) ;;auto pair (defun code-mode-auto-pair () “autoPair” (interactive) (make-local-variable ‘skeleton-pair-alist) (setq skeleton-pair-alist ‘( (?` ?` _ “”") (?( ? _ " )") (?[ ? _ " ]") (?{ n > _ n ?} >) ...

2011-04-23 · 1 min · 99 words · -

emacs auto backup

emacs auto backup (setq backup-directory-alist ‘(("" . “~/backup/emacs/backup”))) (setq-default make-backup-file t) (setq make-backup-file t) (setq make-backup-files t) (setq version-control t) (setq kept-old-versions 2) (setq kept-new-versions 10) (setq delete-old-versions t)

2011-04-23 · 1 min · 29 words · -

emacs 插件安装

emacs 插件安装 #edis .emacs (add-to-list 'load-path "/home/wiloon/.emacs.d/lisp") ;;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start (autoload 'groovy-mode "groovy-mode" "Groovy editing mode." t) ;;files end with .groovy , open as groovy mode (add-to-list 'auto-mode-alist '(".groovy$" . groovy-mode)) (add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))

2011-04-23 · 1 min · 46 words · -

emacs 查找替换字符串

emacs 查找替换字符串 M-% (然后会出现Query replace的字样) Query replace:<被替换字符串> Query replace <被替换字符串> with:<替换字符串> Query replacing <被替换字符串> with <替换字符串>: (? for help) **查询替换命令的选项如下: ** y 或者 空格 键 替换搜索到的字符串 n 或者 Del 键 取消替换搜索到的字符串 ^ 回到前一个搜索到的字符串 ! 替换所有没有替换的与模式匹配的字符串 ESC 键 退出本次查询搜索

2011-04-16 · 1 min · 38 words · -

emacs 配置/config

emacs 配置/config 中文环境 之后,在~/.Xresources (如果没有的话,自己建一个) ,加入下面内容: Xft.antialias: 1 Xft.hinting: 1 Xft.hintstyle: hintfull 调用X Window系统中的字体,并且开启抗锯齿。 之后在~/.emacs下面加入 (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(inhibit-startup-screen t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ; source: http://steve.yegge.googlepages.com/my-dot-emacs-file (defun rename-file-and-buffer (new-name) "Renames both current buffer and file it's visiting to NEW-NAME." (interactive "sNew name: ") (let ((name (buffer-name)) (filename (buffer-file-name))) (if (not filename) (message "Buffer '%s' is not visiting a file!" name) (if (get-buffer new-name) (message "A buffer named '%s' already exists!" new-name) (progn (rename-file filename new-name 1) (rename-buffer new-name) (set-visited-file-name new-name) (set-buffer-modified-p nil)))))) (setq frame-title-format "emacs@%b") ; Set default window size (setq default-frame-alist \`((height . 35) (width . 123))) ;; Set font ;;设置DejaVu Sans Mono为默认情况下的字体,字号为12号。 ;;然后再设置一个字符集,设置字符集字体为WenQuanYi Micro Hei(文泉驿微米黑),当编码为非拉丁字母时, ;;系统自动会在/etc/fonts/cond.avail中寻找编码,比如汉字,就对应han,泰文就对应thai,等等. (set-default-font "DejaVu Sans Mono-11") (set-fontset-font (frame-parameter nil 'font) 'han '("WenQuanYi Micro Hei")) ;; the following function is to scroll the text one line down while keeping the cursor (defun scroll-down-keep-cursor () (interactive) (scroll-down 3)) ;; set cursor as bar (setq-default cursor-type \`bar) ;; hide tool bar (tool-bar-mode 0) ;; hide menu bar (menu-bar-mode 0) ;; hide scroll bar (scroll-bar-mode 0) ;;enable select to clipboard (setq x-select-enable-clipboard t) ;;允许使用C-z作为命令前缀 (define-prefix-command 'ctl-z-map) (global-set-key (kbd "C-z") 'ctl-z-map) ;;用C-z i快速打开~/.emacs文件。 (defun open-init-file ( ) (interactive) (find-file "~/.emacs")) (global-set-key "\C-zi" 'open-init-file) ;;启用ibuffer支持,增强\*buffer\* (require \`ibuffer) (global-set-key (kbd "C-x C-b") \`ibuffer) ;show line number (global-linum-mode t) ;;auto backup (setq backup-by-copying t ;自动备份 backup-directory-alist '(("." . "~/.saves")) ;自动备份在目录"~/.saves"下 delete-old-versions t ;自动删除旧的备份文件 kept-new-versions 6 ;保留最近的6个备份文件 kept-old-versions 2 ;保留最早的2个备份文件 version-control t) ;多次备份 ;显示光标所在的行号列号 (setq column-number-mode t) http://murphytalk.github.io/posts/2005/03/03/gai-bian-emacschuang-kou-biao-ti-ge-shi/#.WJpliCFNzWU ...

2011-04-16 · 2 min · 319 words · -

vim 宏录制

vim 宏录制 在编辑某个文件的时候,可能会出现需要对某种特定的操作进行许多次的情况,以编辑下面的文件为例: ;=====================================================================================;This is a sample configuration file when upgrading XXX using InstallShield.;Author: ini_always;Date: 8/24/2011;Last modified: 9/20/2011;Note: Install script does NOT verify whether the configuration file is in a "WELL";format, a WRONG format may lead to installation failure.;If more information is needed, please check the document for details.;===================================================================================== 这是一个ini类型的配置文件,可以看到每一行的最前面有一个逗号,现在如果需要将每行前面的逗号去掉,怎么办?在第一行行首按x,然后按j,然后按x…这样重复下去?确实,我最开始也是这样的,但如果这个文件有100行要这样修改呢?或者1000行? 好吧,少废话,进入正题。所谓宏,在vim里面是指某种特定顺序的一系列操作,我们可以录制自己的操作序列,然后重复这个序列多次,以简化某种重复的操作。vim宏有录制和播放的过程,录制就是你教给vim该怎么操作,播放就是vim照着你教的进行自动操作。因此,对于上面的文件处理,首先要进行宏录制: 把光标定位在第一行; 在normal模式下输入qa(当然也可以输入qb, qc, etc,这里的a, b, c是指寄存器名称,vim会把录制好的宏放在这个寄存器中)(PS: 如果不知道什么是vim的寄存器,请自行放狗搜之); 正常情况下, vim的命令行会显示"开始录制"的字样,这时候,把光标定位到第一个字符 (按0或者|) ,再按x删除,按j跳到下一行; normal模式下输入q,结束宏录制。 好了,经过以上步骤,我们定义了一个存储在寄存器a中的宏,它的操作序列是: 0->x->j,也就是跳到行首,删除,跳到下一行。 现在,第一行已经删除了行首的逗号,而且光标也已经在第二行,现在,在normal模式下输入@a,以播放我们刚录制好的存在寄存器a中的宏。于是,第二行行首的逗号也被删除,光标停在了第三行。 这也不简单啊?你肯定会这样想,要删除100行,我还得输入100个@a,我还不如手动删除呢。呵呵,vim早就想到了,输入7@a,好了,剩下的7行全部搞定了。 (PS: 在命令前面加数字,就是代表要执行这个命令多少次) ...

1 min · 71 words · -