Skip to content

Instantly share code, notes, and snippets.

View wen-long's full-sized avatar
☘️
wish to be lucky

wen-long

☘️
wish to be lucky
View GitHub Profile

E 信按需连接并发送通知给手机

exin_ontime.sh 如下

#! /bin/sh
export PATH="/bin:/usr/bin:/sbin:"$PATH
while true
do
    count=`cat /tmp/dhcp.leases | wc  -l`
    echo $count
@wen-long
wen-long / cmds.txt
Last active August 29, 2015 14:21 — forked from wong2/cmds.txt
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
  1. openwrt 需要所在文件系统区分大小写,可用磁盘工具新创建个分区

brew install coreutils gawk wget findutils gnu-getopt gtar
export PATH="/usr/local/Cellar/gnu-getopt/1.1.6/bin:$PATH"
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
#前往新分区
git clone git://git.openwrt.org/14.07/openwrt.git
cd openwrt

###现实跟我开了个玩笑

最初买 win8 平板是为了连 e 信,然后用猎豹 wifi 或者 360 wifi 之类的共享出来给笔记本和手机用,但用上以后,感觉很失败。总是掉线,体验很不好,速度也很难满速,况且平板,otg 线,USB 有线网卡,充电线混在一起,十分不美观

但就在刚刚,因为想给平板刷系统, Mac 就插上网线连上 e 信了,就在这时我突然想到,Mac 里似乎有个共享互联网,我通过 wifi 共享了互联网,手机连上了,果然,无法访问互联网,毕竟有 e 信嘛。。但,竟然能连上 Mac 自身! 于是我在 Mac 上装了 ssserver ,手机连上之后,顺利的上网了。。

####MySql 卸载

先杀进程,然后

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
  1. 使用 BaseSystem.dmg 的方法制作安装 USB,只需要刻录 BaseSystem.dmg ,拷贝 Packages 覆盖原 Packages 拷贝 BaseSystem.chunklistBaseSystem.dmg 至 USB 根目录
  2. 用这里提供的 CLOVER
  3. 用这里提供的 kext
  4. 无线,有线,声音,trim,键鼠,屏幕亮度,USB 3.0 就都好了。
  5. 更新:不要使用 GenericUSBXHCI 了,要用 USB 3.0 搜索 Patched AppleUSBXHCI v710.4.11 (10.10.2) 下载并按说明替换系统相应 kext。

https://blog.daliansky.net/Hackintosh-long-term-maintenance-model-checklist.html

https://blog.daliansky.net/archives/

使用 clover 的话可以在 kernel an…xt Patches 中添加 IOAHCIBlockStorage 替换项,替换 4150504C45205353440000000000000000000000

经测试适用于 10.10.3 与 10.9.5。

@wen-long
wen-long / aria2.conf
Last active March 20, 2016 17:33
在 /Library/LaunchDaemons 下 创建 homebrew.mxcl.aria2.plist ,然后 chmod 600 文件名 chown root 文件名
continue=true
file-allocation=none
#daemon=true
disable-ipv6
user-agent=netdisk;4.4.0.6;PC;PC-Windows;6.2.9200;WindowsBaiduYunGuanJia uTorrent/2210(25130)
enable-http-pipelining=true
event-poll=select
check-certificate=false
min-split-size=1M
enable-dht

/Library/LaunchDaemons 中创建 ip-up.plist 文件,内容如下

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Label</key>
   <string>com.wenlong.setchnroute.plist</string>
   <key>ProgramArguments</key>