如何批量删除twitter的喜欢

用chrome打开twitte的喜欢页面,F12打开控制台,在Console中执行以下脚本即可。

setInterval(
    function() {
        t = $( 'button.ProfileTweet-action--unfavorite' ); // get unfavourite buttons
        for ( i = 0; true; i++ ) { // count
            if ( i >= t.length ) { // if items remain to unfavourite
                window.scrollTo( 0, $( document ).height() ); // scroll to bottom of page - loads more
                return
            }
           $( t[i] ).trigger( 'click' ).remove(); // click and remove button from dom
        }
    }, 2000
)

mysql登录时出现的问题

最近登录mysql时出现如下错误:

mysql: Character set 'uft8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
mysql: Character set 'uft8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
ERROR 2019 (HY000): Can't initialize character set uft8 (path: /usr/share/mysql/charsets/)

查阅了很多资料都未能解决,最后想起为了支持中文修改了my.cnf文件。当时在这个文件中添加了如下几行:

[mysqld]
character-set-server=utf8

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8

问题恰恰出现在这里,后面指定的utf8必须改为大写。修改如下解决问题。

[mysqld]
character-set-server=UTF8

[client]
default-character-set=UTF8

[mysql]
default-character-set=UTF8