Skip to content

Instantly share code, notes, and snippets.

Evvil evvil

View GitHub Profile
evvil / hosts
Created Jul 2, 2019 — forked from alswl/hosts
hosts for OpenWRT, for disable AD in xiaomi TV
View hosts
View adblock
evvil /
Created Dec 11, 2018 — forked from upsuper/
一行 Python 实现树

一行 Python 实现树

使用 Python 内置的 defaultdict,我们可以很容易的定义一个树形数据结构:

def tree(): return defaultdict(tree)




Chrome的地址栏自动补齐功能提供了非常方便的地址预测功能 浏览器可以通过用户当前输入的字符来与用户的访问历史与书签匹配 然后在下拉栏中为用提供准确的补齐方案排名, 提高用户访问效率

在大部分情况下, 这个功能是非常好用的 但是有时, 出于某些原因, 用户需要移除某个记录(网址无法访问,网址更换域名等) Chrome提供了组合键Shift+Delete来删除地址栏下拉记录中的某个网址

evvil / DbUnitSampleTest.groovy
Created Aug 8, 2018 — forked from kiy0taka/DbUnitSampleTest.groovy
[Groovy][DbUnit] Using DbUnit with Groovy
View DbUnitSampleTest.groovy
import groovy.grape.Grape
import groovy.sql.Sql
import groovy.xml.StreamingMarkupBuilder
import org.dbunit.*
import org.dbunit.dataset.xml.*
import org.dbunit.database.*
class DbUnitSampleTest extends GroovyTestCase {
evvil /
Created Aug 8, 2018 — forked from kenwdelong/
Use Groovy to assign test data with DbUnit

DbUnit with Groovy

This little extension to DbUnit allows you to write the test data using Groovy lists and maps rather than XML or Excel. That way you can keep your test data in the same file as your db integration test, which will be easier to grok and maintain.

GroovyDataset is the DbUnit extension that you need to put in your project. GroovyDatasetTest is the unit test for it. UserIntegrationTest is an example, where the "data" attribute is the test data that is inserted into the database. (In real life, you'd create a superclass and move the SessionFactory, the definition of the data field, the setup() method, etc. there).

This was all described in a blog post:

For how to use it, see the UserIntegrationTest below. You can specify the data for the test in a List of Maps


0x01 网关意义

  1. 为什么要做网关
  2. 网关现状

0x02 网关介绍

  1. 配置后台和地址
  2. 过滤器 sign -> auth -> route -> translate -> response
package my.netty.http.upload;
import io.netty.handler.codec.http.HttpRequestDecoder;
evvil /
Last active May 10, 2018 — forked from dentechy/
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change UsePrivilegeSeparation to no
View yunfile_downloader
#!/usr/bin/env python
# encoding: utf-8
@version: 0.3
@author: endoffiht
@time: 15/6/29 18:06
You can’t perform that action at this time.