Skip to content

Instantly share code, notes, and snippets.

View qiwihui's full-sized avatar
🦉
Focusing

qiwihui qiwihui

🦉
Focusing
View GitHub Profile
@qiwihui
qiwihui / Hexo_Moduleversionmismatch.md
Last active May 14, 2018 07:38
Hexo: Module version mismatch

I was also getting this but with the error:

[Error: Module version mismatch. Expected 46, got 47.]

It seems there was a mismatch between one of:

The hexo in node_modules/.bin The hexo in /usr/local/bin/hexo

@qiwihui
qiwihui / cx_oracle.md
Created March 19, 2018 08:28 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@qiwihui
qiwihui / delete_exmail.py
Last active February 1, 2018 08:38
批量删除腾讯企业邮箱邮件
#!/usr/local/bin/python
# coding: utf-8
import imaplib
import time
import re
# 拆分删除列表,一次性标记删除1000个
# 参考:
# 1: http://www.lolizeppelin.com/2016/12/14/python-imap-delete/
@qiwihui
qiwihui / RSS2InoReader.js
Last active September 28, 2018 02:30
订阅 知乎专栏,简书和Medium
javascript: (
function () {
var u = 'https://www.inoreader.com/?add_feed=';
var l = location;
c = l.pathname.split('/')[1];
if (l.host == 'medium.com') {
u += l.protocol + '//' + l.host + '/feed/' + c;
} else if (l.host == 'zhuanlan.zhihu.com') {
u += l.protocol + '//' + l.host + '/' + c;
} else if (l.host == 'www.jianshu.com') {
@qiwihui
qiwihui / osx-for-hackers.sh
Last active December 18, 2017 06:19 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@qiwihui
qiwihui / django_docs.md
Created December 14, 2017 06:17 — forked from codingjoe/django_docs.md
Build Django docs like a pro!

Build Django docs like a pro!

Sphinx config

docs/conf.py

import importlib
import inspect
import os
import sys
@qiwihui
qiwihui / ss-ipv6.md
Created October 26, 2017 08:30
使用shadowsocks-libev访问IPV6资源
  1. 确认服务器支持IPV6
# ping6 ipv6.google.com
PING ipv6.google.com(nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e)) 56 data bytes
64 bytes from nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e): icmp_seq=1 ttl=53 time=1.61 ms
64 bytes from nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e): icmp_seq=2 ttl=53 time=1.58 ms
64 bytes from nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e): icmp_seq=3 ttl=53 time=1.66 ms
64 bytes from nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e): icmp_seq=4 ttl=53 time=1.51 ms
64 bytes from nrt12s14-in-x0e.1e100.net (2404:6800:4004:81b::200e): icmp_seq=5 ttl=53 time=1.64 ms
@qiwihui
qiwihui / hans.md
Last active October 26, 2017 02:29
在Mac上使用 hans+shadowsocks-libev 翻墙

简介

最近因为电信白名单,国外的服务器只能ping通,高端口基本无法使用,一种解决办法是将翻墙服务启动在80,443等可访问端口,另一种就是本文方法,将数据包封装在ping包中。

使用 hans 这个项目结合 shadowsocks-libev 翻墙。

安装

服务器端

@qiwihui
qiwihui / main.go
Created October 23, 2017 07:07
Extract table names from SQL statement
// Extract table names from SQL statement
package main
import (
"fmt"
"regexp"
)
// extractTableNames from sql statement
@qiwihui
qiwihui / index.html
Created August 10, 2017 06:34
vJmoKo
<header>
<div class="title">
<h1>over</h1>
<h1>five</h1>
</div>
</header>