Git hook

和其他 Version Control System 一样,git 也有方法来触发自定义脚本。 两类 hooks: client hooks server hooks Installing a hook hook 脚本在 hooks 子目录下,大部分是 .git/hooks 下。在使用 git init 之后就会初始化一些 sample 脚本,在 hooks 下都以 .sample 结尾,如果要使用则需要将 .sample 后缀去掉。 Client-side Hooks pre-commit pre-commit hook 会在输 Read more ...

2015-11-21 git , git-hook , vcs

Java 查漏补缺之 throwable vs exception 区别

在 java 中 try catch 的时候,大多数情况下是使用的 Exception,但是今天看代码有些却 catch 了 Throwable,于是总结下。 看 JDK 源码知道 Throwable 是 Exception 的超类,也同样是 Error 的超类,所以可想而知,如果 catch 了 Throwable,那么会连同 Exception 和 Error 一同 catch,这样也不会丢异常。 Throwable 是所有异常的根,java.lang.Throwable Error 是错误,java.lang.Error,Error Read more ...

2015-11-20 java , jdk , exception

Awesome vim plugin website collections

功能比较强大,比较重要的几个 Plugin 都在单独的文章中做了介绍,这里单独的列举一些特定场景使用的插件,带有语法高亮等的插件,比如针对 Nginx 配置, Dockerfile 文件等等的插件。 Plugins 优化 nginx 配置 Plug 'chr4/nginx.vim' Language Related Python Go Plug 'fatih/vim-go' js Plug 'kchmck/vim-coffee-script' " CoffeeScript Plugin 'mtscout6/vim-cjsx' vi Read more ...

2015-11-03 vim , awesome , collection , collections

每天学习一个命令:tr 命令行届的翻译

tr 是 translate 的缩写。 tr [OPTION] SET1 [SET2] translate SET1 to SET2 转换大小写 cat "abc" | tr a-z A-Z cat "abc" | tr [:lower:] [:upper:] 将空白转换成 TABs echo "a b" | tr [:space:] '\t' 转换括号 echo ‘{abc}’ | tr ‘{}’ ‘()’ (abc) delete set 删除 -d 指定的字符集 echo "abc" | tr -d 'a' bc Read more ...

2015-11-02 linux , tr , command

lua installation

Install Lua in Linux You can install lua in Linux Mint/Debian/Ubuntu.. You can find all verions of lua here. wget http://www.lua.org/ftp/lua-5.3.1.tar.gz tar zxf lua-5.3.1.tar.gz cd lua-5.3.1 make linux test Finally, if test have passed, then install lua into the right place b Read more ...

2015-10-31 lua , linux

Things to do after install Linux Mint

I have changed my desktop environment to Linux, and after I tried Ubuntu and Debian, I finally choose the Linux Mint distribution. I think there are some reasons why this distribution take the first place in distrowatch. User-friendly desktop environment and convenient software p Read more ...

2015-10-24 linux , linux-mint , applications

在 Linux 下安装字体

Most of computer fonts people using are TrueType fonts. TrueType fonts end with .ttf, which stand for TrueType Font. This tutorial shows how to install TrueType fonts in Linux (Debian, Ubuntu, Linux Mint, etc). Linux 字体文件夹 Linux 下默认安装的字体都被存放在 /usr/share/fonts 下。 如果是个人使用可以将字体文件 Read more ...

2015-10-21 linux , linux-mint , fonts , font , truetype

git presentation

之前做过一个简单的 git 的介绍,下面是 PPT 的摘录。 What is Git Git is a free and open source distributed version control system(VCS) designed to handle everything from small to very large projects with speed and efficiency. Git 是一个分散式版本控制软件,最初由林纳斯·托瓦兹(Linus Torvalds)创作,于 2005 年以 GPL 发布。最初目的是为 Read more ...

2015-10-12 git , linux , version-control

Java 中时间相关处理工具类库 joda time

注意如果使用 Java SE 8 及以上,建议使用 java.time (JSR-210) 来代替使用 Joda-time。 Java 中日期,时间处理类库 Joda time 依赖 <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.10.2</version> </dependency> 最新的版本官 Read more ...

2015-10-11 java , joda-time , jdk8

wget 常用命令

wget 是一个非常常用的下载命令,但其实 wget 非常强大,这里就列举一些很常用的选项。 下载整站 备份或者下载整站: wget -r -np http://www.mysite.com/Pictures/ wget -r --no-parent --reject "index.html*" http://www.mysite.com/Pictures/ 说明: -r 表示 recursively 递归下载 -np 或者 --no-parent 表示不延伸到父目录,当想要下载特定目录下的文件时,记得加上这个选项 当然如果你的目 Read more ...

2015-10-03 wget , curl , linux , linux-command , backup

最近文章

  • Trae 字节推出的一款本地 AI 代码编辑器 前两天看到字节也发布了一款基于 Claude Sonnet 3.5 的 IDE,起名叫做 Trae(这个名字是 The Real AI Engineer 的缩写),对标我之前介绍过的 Cursor,Windsurf 等等代码编辑器,都是以 AI 为切入点,辅助进行编码,不仅可以进行自动代码生成补全,还可以理解上下文,通过超长的 Context 提供多文件生成修改的能力。
  • Tianji 开源的网站流量分析,服务监控系统 Tianji 是一个 All in One 的网站分析(Website analytics),服务监控(Uptime Monitor),业务告警(Server Status)的系统。
  • Cline 强大的 AI 辅助编程工具 之前的文章中介绍过 AI 支持的编辑器 Cursor,还介绍过 Codium 推出的 AI 智能编辑器 Windsurf,很早之前也介绍过如何在 JetBrains IntelliJ IDEA 中使用 GitHub Copilot 以及如何在命令行终端下使用 GitHub Copilot CLI 可以在终端下完成一些 AI 智能补全,提示等等操作。
  • 利用 PirateShip 打单节省美国转运费用 之前因为申请 [[ITIN]] 已经申请了一个 Anytime Mailbox 美国的私人地址,但是如果直接让 Anytime Mailbox 房东转寄邮件,价格非常昂贵,以我自己的经验只邮寄 0.1 磅不到的信件,房东报价就高达 70 美元。所以这篇文章我就总结一下如何与 Anytime Mailbox 的房东进行沟通并让房东使用我们自己提供的邮寄单,将我的物品从美国寄送回来。
  • Mint Mobile 又一家美国移动网络运营商 在之前的一篇文章中,因为在 Mint Mobile 上的商城上购买了 299 美元 Pixel 9 手机,暂时了解到了 Mint Mobile 这家公司,这里再来详细地介绍一下这家公司。