Skip to content

Instantly share code, notes, and snippets.

@jouyouyun
jouyouyun / cvimrc.vim
Last active November 14, 2017 02:14
cVim config
let hintcharacters = "asdfqwerlkjhmpoi"
map F createActiveTabbedHint
let searchengine zhihu = 'https://www.zhihu.com/search?q=%s'
let searchengine youdao = 'http://youdao.com/w/eng/%s'
let searchalias g = 'google'
let searchalias zh = 'zhihu'
let searchalias yd = 'youdao'
let previousmatchpattern = '((?!last)(prev(ious)?|上一(页|頁)?|newer|back|«|less|<<?|gigi‹fd| )+)'
let nextmatchpattern = '((?!first)(下一(页|頁)?|next|older|more|>>?|›|»|forward| )+)'
@jouyouyun
jouyouyun / libfprint_etss801u.diff
Last active October 10, 2017 06:48
Libfprint etss801u patch, from: https://bugs.freedesktop.org/show_bug.cgi?id=73762 but not work on my laptop. My device: "Bus 001 Device 004: ID 1c7a:0801 LighTuning Technology Inc. Fingerprint Reader"
diff --git a/configure.ac b/configure.ac
index 8b29119..6400aaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_SUBST(lt_major)
AC_SUBST(lt_revision)
AC_SUBST(lt_age)
-all_drivers="upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes2660 aes3500 aes4000 vfs101 vfs301 vfs5011 upektc_img etes603 vfs0050"
+all_drivers="upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes1660 aes2501 aes2550 aes2660 aes3500 aes4000 vfs101 vfs301 vfs5011 upektc_img etes603 etss801u vfs0050"
@jouyouyun
jouyouyun / detect_kbd_devices.c
Created May 25, 2017 02:36 — forked from mmn80/detect_kbd_devices.c
Uses libudev to detect all keyboard input event devices (/dev/input/eventX). Based on the /usr/lib/udev/findkeyboards script.
#include <libudev.h>
#define MAX_KBD_DEVICES 10
const char** detect_kbd_devices()
{
const char **devnodes = calloc(MAX_KBD_DEVICES, sizeof(char*));
struct udev *udev;
struct udev_enumerate *enumerate;
struct udev_list_entry *devices, *dev_list_entry;
struct udev_device *dev;
@jouyouyun
jouyouyun / caicai_dx.ovpn
Created January 1, 2017 16:07
OpenVPN Home
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@jouyouyun
jouyouyun / iwork10
Last active October 22, 2016 12:20
Cude iwork10 旗舰版固件
地址1:https://www.baidupcs.com/rest/2.0/pcs/stream?method=download&access_token=21.3cf1499a62cb4cf59b671a02273b9a38.2592000.1479710451.3994319072-2172157&path=/apps/zqqian123/%E9%85%B7%E6%AF%94%E9%AD%94%E6%96%B9IWORK10%E6%97%97%E8%88%B0%E6%9C%AC%EF%BC%88I15-TC%EF%BC%89%E5%8F%8C%E7%B3%BB%E7%BB%9F%E5%88%B7%E6%9C%BA%E8%BD%AF%E4%BB%B6%E4%BB%A5%E5%8F%8A%E6%95%99%E7%A8%8B.rar
地址2:https://c.pcs.baidu.com/rest/2.0/pcs/file?method=download&access_token=21.f6cb7a24b3fdf06a6419d7f3eca644ff.2592000.1479730806.3994319072-2172157&path=/apps/zqqian123/%E9%85%B7%E6%AF%94%E9%AD%94%E6%96%B9IWORK10%E6%97%97%E8%88%B0%E6%9C%AC%EF%BC%88I15-TC%EF%BC%89%E5%8F%8C%E7%B3%BB%E7%BB%9F%E5%88%B7%E6%9C%BA%E8%BD%AF%E4%BB%B6%E4%BB%A5%E5%8F%8A%E6%95%99%E7%A8%8B.rar
@jouyouyun
jouyouyun / offline-update.md
Created July 11, 2016 07:59
Offline update plan

TODO

  1. 提供下载所有更新包的接口,见 cl 13403,这个 cl 里的其它改变去掉
  2. 在 lastore-daemon 中提供一个属性来表示所有更新包是否已下载的状态,然后在定时任务中去更新这个属性
  3. 在 lastore-session-helper 发送更新通知之前,先去获取 2 中属性的值,如果所有更新包都已下载,则不发送通知
@jouyouyun
jouyouyun / wm_report.md
Created July 8, 2016 06:44
反馈点击窗口内容无法切换窗口的方法

如果在使用 Deepin 2015.2 时遇到此问题: 点击窗口内容无法切换窗口,就是只能通过点击窗口标题才能切换窗口,麻烦执行下下面两个命令,收集下日志。

$  dbus-send --print-reply --dest=com.deepin.wm /com/deepin/wm com.deepin.wm.ToggleDebug
$  watch -n1 "xdotool key XF86LogGrabInfo"

第一条命令会打开窗管的debug模式,第二条命令是查询当前的鼠标有没有被捕获。 执行命令后,麻烦操作下,如点击下窗口内容(不能切换的情况),点击下窗口标题(可以切换的情况),然后把 /var/log/Xorg.0.log 和 /tmp 下的一个以 mutter- 开头的文件一起上传下,谢谢!

@jouyouyun
jouyouyun / power.md
Last active February 24, 2016 08:13
dde-daemon power
@jouyouyun
jouyouyun / proxychains.md
Created January 21, 2016 06:48
Proxychains Introducation