Home
Get sshkey finger print
Since recently github got a security issue, we need to update the sshkey, then require you to check the finger print, below is the code to get finger print.
$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
08 Mar 2012
Standard clearfix
.clearfix {
zoom: 1;
}
.clearfix:after {
content: '';
clear: both;
display: table;
}
07 Mar 2012
All selector of css3
*
E
.class
#id
E F
E > F
E + F
E[attribute]
E[attribute=value]
E[attribute~=value]
E[attribute|=value]
:first-child
:lang()
:before
::before
:after
::after
:first-letter
::first-letter
:first-line
::first-line
E[attribute^=value]
E[attribute$=value]
E[attribute*=value]
E ~ F
:root
:last-child
02 Mar 2012
Ruby regexp detect CJK character
#encoding: UTF-8
class String
def contains_cjk?
!!(self =~ /\p{Han}|\p{Katakana}|\p{Hiragana}|\p{Hangul}/)
end
end
strings= ['中国国際放送局', '광고 프로그램', '真是牛阿', 'This is english.']
strings.each{|s| puts s.contains_cjk?}
Result will be:
true true true false
01 Mar 2012
How to add default encoding to all files in project?
This is a very helpful tool to add “# -- encoding : utf-8 --“ to all .rb file.
- https://github.com/m-ryan/magic_encoding
01 Mar 2012