SphinxQL FACET is Awesome

FACET clause. This Sphinx specific extension enables faceted search with subtree optimization. It is capable of returning multiple result sets with a single SQL statement, without the need for complicated multi-queries. FACET clauses should be written at the very end of SELECT statements with spaces between them.

FACET {expr_list} [BY {expr_list}] [ORDER BY {expr | FACET()} {ASC | DESC}] [LIMIT [offset,] count]
SELECT * FROM test FACET brand_id FACET categories;
SELECT * FROM test FACET brand_name BY brand_id ORDER BY brand_name ASC FACET property;

The FACET Feature

SphinxQL FACET is Awesome by @sskaje: https://sskaje.me/2015/06/sphinxql-facet-awesome/

EdgeRouter同时更新TunnelBroker和HE.NET DDNS

之前文章里TunnelBroker for EdgeRouter Lite提及TunnelBroker和He.net DDNS同时更新的解决方案,后来证实不是那么稳定。

在TunnelBroker.net的Tunnel Details里,选择Advanced,最下边的一组配置是HE Dynamic DNS Settings
Hostname填入HE.NET的DDNS域名,API Key填DDNS域名的更新key。


EdgeRouter同时更新TunnelBroker和HE.NET DDNS by @sskaje: https://sskaje.me/2015/06/edgerouter%e5%90%8c%e6%97%b6%e6%9b%b4%e6%96%b0tunnelbroker%e5%92%8che-net-ddns/

Incoming search terms:

Factoring Integer on OS X with CADO-NFS

Environment: Mac OS X 10.10, MacPorts 2.3.3, CADO-NFS 2.1.1


Make sure all dependencies are installed.
CADO-NFS Required software tools

Required software tools

GMP: usually installed in most Linux distributions (on some Linux distributions you need to install libgmp*-dev including gmp.h, which is not installed by default). Note: make sure to configure GMP with –enable-shared so that a shared library is installed (libgmp.so under Linux) otherwise CADO-NFS might not compile. GMP 5 (or newer) is required.
GCC 4.4 or later ; some others compilers might work, but are unsupported. Both C and C++ compilers are required, with C99 support.
GNU make and CMake (2.6.3 or later) for building (CMake is installed on the fly if missing. This feature requires an Internet connection.)
Support for posix threads.
The main cadofactor.py script uses a lot of unix tools: Python, Python3, ssh, rsync, gzip to mention but a few.


just type make after tar xvf



Using msieve 1.51 from MacPorts and CADO-NFS. The integer is 179399505810976971998364784462504058921, used in old versions of IntelliJ IDEA.
Msieve find its factor in 1 second, no extra parameter used.


Make sure your hostname is added to /etc/hosts, or you’ll get error like:

And, the number is to small for CADO-NFS, you have to copy a params file for this.

Here is the output of factor.sh

Maybe CADO-NFS is not really good for small integers.

Factoring Integer on OS X with CADO-NFS by @sskaje: https://sskaje.me/2015/06/factoring-integer-os-cado-nfs/

Incoming search terms:

Debian Reset MySQL Root Password

Only for mysql server installed by ‘apt-get‘.

Under System root and localhost only.

You can find password for ‘debian-sys-maint‘, you can update root password by logging in as this user.

If you have replication, you may need to update all slaves manually.

Debian Reset MySQL Root Password by @sskaje: https://sskaje.me/2015/06/debian-reset-mysql-root-password/

Incoming search terms:

Debian 8 Systemd Change Service Ulimit

I was trying to set ulimit -n for redis-server, but neither /etc/security/limits.conf nor ulimit work.

Here is the solution:
1 open /lib/systemd/system/redis-server.service
2 add following lines to ‘[Service]

3 reload daemon

4 restart service

Same for php5-fpm.

Other ulimit related keys:

Debian 8 Systemd Change Service Ulimit by @sskaje: https://sskaje.me/2015/06/debian-8-systemd-change-service-ulimit/

Incoming search terms: