Skip to content

Instantly share code, notes, and snippets.

@bao3
bao3 / make-mega-adblock-hostsfile.sh
Created February 3, 2016 15:18 — forked from OnlyInAmerica/make-mega-adblock-hostsfile.sh
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Modified Pi-hole script to generate a generic hosts file
# for use with dnsmasq's addn-hosts configuration
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh
# The Pi-hole now blocks over 120,000 ad domains
# Address to send ads to (the RPi)
piholeIP="192.168.1.1"
outlist='./final_blocklist.txt'
@bao3
bao3 / make-mega-adblock-hostsfile.sh
Created February 3, 2016 15:19
Create Mega Adblock Hostsfile for use with Dnsmasq (Modified from Pi-hole)
#!/bin/bash
# Modified Pi-hole script to generate a generic hosts file
# for use with dnsmasq's addn-hosts configuration
# original : https://github.com/jacobsalmela/pi-hole/blob/master/gravity-adv.sh
# Address to send ads to. This could possibily be removed, but may be useful for debugging purposes?
destinationIP="0.0.0.0"
outlist='./final_blocklist.txt'
tempoutlist="$outlist.tmp"
@bao3
bao3 / wubi.emoji.dict.yaml
Last active February 16, 2016 10:17 — forked from lembacon/luna_pinyin.emoji.dict.yaml
Pinyin-Emoji Dictionary for Squirrel
# Rime dictionary
# encoding: utf-8
---
name: luna_pinyin.emoji
version: "2015.11.09"
sort: by_weight
use_preset_vocabulary: true
...
@bao3
bao3 / surge_main.conf
Created February 17, 2016 09:10 — forked from mcxiaoke/surge_main.conf
Config for surge.app
# This config file was created for myself (@shanskc). You may want to add or remove some rules to make efficient use of the Internet.
# NOTE: this config requires Surge.app build 243 or newer version.
# 从243开始Surge 加入了proxy和rule分离的配置Override,此文件为rules main.conf,在你的proxy中你可以引入此conf
# eg: 下面为你的proxy.conf,只需引入此main.conf 即可.
# -----START-----
# #!PROXY-OVERRIDE:main.conf
#
# [Proxy]
# Proxy = custom, ip, port, Methor, password
# -----END-----
@bao3
bao3 / README.md
Created March 31, 2016 18:25 — forked from janlay/README.md
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@bao3
bao3 / wubi86.custom.yaml
Created March 31, 2016 18:26 — forked from janlay/wubi86.custom.yaml
My custom Squirrel config especially created for Wubi86 users.
patch:
switches:
- name: ascii_mode
reset: 0
states: [中文, 英文]
- name: full_shape
states: [半角, 全角]
- name: extended_charset
states: [通用, GBK]
- name: simplification
@bao3
bao3 / ntp.bat
Created June 1, 2017 06:37 — forked from maxbelyanin/ntp.bat
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
@bao3
bao3 / build-freebsd-on-pi
Created October 23, 2017 06:34
build freebsd on raspberry pi
#!/bin/sh
export MAKEOBJDIRPREFIX=/srv/obj
export SRCROOT=/srv
# build kernel
svn co svn://svn.freebsd.org/base/head $SRCROOT/head
cd $SRCROOT/head
make buildkernel KERNCONF=RPI-B
make installkernal KERNCONF=RPI-B
@bao3
bao3 / install_StrongSwan.sh
Created November 15, 2017 19:00 — forked from leolovenet/install_StrongSwan.sh
IPSEC VPN on Centos6 with StrongSwan for iOS9
#!/bin/bash
## Main reference https://raymii.org/s/tutorials/IPSEC_vpn_with_CentOS_7.html
yum -y install epel-release
yum -y install haveged strongswan
/etc/init.d/haveged start
chkconfig haveged on
cd /etc/strongswan || exit
cat > strongswan.conf <<'EOF'
@bao3
bao3 / supervisord
Created April 9, 2020 12:31 — forked from saitodev/supervisord
supervisord init script for CentOS
#!/bin/sh
#
# Startup script for the Supervisor server
#
# chkconfig: - 90 10
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
#
# processname: supervisord