Search This Blog

Monday, October 24, 2016

Krush, Kill 'n' Destroy rfkill

Awesome!!!


rfkill is the worst piece of software ever conceived, in a nutshell it is designed to completely destroy radio (eg. WiFi / BlueTooth / etc) right when you need it most. Why anyone would think that you would need to do this is beyond me (I'm not buying the "it uses less battery" argument, using a shot gun would be more elegant). Whoever though this needed to be installed by default in all Ubuntu distro's needs a mental health plan.


After dealing with years and years of agonizing pain because of this I found an elegant solution, remove it:


sudo apt-get purge --auto-remove rfkill

No more USB cables, booting Windows, and command line ninja mastery, this works! Even if you accidentally hit that mysterious checkbox in NetworkMananger the radios do not die.


I'd also like to thank the genius who though it would be a good idea to add "connect" buttons to network connections in the latest version NetworkMananger, you are a true visionary!

Wednesday, October 19, 2016

Upgrade adoptable USB storage in Android Marshmallow

Yeesh!


I'm writing this guide for myself because I can't find much on the Internet about this. I haven't even tried this, I'm making it up as I go but trust me this is going to work or there will be blood.


  1. Install App2SD on the phone
  2. Backup app list using App2SD
  3. Disable USB debugging (if necessary)
  4. Set the USB mode to MTP (if necessary)
  5. Plug the phone directly into a PC (no USB hub)
  6. Browse to the SD contents:
    • If you are using Windows or a Mac, just do it
    • In KDE look in Dolphin's "places"
    • If you use GNOME put on your big boy pants
    • If you use Unity, check yourself into rehab
    • Or see 2
  7. Copy the SD contents to the PC12
  8. Switch off the phone
  9. Replace the old SD card with the new one
  10. Boot the phone
  11. Tell Android to delete the old SD card and pray
  12. Format and migrate to the new SD card
  13. Reboot the phone
  14. Copy the backed up data to the new SD card (I needed a File Manager and AirDroid for this)2
  15. Re-install App2SD
  16. Use Superman strength to replace the App2SD backup with the actual backup3
  17. Use app restore in App2SD to manually confirm to install each and every missing app
  18. Reboot the phone
  19. Put everything back to normal. 99% of apps will have fully restored data, use Superman strength for the 1%
  20. Try not to kill anyone

Easy huh?


Update


I'm thinking my OTG cable could have really helped with this.

Saturday, October 15, 2016

tmuxstart

I use tmux because it is rather awesome and I have spent quite a bit of time developing a script to automate starting it. It uses screen compatible key bindings to help with muscle memory. It should just work on debian and be easy to adapt for redhat and others.


I'm not happy with the mouse mode component because it wrecks my OS clipboard functionality so I've still got some work to do (help?). With this much effort it would be a shame to not share it so here it is.


#!/bin/bash
echo
# first window is called console, top 60% is bash
tmux new-session -d -n console -s default
# remap prefix to Control + a
tmux set -g prefix C-a
tmux unbind C-b
tmux bind C-a send-prefix
# windows start at '1'
set -g base-index 1
# allow resize
tmux setw -g aggressive-resize on
# allow mouse mode
tmux set -g mode-mouse on
tmux set -g mouse-resize-pane on
tmux set -g mouse-select-pane on
tmux set -g mouse-select-window on
# lower left 50% x 40% is logs
tmux split-window -p 40 'bash -c "tail -Fn20 /var/log/syslog"'
# lower right 50% x 40% is htop
tmux split-window -h htop
# window for work (bash)
tmux new-window -c ~/Documents/Projects/ -n work
# window for root
tmux new-window -n root 'sudo su -'
# window for htop
tmux new-window -n htop 'htop'
# window for syslog 
tmux new-window -n syslog 'bash -c "tail -Fn20 /var/log/syslog"'
# focus on desired window
tmux selectw -t 0
tmux selectp -t 0
# wish I could remember what this does
tmux a -t default

Wednesday, October 05, 2016

Google Now API

I've been wondering about how to do custom integrations with Google Now for quite a while and have finally found the documentation:

https://developers.google.com/schemas/reference/

Thank you Private Public Transport Victoria for finally coming around. I'd like to shout out to the AFL and point out that an AFL match is an "event", much like an NRL or cricket match really.

Tuesday, October 04, 2016

#GoogleTranslate

Does anyone know the nerd from the Google Translate ad? I can't find the ad and keep thinking about it. The letters in his zipper and hair just need to go through a SOUNDEX and a dictionary before being thrown out. More false negatives will need to be dealt with but a whole lot less false positives. The false negatives can be improved by optimizing detection of known non-dictionary items like numbers.