Skip to content

Instantly share code, notes, and snippets.

@piyoki
piyoki / auto-artifact-export.yml
Last active March 19, 2024 01:20
mosdns-v5 config template
---
- name: Update dat files
hosts: all
become: yes
vars:
- base_path: /etc/mosdns
- restart_daemon: yes
- daemon_service_name: mosdns
- clean_up_after: yes
log:
level: info
plugins:
# 缓存mosdns-install.hook
- tag: cache
type: cache
args:
size: 1024
lazy_cache_ttl: 86400
@NT7S
NT7S / Si5351AntennaAnalyzer.ino
Created April 20, 2015 21:12
Si5351 Antenna Analyzer
#include <si5351.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <Wire.h>
#include <DFR_Key.h>
#include <LiquidCrystal.h>
#define V_SAMPLE A1
#define I_SAMPLE A2
0.0.0.0
1.1.80.147
1.1.127.45
1.33.190.70
1.33.191.58
1.209.208.200
1.234.1.235
1.234.2.155
1.234.4.97
1.234.17.34
@pixline
pixline / squid.conf
Last active June 29, 2020 11:38
pfsense 2.1 squid3 proxy + adblock setup
# http://aacable.wordpress.com/tag/squid-maximum-cache-hit/
# https://calomel.org/squid_adservers.html
http_port 192.168.3.254:3128
http_port 10.0.0.253:3128
http_port 127.0.0.1:3128 intercept
icp_port 7
dns_v4_first off
pid_filename /var/run/squid.pid
cache_effective_user proxy

参考了以下两篇文献: http://blog.ch3n2k.com/2013/09/openwrt.html http://www.right.com.cn/forum/thread-128967-1-1.html

tomato路由器上已经成功部署,并且一直很稳定,openwrt的部署步骤是我按照上面的两篇文献以及tomato上的部署经验写的,但我没有真正搭建过。下面是详细的解决方案:

#一、tomato路由器 1、设置好jffs和ipkg安装环境;把附件中的geoip压缩包的内容放入/opt/etc/geoip(或者/jffs/opt/etc/geoip)目录下。

2、在系统管理——脚本设置——wan连线中输入以下内容:

@sdvcrx
sdvcrx / aria2.conf
Last active August 29, 2015 13:55
popobox configure
#===请按实际情况修改路径
#定时保存进度
#input-file=/root/.aria2/aria2.session
save-session=/root/.aria2/aria2.session
#定时保存会话,需要1.16.1之后的release版
save-session-interval=1200
#文件保存路径, 默认为当前启动位置
dir=/mnt/disks/sda4/Downloads/
# fix EOF error
@mccabe615
mccabe615 / gist:8411428
Created January 14, 2014 01:25
GenyMotion ARM Fix
Genymotion is a Virtual Android Environment built on x86 and Virtualbox. It's not an ARM emulator so it's performance is way better than the Android SDK Emulator. However in their latest update they've removed both ARM Translation and Google Play Apps. (This is what causes the "INSTALL_FAILED_CPU_ABI_INCOMPATIBLE" errors) Many Devs and Users still find these features very useful for various reasons and their removal has forced people to look for alternatives to Genymotion.
This guide is for getting back both ARM Translation and Google Play apps in your Genymotion VM.
UPDATE-v1.1: I've gotten more up-to-date builds of libhoudini and have updated the ZIP. This fixes a lot of app crashes and hangs. Just flash the new one and it should work.
Download the following ZIPs:
ARM Translation Installer v1.1 - http://goo.gl/JBQmPa(Mirrors) ON DROPBOX
Download the correct GApps for your Android version:
Google Apps for Android 4.3 - http://goo.im/gapps/gapps-jb-20130813-signed.zip ON DROPBOX
Google Apps for Android 4.2
@teffalump
teffalump / README.md
Last active June 16, 2024 18:43
OpenWRT adblock implementation

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer