Recently, I've encounter a problem when migrating CryptoJS and PHP backend.
In CryptoJS, iv will be assigned automatically if iv is not given. But in PHP, NULL vectors will be used as iv...
So the result generated by CryptoJS cannot be decoded by PHP.
Hence, I've been digging up the solution to overcome this problem....
And the following code segment is what I found and tested.
Feel free to copy this. [ JsFiddle Test ]
BTW, This site can be used to test the encoding result. ( This site uses PHP as its backend... )
Sep 22, 2014
Aug 20, 2014
Disabling genome-ssh-askpass
I've encountered an issue trying to pull commits to a remote server by remote controlling via ssh using MacOSX Terminal.
However, the server keeps returning the following error
unset SSH_ASKPASS
You can add this line to rc.local or ~/.bash_profile if you wanna disable it forever and ever~
Referenced from:
[Blog @ Codonomics: How to disable gnome-ssh-askpass?]
However, the server keeps returning the following error
(gnome-ssh-askpass:18368): Gtk-WARNING **: cannot open display:
The remote server is a linux using gnome desktop environment. But the GUI cannot displayed when using tty mode. So I survey the Internet and found the following solution.
unset SSH_ASKPASS
You can add this line to rc.local or ~/.bash_profile if you wanna disable it forever and ever~
Referenced from:
[Blog @ Codonomics: How to disable gnome-ssh-askpass?]
Tags
Linux,
Shell Script
Mar 10, 2014
Rule of linux kernel's versions
Linux kernel version is constructed by parts [ x.y.z ]
x - main version
y - even number means that the version is stable
z - error patch times
x - main version
y - even number means that the version is stable
z - error patch times
Mar 8, 2014
Modify phpMyAdmin's session timeout duration
Insert the following line into config.inc.php
$cfg['LoginCookieValidity'] =;
$cfg['LoginCookieValidity'] =
Tags
PHP
Installing RHEL EPEL Repo on Centos 5.x or 6.x
[ CentOS 5.x ]
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo rpm -Uvh epel-release-5*.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm
[ CentOS 6.x ]
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
remi repo is disabled by default, don't forget to enable it!
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo rpm -Uvh epel-release-5*.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm
[ CentOS 6.x ]
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
remi repo is disabled by default, don't forget to enable it!
Tags
Linux
Feb 22, 2014
Some stupid keywords....
mod_vhost_alias
yum --enablerepo=repo,repo,repo --disablerepo=repo,repo,repo --nogpgcheck
git archive
find -regex -exec
$EUID
yum --enablerepo=repo,repo,repo --disablerepo=repo,repo,repo --nogpgcheck
Tags
Keywords
Feb 21, 2014
Feb 19, 2014
Remove app from Security & Privacy -> Accessibility
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/Tcc.db 'delete from access where client like "%appnamehere%"'
Replace "appnamehere" with the name of the app as it appears in the Accessibility list (keep the % signs).
That's all...
Jan 29, 2014
HTML Vertical Align Middle Techinque
I've been encounter some critical layout structure requirements - Vertical Align Middle.
Luckily, I found a solution on
In case that I'll need them in the future, I decide to leave myself some breadcrumbs here...
Here's the final example in jsFiddle.
And here's the referenced original post.
And the followings are contents in jsFiddle...
Tags
HTML,
Javascript
Subscribe to:
Posts (Atom)