Skip to content

Instantly share code, notes, and snippets.

View superalsrk's full-sized avatar
🎯
Focusing

SRK.Lyu superalsrk

🎯
Focusing
  • Beijing China
View GitHub Profile
@superalsrk
superalsrk / ReadMe.md
Created December 22, 2017 03:06 — forked from iBaozi/ReadMe.md
redis 查看指定key 占用大小。用复制,查看增量方法,注意不要用于过大的key

#步骤(How to use it)

  1. 保存脚本到(Save script as ) redis_size.lua
  2. 注册脚本 (Load script)
    redis-cli -h 192.168.1.1 -p 6371 script load "$(cat redis_size.lua)"
  3. 调用(Call it)
    evalsha 78331e1d4741cad34084d357e19ce6dbca8e202e 0 test_key // 注意与上步返回的一致
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.util.Iterator;
import java.util.Set;
/**
* Created by weinanli on 13/07/2017.
@superalsrk
superalsrk / protobuf-closure.sh
Created November 12, 2016 08:27 — forked from mjpitz/protobuf-closure.sh
Easily create a protobuf plugin for closure objects
#!/bin/bash
############################################################
# First, you must build the library files for the protobuf
# tool. In order to do this, follow the steps below in the
# source directory for protobuf.
#
# 1. ./autogen.sh
# 2. ./configure
# 3. make
#
@superalsrk
superalsrk / .gitignore
Created November 11, 2016 07:46 — forked from BennettSmith/.gitignore
Google Protobuf v2.6.0 Build Script for iOS
protobuf
protobuf-2.6.0
protobuf-2.6.1
protobuf-master

Install cask that extends the brew command :

brew install phinze/cask/brew-cask

Install calibre using cask :

brew cask install calibre
Original inspiration found here:
http://www.openerp.com/forum/topic21864.html
== Install libxml2 ==
$ wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.8.tar.gz
$ tar xvf libxml2-sources-2.7.8.tar.gz
$ cd libxml2-2.7.8/
$ ./configure --with-python=/usr/bin/python2.6
$ make
package cn.datafox.web.config;
import org.sitemesh.config.ConfigurableSiteMeshFilter;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.DispatcherServlet;
import javax.servlet.FilterRegistration;
1) install boost
brew install boost
it will ask to create link. just follow the instruction
2) install libevent
brew install libevent
# Change Java Runtime:
sudo update-alternatives --config java
# Delete Open-JDK
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
# Change fonts - remove hinting:
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font
# Change RubyMine AntiAliasing first:
package io.loli.jsj.test;
import io.loli.jsj.test.MyQualifier.Count;
import javax.inject.Inject;
import javax.inject.Named;
@Named("antherHelloService")
@MyQualifier(countMethod=Count.DESC)
@SessionScoped