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 / download captcha
Last active December 14, 2015 07:59 — forked from wilbeibi/gist:5054796
douban CAPTCHA Download
# Grab captcha from douban login page
import urllib
import urllib2
import requests
import re
url = 'http://www.douban.com/accounts/login'
local = '/home/wilbeibi/Dropbox/Papers/Materials/Pool/douban/do'
i = 0
name = ""
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
# 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:
1) install boost
brew install boost
it will ask to create link. just follow the instruction
2) install libevent
brew install libevent
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;
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

Install cask that extends the brew command :

brew install phinze/cask/brew-cask

Install calibre using cask :

brew cask install calibre
@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
@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
#
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.