Skip to content

Instantly share code, notes, and snippets.

@luosheng
luosheng / default.custom.yaml
Created May 18, 2012 05:58
鼠须管中加入五笔
# 在 ~/Library/Rime 下建立 default.custom.yaml,输入如下内容,然后在菜单栏点「重新部署」
patch:
schema_list:
- schema: wubi86
@wynemo
wynemo / ssl_proxy.md
Last active December 13, 2016 17:43 — forked from anonymous/stunnel.conf

虚拟机 ubuntu 12.04

$ sudo aptitude install stunnel
$ sudo aptitude install squid3

squid3的默认http端口是3128

/etc/stunnel/stunnel.conf中的foreground = yes, 是用来调试用的 如果用superviord来管理stunnel 这个选项也会用得到

/etc/stunnel/stunnel.pem, 这个pair是这样得到的

@lembacon
lembacon / luna_pinyin.emoji.dict.yaml
Last active November 20, 2023 16:09
Pinyin-Emoji Dictionary for Squirrel
# Rime dictionary
# encoding: utf-8
---
name: luna_pinyin.emoji
version: "2017.02.10"
sort: by_weight
use_preset_vocabulary: true
...
@bao3
bao3 / autopin.sh
Last active July 4, 2021 03:10
reaver PIN时每10分钟模拟键盘输入Ctrl+C中断,因为无线网卡运行在monitor模式大约10分钟后就性能下降,因此需要强制中断reaver。使用时 sudo ./10pin aa:bb:cc:dd:ee:ff:11(即路由器MAC) 额外的reaver指令 请在空格后使用""(双引号)中写入,例如channel 6 ,可以使用 sudo ./10pin aa:bb:cc:dd:ee:ff:11 "-c 6" 如果你要实时查看进度,可以使用 tail -f /var/log/reaer.pin.log
#!/bin/sh
reaverCMD()
{
reaver -i mon0 -b $1 -v -a -S -N -r 100:60 $2 >>/var/log/reaver.pin.log &
tmp_pid=$(ps a| grep reaver | grep -v grep | awk '{print $1}' );
echo $tmp_pid;
}
while true :
do
@lanceliao
lanceliao / dnsmasq-gfwlist.py
Last active August 18, 2023 11:26
将gfwlist转换成带ipset的dnsmasq规则,适用于OpenWrt智能上网
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
@xream
xream / 10010.coffee
Last active August 29, 2015 14:07
查询联通剩余流量
# npm install zombie
Browser = require("zombie")
browser = new Browser()
browser.visit "http://wap.10010.com/t/logout.htm", ->
browser.clickLink "[登录]", ->
browser.fill("user_id", "此处填写你的手机号").fill("user_pwd", "此处填写你的服务密码").pressButton "登  录", ->
browser.clickLink "上网流量", ->
console.log("剩余流量: "+browser.text("span.color-red:nth-child(7)"))
@preshing
preshing / build_cross_gcc
Last active April 11, 2024 02:14
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@julianlam
julianlam / expose-directory-on-host-to-lxc-container.md
Last active May 6, 2024 06:41
Exposing a directory on the host machine to an LXC container #blog

Exposing a directory on the host machine to an LXC container

  1. Log into the container and create an empty directory, this will be the mount point
  2. Log out and stop the container.
  3. Open to your container's config file
    • For regular LXC containers: /var/lib/lxc/mycontainer/config
    • For unprivileged LXC containers: $HOME/.local/share/lxc/mycontainer/config
  4. Add a new line above the lxc.mount directive, that follows the format below. Substitute proper paths as necessary:
    • lxc.mount.entry = /path/to/folder/on/host /path/to/mount/point none bind 0 0
  • Both of these paths are relative to the host machine.
@iflamed
iflamed / com.shadowsocks.chinadns.plist
Created May 7, 2015 18:00
a plist file for mac os x launchctl damoen
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.shadowsocks.chinadns</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/chinadns</string>
<string>-l</string>
@maxbelyanin
maxbelyanin / ntp.bat
Created August 18, 2015 13:14
Starts the Windows NTP-Server
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /v "AnnounceFlags" /t REG_DWORD /d 5 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v "Enabled" /t REG_DWORD /d 1 /f
net stop w32time && net start w32time