Skip to content

Instantly share code, notes, and snippets.

@dream1986
dream1986 / 3.5lo2balance.md
Created May 26, 2021 12:17 — forked from muink/3.5lo2balance.md
关于3.5单端和2.5 3.5 4.4 平衡间互相转换的几条定理

关于3.5单端和2.5 3.5 4.4 平衡间互相转换的几条定理

3.5立体声与典型平衡口定义

ddt pht

互转定理

  1. 平衡设备之间可以完全地互相转换,只要接口线序一一对应不出错
@dream1986
dream1986 / dnsmasq-gfwlist.py
Created May 23, 2019 02:34 — forked from lanceliao/dnsmasq-gfwlist.py
将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
  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

@dream1986
dream1986 / gist:f63cec7cdc86d2a77eda3be715afcf8f
Created July 17, 2018 09:54 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@dream1986
dream1986 / webdav.sh
Created April 10, 2016 05:26
set up webdav over lighttpd
apt-get install lighttpd lighttpd-mod-webdav apache2-utils
#install lighttpd and additional module lighttpd-mod-webdav
#apache2-utils:htpasswd to generate webdav password file, lighttpd also reuse it
chown www-data:www-data /var/run/lighttpd/
#access to www-data user and group
lighty-enable-mod auth
lighty-enable-mod webdav
#enable authorization
@dream1986
dream1986 / crouton.init
Created January 21, 2016 04:58 — forked from DennisLfromGA/crouton.init
An external control file for adjusting four parameters in 'crouton.conf' to invoke a crouton chroot.
##############################################################
## Place a '#' in the 1st column before the variable if you ##
#+ don't want to change it from the crouton.conf defaults. ##
##############################################################
###
##########################################################################
##* crouton.conf defaults are: ##
# DELAY=10 # delay desired number of seconds before starting ##
# CHROOT=precise # enter desired chroot to start ##
@dream1986
dream1986 / nix-installs
Created January 21, 2016 04:58 — forked from DennisLfromGA/nix-installs
Script to install or update common software packages - as defined in $PACKAGES.
#!/bin/sh -e
#
APPLICATION="${0##*/}"
PACKAGES="\
cgpt colordiff compizconfig-settings-manager cowsay fortune-mod fortunes fortunes-debian-hints fortunes-min \
fortunes-off gparted guake ppa-purge remmina remmina-common remmina-plugin-rdp remmina-plugin-vnc screen synaptic \
tmux ubuntu-wallpapers unity-tweak-tool update-manager update-manager-core update-notifier update-notifier-common \
update-notifier-kde vim vim-doc vim-scripts vim-addon-manager vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse wajig"
SUDO=''
#
@dream1986
dream1986 / rw-rootfs
Created January 21, 2016 04:57 — forked from DennisLfromGA/rw-rootfs
A script that asks to make the root filesystem read-writable for subsequent changes and additions by the user.
#!/bin/sh -e
##!! PLEASE USE THIS SCRIPT WITH CAUTION - AND AT YOUR OWN RISK !!##
##!! IT HAS BEEN KNOWN TO CAUSE RESETS AND WIPE DATA ON SOME CHROMEBOXES !!##
APPLICATION="${0##*/}"
ANSWER=''
CURRENTROOT=''
CURRENTKERNEL=''
ROOTDEV=''
ROOTDEVPFX=''
@dream1986
dream1986 / HowToUseFishOnMsys2.md
Created December 4, 2015 07:35 — forked from sgur/HowToUseFishOnMsys2.md
MSYS2で fish を動作するようにするまで

1. msys2 で fish のインストール

pacman -S fish
pacman -S man

2. /usr/etc/fish/config.fish の編集

if status --is-login の条件内に以下のコードを追加 (/etc/profile と同様にパスを設定) する。

@dream1986
dream1986 / Xresources
Created October 8, 2015 11:54 — forked from tuhaihe/Xresources
Xterm configure file ~/.Xresources, add Chinese font support
!xrdb ~/.Xresources
!xterm font and locale
xterm.locale:true
xterm.utf8: true
xterm*utf8Title:true
xterm*fontMenu*fontdefault*Label:Default
xterm*faceName:Menlo:antialias=true:pixelsize=13
xterm*faceNameDoublesize:WenQuanYi Micro Hei Mono:pixelsize=13:antialias=true