slackware

slackware Slackware Linux http://baike.baidu.com/view/10899.htm Slackware Linux是由Patrick Volkerding制作的GNU/Linux发行版,它是世界上依然存活的最久的Linux发行版,在它的

Hostname, 主机名

Hostname 主机名里不能用 ., 遇到 . 会被截断, 也不能用下划线, 下划线会被忽略掉. hostnamectl, 查看主机信息, 查看主机名, 查看机器名, 查 hostname 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Go Synchronization, 同步

Go Synchronization, 同步 Go语言在设计上对同步 (Synchronization,数据同步和线程同步)提供大量的支持,比如 goroutine和channel同

linux shutdown

‘linux shutdown’ shutdown是最安全的关机和重启命令,平时使用时推荐使用shutdown命令关机和重启。 shutdown 【语法】shutdown [选项] [参数] 【

ssh-keygen

ssh-keygen, linux 生成 ssh 密钥 ssh-keygen 是用于为 SSH 创建新的身份验证密钥对的工具。此类密钥对用于自动登录,单点登录和验证主机。 目前广泛的用在 linux 服务验证、git 身份验证

initcwnd

initcwnd initial congestion window parameter (initcwnd) Changing initcwnd Adjusting the value of the initcwnd setting on Linux is simple. Assuming we want to set it to 10: Step 1: check route settings. sajal@sajal-desktop:~$ ip route show 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100 metric 1 169.254.0.0/16 dev eth0 scope link metric 1000 default via 192.168.1.1 dev eth0 proto static sajal@sajal-desktop:~$ Make a note of the line starting with default.

linux 运行级, runlevel

linux 运行级, runlevel 作为默认,REDHAT Linux 9.0在启动时会自动启动X-Window进入图形化操作界面。而许多Linux铁杆玩家已经习惯了在Cons

Closure Tools

Closure Tools Google已经基于Apache License 2.0把Closure Stylesheets开源,这种工具属于Closure Tools包之内,在处理C

HTML5

HTML5 <!-css-> Hello html 文档申明: Doctype: css:可以不写type="text/css"了,浏览器只要看到rel="styleshe

观察者模式, Observer pattern

观察者模式, Observer pattern 定义对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都得到通知并被自动更新。 观察者模式 (Obse

Gradle basic, command

Gradle basic, command create project structure 1 gradle init --type java-application --dsl kotlin command 1 gradle build install 1 2 3 4 # archlinux sudo pacman -S gradle # mac brew install gradle windows install gradle 1 scoop install main/gradle-bin download latest version of gradle from http://www.gradle.org/downloads.html extract the gradle package sudo emacs ~/.bashrc add the gradle to path. set PATH=$JAVA_HOME/bin:/home/wiloon/program/gradle-1.0-milestone-3/bin:$PATH export PATH restart the system 1 2 3 4

STDIN STDOUT, STDERR

STDIN STDOUT, STDERR Unix/Linux/BSD 都有三个特别文件,分别 标准输入 即 STDIN , 在 /dev/stdin , 一般指键盘输入, shell里代号是 0 标准输出 STDOUT, 在 /dev/stdout, 一般指终端(terminal), 就是显示

TimeUnit

TimeUnit http://chenjumin.iteye.com/blog/2182171 //关于秒的常用方法 TimeUnit.SECONDS.toMillis(1) 1秒转换为毫秒数 TimeUnit.SECONDS.toMinutes(60) 60秒转换为分钟数 TimeUnit.SECONDS.sleep(5) 线程休眠5秒 TimeUnit.SECONDS.convert(1, TimeUnit.MINUTES) 1分钟转换为秒数 //TimeUnit.DAYS 日的工具类 //TimeUnit.HOURS 时的工具类 //TimeUnit.MINUTES 分的工具类 //TimeUnit.SECONDS 秒的工

commons-logging Log4J

commons-logging Log4J commons-logging vs Log4J Log4J是一个功能很强大的日志记录组件,它提供了丰富的日志记录功能,它本身和commons-logging没有什么关系,也就是说

Debian/Ubuntu 系统 Update-rc.d

Debian/Ubuntu 系统 Update-rc.d https://wangyan.org/blog/ubuntu-update-rc-d.html Ubuntu或者Debian系统中update-rc.d命令,是用来更新系统启动项的脚本。这些脚本的链接位于/etc/rcN.d/

分布式ID, 雪花算法

分布式ID, 雪花算法 https://zhuanlan.zhihu.com/p/85837641 雪花算法这一在分布式架构中很常见的玩意,但一般也不需要怎么去深入了解,一方面一般个人项目用不到分布式之类的大型架构,另

tomcat config, server, user

tomcat config, server, user server Listener 监听器,用来监听某些事件的发生。 VersionLoggerListener,启动时对tomcat,java,操作系统信息打印日志

shell逻辑运算符

shell逻辑运算符 -d 常用!侦测『目录』是否存在 -b 侦测是否为一个『 block 档案』 -c 侦测是否为一个『 character 档案』 -S 侦测是否为一个『 socket 标签档案』 -L 侦测是否

missing LSB tags and overrides

missing LSB tags and overrides update-rc.d tomcat defaults pop out warning message missing LSB tags and overrides add the following lines into the script BEGIN INIT INFO Provides: tomcat Required-Start: $remote_fs $syslog Required-Stop: $remote_fs $syslog Default-Start: 2 3 4 5 Default-Stop: 0 1 6 Short-Description: Start tomcat at boot time Description: Enable service provided by tomcat. END INIT INFO