tag.connect_signal("request::screen", function(t) clients = t:clients() for s in screen do if s ~= t.screen and clients and next(clients) then t.screen = s t.original_tag_name = t.original_tag_name or t.name t.name = t.name .. "'" t.volatile = true return end end end) screen.connect_signal("added", function(s) for k,t in pairs(root.tags()) do if t.original_tag_name then -- find the new tag on the new screen new_tag = awful.tag.find_by_name(s, t.original_tag_name) if new_tag then t.name = t.original_tag_name t.original_tag_name = nil new_tag:swap(t) new_tag:delete(t, true) end end end end)
because I can.. (but you really shouldn’t)
#!/usr/bin/expect -f spawn oathtool --base32 --totp $KEY -d 6 expect -re \\d+ set CODE $expect_out(0,string) spawn ssh $SERVER expect "Verification code:" send "$CODE\n" expect "Password:" send "$PASSWORD\n" interact
This is a note to myself:
After OTA, reboot to Recovery Mode, either 1) Power + Volume Down when phone is off, or 2) Developer Options > Advanced Reboot > Reboot to Recovery. Then Install SuperSu zip again.
No data loss. Profit!
I guess I should document this since I spent some time to get this to work.
In short, to rate limit a box to 30MB/s
tc qdisc add dev eth1 root tbf rate 30mbps burst 10kb latency 70ms mtu 100000
The reason why we set mtu to 10000 is because of this.
To delete this rule:
tc qdisc del dev eth1 root
And to view current setting:
tc -s qdisc ls dev eth1
Garmin-Forerunner-610-Extractor downloads all the activity files from the watch, then calls callback scripts under $XDG_CONFIG_HOME(usually ~/.config)/garmin-extractor/scripts. In this case, it calls a script that uses gcpuploader to upload to Garmin Connect.
Don’t be fooled by the name, Garmin-Forerunner-610-Extractor actually supports a lot of Garmin devices that use ANT+:
- Garmin Forerunner 60
- Garmin Forerunner 405CX
- Garmin Forerunner 310XT
- Garmin Forerunner 610
- Garmin Forerunner 910XT
- Garmin FR70
- Garmin Swim
Here is what I did (on Archlinux, other distro should be similar):
sudo pacman -S python2-pip #install pip for python2 sudo pip2 install pyusb --pre #need version newer than 1.0a2 sudo pip2 install GcpUploader #install GcpUploader git clone [email protected]:Tigge/Garmin-Forerunner-610-Extractor.git cd Garmin-Forerunner-610-Extractor # since we run as root, so the config needs to be under /root sudo cp scripts/40-upload_to_garmin_connect.py /root/.config/garmin-extractor/scripts sudo chmod a+x /root/.config/garmin-extractor/scripts/40-upload_to_garmin_connect.py
Also needs to change the path to gupload in the script:
# CHANGE ME: gupload = "/usr/bin/gupload.py"
Add garmin connect credentials in /root/.guploadrc
[Credentials] username=yourgarminuser password=yourgarminpass
Finally, run garmin.py to sync!
sudo python2 garmin.py
Bonus: I also find trapiriik.com can sync between Garmin connect, Runkeeper, Strava, endomondo activities. One button push, sync all of them. Or for $2 a year, it can auto sync between accounts. Pretty good deal 🙂