Skip to content

Instantly share code, notes, and snippets.

@undirectlookable
undirectlookable / DJI-4G-VOHIVE.md
Created July 6, 2026 06:31
大疆4G模块修改设备ID并一键部署vohive平台教程

大疆的4G模块(1代)硬件性价比高(价格在30-40不等,之前还有25的),并有精美的外观(这点EC20裸板没法比的) 但其默认的USB VID/PID是大疆私有的,导致通用的linux驱动无法直接识别。 但本质它是移远EG25-G核心, 通过修改其内部参数,可以将其修改成经典的移远(Quectel)EC20/EC25模块,从而无缝接入vohive短信及网络管理平台。

经测试大疆4G模块(1代)完美支持电信volte,完美支持vohive

一、 修改大疆模块设备ID(修改为移远EC20/EC25)

在linux系统未插其他干扰模块的情况下,请确保已安装 socat 工具(用于发送AT指令):

@undirectlookable
undirectlookable / nebula@.service
Created November 25, 2022 13:56
nebula serivce systemd script
[Unit]
Description=nebula for %i
Wants=basic.target
After=basic.target network.target
Before=sshd.service
[Service]
SyslogIdentifier=nebula(%i)
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/nebula -config /etc/nebula/%i.yml
@undirectlookable
undirectlookable / ttfb.sh
Created March 22, 2022 07:52
Get TTFB by curl
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@undirectlookable
undirectlookable / china_route.win.bat
Created October 18, 2018 07:16
Change gateway for China IP address
route DELETE 0.0.0.0
route ADD 0.0.0.0 MASK 0.0.0.0 10.0.0.1
route ADD 1.1.8.0 MASK 255.255.255.0 192.168.168.168
route ADD 1.2.4.0 MASK 255.255.255.0 192.168.168.168
route ADD 1.8.18.0 MASK 255.255.255.0 192.168.168.168
route ADD 1.8.102.0 MASK 255.255.255.0 192.168.168.168
route ADD 1.8.108.0 MASK 255.255.255.0 192.168.168.168
route ADD 1.8.238.0 MASK 255.255.254.0 192.168.168.168
route ADD 1.24.0.0 MASK 255.248.0.0 192.168.168.168
route ADD 1.45.0.0 MASK 255.255.0.0 192.168.168.168
@undirectlookable
undirectlookable / airnow-aqi.html
Created March 21, 2018 10:37
AirNow.gov 24 hours AQI table
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>AQI (airnow data)</title>
<script>
var city = location.hash.substr(1) || 'Beijing'
const aqiCats = [
@undirectlookable
undirectlookable / README.md
Last active June 23, 2020 16:08
Subresource Integrity (SRI) Hash Generator
@undirectlookable
undirectlookable / qqvideo-html5.user.js
Created November 22, 2016 02:32
在 Windows 系统中使用 HTML5 版的腾讯视频播放器 (userscript)
// ==UserScript==
// @name QQVideo HTML5
// @namespace http://v.qq.com/
// @version 1.0
// @description 在 Windows 系统中使用 HTML5 版的腾讯视频播放器
// @author Anonymous
// @match *://v.qq.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@undirectlookable
undirectlookable / apkpure-dl.py
Created February 29, 2016 03:39
Download apk file from APKPure.com
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
__version__ = '1.0.0'
import re
import os
import sys
import argparse
import urllib
@undirectlookable
undirectlookable / nginx_static_to_dynamic_modules.zh-cn.md
Created February 17, 2016 08:37
[译] NGINX - 将静态模块转换为动态模块

NGINX - 将静态模块转换为动态模块

翻译信息 原文:https://www.nginx.com/resources/wiki/extending/converting/ 时间:2016年02月17日 译者:@Undirectlookable

NGINX 从 1.9.11 版本起,引入了一个新的模块加载方式:动态加载。这意味着模块可以根据配置文件,在 NGINX 运行时动态的加载。同样,也可以通过修改配置文件然后 Reload NGINX 来卸载模块。

模块API对于静态模块和动态模块是一致的,但是 config 文件和编译方法略微不同。这篇文章将解释这些变化。

@undirectlookable
undirectlookable / rpi-golang-install.sh
Last active April 19, 2016 12:25
Install Go Binaries on Raspberry Pi
#!/usr/bin/env bash
# Install Go Binaries on any ARMv6/ARMv7 system.
# Binaries from http://dave.cheney.net/unofficial-arm-tarballs
# Fetch release page and get latest tarball link
LINK=`wget -q -O - https://golang.org/dl/ | grep '\/go.*linux-armv6l\.tar\.gz' | head -1 | sed 's/^\(.*\)\(http[^">]*\)\(.*\)$/\2/'`
# Get Filename
FILENAME=`echo $LINK | sed 's/\(.*\)\(go.*linux-armv6l\.tar\.gz\)/\2/'`