Skip to content

Instantly share code, notes, and snippets.

View fanthos's full-sized avatar

Boyi C fanthos

  • Beijing, China
View GitHub Profile
@fanthos
fanthos / home-assistant.service
Created April 15, 2018 11:24
Simple systemd script to start at boot
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=hass
ExecStart=/home/hass/bin/hass
[Install]
@fanthos
fanthos / hosts
Last active July 11, 2017 08:52
hosts update
#!/bin/sh
HOSTS="/tmp/hosts/remote1"
MAIN="https://raw.githubusercontent.com/racaljk/hosts/master/hosts"
MIRROR="https://coding.net/u/scaffrey/p/hosts/git/raw/master/hosts"
TEMPFILE="/tmp/hostsupdate.swp"
USEDBLOCKS="Android|Amazon AWS|Apkpure|Archive|Box.com|BundleStars|Cloudfront.net|Disqus|Dropbox|DuckDuckGo|Facebook|Github|Google|Gmail web|gstatic|Googleapis|Googleusercontent|imgur|Instagram|MEGA|OneDrive|pinterest|RawGit|Tor|W3schools|Wikipedia|XboxLive"
wget -O $TEMPFILE $MAIN
@fanthos
fanthos / pvzkey.ahk
Created June 27, 2017 10:38
Plants vs Zombie keyboard shortcut
#IfWinActive, Plants vs. Zombies
CoordMode, Mouse, Client
SetMouseDelay, 0
SetDefaultMouseSpeed, 0
ClickAndRet(x) {
MouseGetPos, xold, yold
MouseMove, x*60+60, 40
MouseClick
MouseMove, xold, yold
MouseClick