Search This Blog
Monday, December 05, 2022
Saturday, September 28, 2019
How to use disks so you don't cry about it afterwards
I'm seeing people move away from mechanical hard disks and say they won't go back. I am acknowledging that computer storage is undergoing rapid change however I decided to create this post to provide sensibility during these times.
This advice is based on the following facts:
- SSD's are faster
- SSD's die from usage and are less reliable than HDD's
- HDD's can store way more than SSD's
- Cloud storage is awesome but incurs a subscription and hasn't proven itself as reliable
- Backup's can die too
Based on the current realities you need 4 different solutions:
- An SSD or a pair of RAID 1 SSD's for your OS and apps and temporary local data. RAID 1 is to help with insurance of SSD death
- An SSD or a pair of RAID 0 SSD's for your swap and cache. This to help stop your primary SSD from dying from reads and writes. A RAID 0 configuration will ensure your computer will run trice as fast as someone without it when you run out of RAM
- A mechanical HDD or bunch of mechanical HDD's in RAID 5 for storing large amounts of data. This is for reliability and capacity. RAID 5 will help retain both performance and further reliability.
- A remote copy of your HDD's. This is to ensure you retain your data even if the premise suddenly explodes for whatever reason
Thursday, April 25, 2019
How to forcibly (and horribly) cast AFL audio (or anything really) to Chromecast using a Samsung Galaxy Tab
Quite simple really, in the notification bar you will find something called "SmartThings". Fire up the AFL app and start playing audio from your favorite radio station. Then enable SmartThings and it will ask what device to cast to.
Done.
Except the primary function of SmartThings appears to be to "keep stopping". If you have a Galaxy Tab you will be used to this anyway. Every time this notification comes up it actually doesn't stop.
The licensing rights the AFL have put in place are insane. Intentionally breaking Chromecast, I can only listed to AFL broadcasts from radio stations from the AFL app and not the radio stations app, free for Telstra mobile customers and no one else.
Go the Pies!
Thursday, April 18, 2019
NBNCo and the fuckening
After enduring two and half months are hell and serious concern about my ability to work I feel I need to document my experience for the benefit for others.
Long story sort, I became a professional Internet developer in 1997. Over ten years ago I moved to Scoresby and started a family. iiNet shoved some ADSL2 gear into the Scoresby TX and I got some seriously sweet Internet. I got evicted and moved to Bayswater and stayed with iiNet despite them not having their own equipment, and I did it again when I returned to my true home of Ferntree Gully. Moving to Ferntree Gully has been a problem because DTV has serious problems (MPEG2 over air) and I don't get any television. Eventually the household gets tired of this and moves to Telstra/Foxtel so the televisions in the house can do something. I use the Internet for way more than Facebook and YouTube so I have custom DHCP servers and firewalls so I'm in the "office of the future". All is well until the 29th of January 2019 when I'm forced onto the NBN. This is where the story begins.
I was at work at the time but an NBNCo tech came into the house and replaced a modem with two modems. Everyone is wondering if NBNCo are going to deliver FTTC or FTTN but I'm getting neither, just some bull shit modem replacement. However I'm at work so I just see my house vanish from the Internet and for it to never return. This immediately affects my productivity so I start freaking out. Over the next two months I try to donate a static IP to Telstra and then order a second connection to address the issue. I have no explanation why NBNCo have broken everything. The second connection is just as useless so after a while I remove all the new gear and return it to Telstra as broken.
After trying to live like this for over two months I turn to Facebook to ask for help and I got it. I find out quite simply the NBNCo are deploying CGNAT without telling anyone. To be fair, NBNCo have to deploy CGNAT because version four of the Internet died years ago but on the other hand Telstra didn't have this problem. They just decided to throw that onto me without any explanation.
The lesson here is that when you are forced onto the NBNCo's concept of the Internet, they actually remove you from the Internet. I've determined this can be resolved by either abandoning version four of the Internet or creating a Virtual Public Network into some other country not at war with itself.
Monday, September 24, 2018
Eleven completely not secret herbs and spices
See the here for more information.
Friday, January 19, 2018
Windows no longer destroys GRUB
Thursday, December 21, 2017
BlueTooth 2017
1. Fire up Blueman.
2. Reboot, sorry.
3. If BlueTooth adapter isn't found goto 1. Repeating this multiple times is normal in 2017.
4. ps aux | grep blue
5. kill -9 ← pid of Blueman
6. Try connect everything.
7. If everything connects after multiple attempts then fine otherwise continue.
8. sudo service bluetooth restart
9. Alt-F1 blue blah, but not Blueman!
10. Right click on system tray and select "System Tray Settings..."
11. Deselect Bluetooth, click okay. Select Bluetooth, click okay.
12. Unpair, untrust, and remove problem device.
13. Try reconnect problem device.
14. Goto 12 until you lose the will to live.
I think what's happening is that only Blueman will let the driver actually boot but not function. And "Bluetooth" won't boot the driver but will actually work. lspci and rfkill list will make you think you have lost the plot.
Saturday, October 07, 2017
Thursday, September 28, 2017
Tuesday, September 26, 2017
PulseAudio broken in Mint Sonya
I found the solution here. Essentially just edit
/etc/pulse/daemon.confand uncomment
default-sample-channelsand set it to whatever is reasonable for you.
Now I can go back to watching movies and hearing sweet helicopter fly overs.
Friday, September 22, 2017
The programmer divide
Firstly there is the traditional "raw" programmer. This type like to own their code and nearly always program in C, sometimes Perl or Python but nearly always C. They understand how their program will compile and are okay with the fact that their code will compile a whole lot of evil "goto" statements.
The second type is the "library" developer. This type understand that writing code that has already been written is inefficient and use layers of other code to get code written quickly and beautifully. They will adhere to concepts like DRY and closures so their code is short and readable.
With the growing amount of computing resources (growing speed and memory) the first type of programmer should of died out but hasn't for three reasons. The first and most obvious is that these programmers maintain the base code for which libraries are written on and if they stopped doing it the second type of developer wouldn't exist. Secondly they are needed for raw speed, we've all seen that now common "spinning wheel" and love it don't we? Imagine if that happened when you went to start your car? Love gaming in JavaScript? Didn't think so. The third reason is to support the "library" developers when they get too deep and stuck. When this happens it's a simple case of finding out what's going on and how to fix it. Armed with tools like wireshark and a DASM "raw" programmers can come to the rescue.
The "library" developer is in high demand as they can solve problems quickly by standing on the shoulders of giants. They understand their code must be easily readable because of the next person who may work on it. Constantly learning about new programming strategies and libraries is of the utmost importance to keep their programming skills relevant and efficient. Regular progress and multiple projects are the norm for this developer. Writing code that uses a library and is used by a library will keep them in a job like the "raw" programmers.
Another aspect is these two types of programmers don't tend to get along, even though they need to. What I've seen is this divide growing. Will it get to the point where the "library" developers don't even know what a computer is doing? Will "raw" programmers be regarded as too inefficient and relegated to only writing computer games and operating systems or has this already happened?
My own personal experience with this issue came in the form of the language JavaScript, it's the programming language used by web browsers. I started out with the opinion I should write all my own code because that's what a competent programmer should do. Almost as soon as I started Microsoft entered the game and started messing with things. In the old days I dealt with this by making different versions of web sites depending on the supposedly standardised technology being used. After a while things like jQuery came along which provides a common library to mitigate the differences and I found myself being outperformed by programmers using jQuery. I learned the advantages of jQuery and came to love and embrace it.
It's obvious now that there's an entire industry to connect these two types of developers. People that maintain tools and libraries that run in between these two types are common, Atlassian make a lot of money from doing just that. Where will it progress from here?
Monday, September 11, 2017
Marilyn
& counsellor friend Marilyn Vaccaro. Go here if you want to make a booking, especially if you are in the Byron Bay area.
Sunday, July 30, 2017
NBN Co explained
There is a lot of discussion that the NBN Co was created to increase the speed of the Internet in Australia. This is sort of correct, but there is a lot more too it. At the time that NBN Co was conceived, the Internet (version 4), had a serious problem and that issue was not related to speed, but "addresses". Each device that connects to the Internet needs an "address" which is simply a number and version 4 of the Internet allows for 4,294,967,296 addresses. Whilst 4 over billion seems like a big number, think about the number of people and computers in the world, the reality is the great firewall of China" saved the Internet from dying ten years ago.
Now obviously the IETF, the people that govern the Internet, foresaw this problem and met together to address the problem. There were enough disagreements that version 5 of the Internet was scrapped altogether but they sorted out their differences and invented a solid version 6 of the Internet. Version 6 of the Internet has 3.40282366921e+38 addresses, almost enough to WiFi enable every second piece of sand on the planet, awesome!
Now the Internet version 4 and 6 needed to coexist whilst people transitioned from the old to the new. So what happened next? Everyone, and I mean everyone, realized we'd need to replace our copper cable with fiber optic cable to get new sweet speeds of the new sweet Internet version 6. Even the people running NBN Co (or whatever it was called at the time) knew this at the time.
Replacing all the copper with fiber was going to cost a lot of money. Fiber had already rolled out, the Internet would never have began without it, all the cities and telephone exchanges were already connected by fiber. It was the many connections between the exchanges and the houses that would need their copper replaced. It was going to cost billions, and so the NBN Co go their billions.
So what did the NBN Co do with their billions? Figure out ways to pretend they spent it on infrastructure! Tasked with the simple task of laying fiber optic cable to every single house in Australia NBN Co decided that rather than do this it would try to make money from an infrastructure project that was never ever going to make money.
So how did NBN Co manage to take in billions whilst not rolling out infrastructure? By lying to the public and creating a pyramid scheme. NBN Co decided do nothing and put out contracts for other companies to "upgrade" the existing infrastructure. NBN Co is upgrading the horrible cable network from DOCSIS 3.0 to 3.1 and simply quoting laboratory tests and future undeveloped technology. Whilst they were initially honest about it, they replaced ADSL infrastructure with VDSL2+ infrastructure (ie: not fiber). Naturally they failed because VDSL doesn't work as far as ADSL so to fix this they invented FTTN (Green boxes of VDSL2+ modems you can see all over the country side). Essentially NBN Co has taken billions and changed not much, just putting VDSL2+ hardware only where it is absolutely needed where fiber should have been placed and where DOCSIS 3.1 just dies, depending on who lives one the street.
So what is the end result? DOCSIS (the cable network) never has or never will meet the expectations set to the Australian public by Senator Richard Alston, will eventually be replaced by VDSL2+. All VDSL2+ boxes will be replaced by a company (most likely from Singapore) that will envisage the Australian dream of 100MB/s+ Internet speeds.
End result? The individuals that stole billions in the NBN Co project will get to keep it. When we do get fiber to the house, as we were told we would be, we'll find we're fifty years behind Vietnam in technology.
And get this, connecting to the NBN Co in Australia is compulsory.
Tuesday, June 27, 2017
Ford EL and AU ECU location
Tuesday, May 23, 2017
Find and remove duplicate files in Linux
After maintaining data for years and guessing I have terrabytes of duplicated data. I couldn't find a great solution so I made my own using fdupes.
Firstly, use eyeballs to ensure there will not be any problems:
fdupes -rnm .
If all seems well then remove the duplicates:
fdupes -rndN .
I'm sure this can be approved on. The fundamental concept here is to determine if there is going to be any problems before automatically deleting a bunch of files.
Monday, March 27, 2017
Install Google Assistant
I'm currently running a Moto G3 with Marshmallow and Google Now. My Google Now feed has been bombarded with articles about how I'm going to get Google Assistant for over five months now and as an Australian I thought it would have happened already. Despite what you may read, it isn't going to happen automatically and this article describes how to make it happen.
Firstly you should try Google Assistant via Google Allo to determine if you want it in the first place. Personally I ask AI systems "who shot first" to determine their quality. Google Assistant's comments about Chewbacca impressed me enough to make the switch.
A word of warning you won't find on the web: this process will destroy your launcher configuration and means you'll have to set up all your icons and widgets again. If you've ever moved from Lollipop to Marshmallow this is something you have become accustomed to anyway.
Are you ready to do this? Let's go!
Step 1: Make your phone American (it's only temporary). Go to settings then "Language & input".
Now change your language to English (United States).Step 2: Kill Google. In settings go to Apps.
Now wait forever and find the "Google App".Then go to Storage, Manage Space And now click "Clear All Data".Now go back to Apps and repeat the process for "Google Play services".Step 3: Configure Google Assistant and rebuild the universe. Go back to your home screen and you should notice it has been destroyed. Swipe right to where Google Now was and it will ask to configure Google Assistant. Do this and rebuild your launcher icons and what not.
Step 4: Get the hell out of Dodge. Remember to go back to settings, "Language & input" and change your language back to English (Australia) or whatever. You'll have to keep your language as English (United States) or Google Assistant will stop working.
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.
- Install App2SD on the phone
- Backup app list using App2SD
- Disable USB debugging (if necessary)
- Set the USB mode to MTP (if necessary)
- Plug the phone directly into a PC (no USB hub)
- 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
- Copy the SD contents to the PC12
- Switch off the phone
- Replace the old SD card with the new one
- Boot the phone
- Tell Android to delete the old SD card and pray
- Format and migrate to the new SD card
- Reboot the phone
- Copy the backed up data to the new SD card (I needed a File Manager and AirDroid for this)2
- Re-install App2SD
- Use Superman strength to replace the App2SD backup with the actual backup3
- Use app restore in App2SD to manually confirm to install each and every missing app
- Reboot the phone
- Put everything back to normal. 99% of apps will have fully restored data, use Superman strength for the 1%
- 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
https://developers.google.com/schemas/reference/
Thank you
Tuesday, October 04, 2016
#GoogleTranslate
Thursday, August 04, 2016
Aptitude
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
Sunday, July 17, 2016
blueproximity KDE
Not sure why:
rfkill unblock bluetooth
Configure:
- Lock command:
qdbus org.kde.screensaver /ScreenSaver Lock
- Unlock command:
qdbus | grep kscreenlocker_greet | xargs -I {} qdbus {} /MainApplication quit
- Proximity command:
qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity
From here!
Tuesday, May 03, 2016
PulseAudio why so hard
:~ > pacmd No PulseAudio daemon running, or not running as session daemon. :~ > ps aux | grep pulse pulse 30519 0.0 0.1 479048 8824 ? S
Sunday, September 27, 2015
Ok Internet
/usr/local/sbin/ponyfortune:
#!/bin/bash N=0; while true; do N=$((N+1)); P=`ponysay -l | sed -r "s:\x1B\[[0-9;]*[mK]::g" | sort -R | head -n1 | tr -s ' ' | tr ' ' '\n' | head -n3 | sort -R | head -n1 | tr -d ' '`; printf "$N) $P says:\r\n"; fortune -s | ponyfy | ponysay -F $P | pv -qL750; done;
I took the following from milesluigi @ reddit:
/usr/local/sbin/ponyfy:
#!/bin/bash sed -e 's/america/amareica/g' -e 's/America/Amareica/g' -e 's/anybody/anypony/g' -e 's/Anybody/Anypony/g' -e 's/anyone/anypony/g' -e 's/Anyone/Anypony/g' -e 's/boy/colt/g' -e 's/Boy/Colt/g' -e 's/butthurt/saddle-sore/g' -e 's/Butthurt/Saddlesore/g' -e 's/children/foals/g' -e 's/Children/Foals/g' -e 's/child/foal/g' -e 's/Child/Foal/g' -e 's/cowboy/cowpony/g' -e 's/Cowboy/Cowpony/g' -e 's/cowgirl/cowpony/g' -e 's/Cowgirl/Cowpony/g' -e 's/gentlemen/gentlecolts/g' -e 's/Gentlemen/Gentlecolts/g' -e 's/everybody/everypony/g' -e 's/Everybody/Everypony/g' -e 's/everyone/everypony/g' -e 's/Everyone/Everypony/g' -e 's/feet/hooves/g' -e 's/Feet/Hooves/g' -e 's/folks/foalks/g' -e 's/Folks/Foalks/g' -e 's/fool/foal/g' -e 's/Fool/Foal/g' -e 's/foot/hoof/g' -e 's/Foot/Hoof/g' -e 's/girls/fillies/g' -e 's/Girls/Fillies/g' -e 's/girl/filly/g' -e 's/Girl/Filly/g' -e 's/halloween/nightmare night/g' -e 's/Halloween/Nightmare Night/g' -e 's/hands/hooves/g' -e 's/Hands/Hooves/g' -e 's/handed/hooved/g' -e 's/Handed/Hooved/g' -e 's/hand/hoof/g' -e 's/Hand/Hoof/g' -e 's/\bhey\b/hay/g' -e 's/\bHey\b/Hay/g' -e 's/humans/ponies/g' -e 's/Humans/Ponies/g' -e 's/human/pony/g' -e 's/Human/Pony/g' -e 's/ladies/fillies/g' -e 's/Ladies/Fillies/g' -e 's/main/mane/g' -e 's/Main/Mane/g' -e 's/woman/mare/g' -e 's/Woman/Mare/g' -e 's/women/mares/g' -e 's/Women/Mares/g' -e 's/\bman\b/stallion\ /g' -e 's/\bMan\b/Stallion/g' -e 's/\bmen\b/stallions/g' -e 's/\bMen\b/Stallions/g' -e 's/no\ one\ else/no\ pony\ else/g' -e 's/No\ one\ else/No\ pony\ else/g' -e 's/nobody/nopony/g' -e 's/Nobody/Nopony/g' -e 's/people/ponies/g' -e 's/People/Ponies/g' -e 's/person/pony/g' -e 's/Person/Pony/g' -e 's/philadelphia/fillydelphia/g' -e 's/Philadelphia/Fillydelphia/g' -e 's/somebody/somepony/g' -e 's/Somebody/Somepony/g' -e 's/tattoo/cutie\ mark/g' -e 's/Tattoo/Cutie\ mark/g' -e 's/the\ heck/the\ hay/g' -e 's/The\ heck/The hay/g' -e 's/the\ hell/the\ hay/g' -e 's/The\ Hell/The\ Hay/g' -e 's/troll/parasprite/g' -e 's/Troll/Parasprite/g'
To install:
sudo add-apt-repository ppa:vincent-c/ponysay sudo apt-get update sudo apt-get install ponysay fortune pv
The "P=" line basically asks ponysay to get a list of pony's it knows about, picks one at random, pivots that and does it again because there are three ponies per line to get the name of a random pony. Next it ponyfy's a fortune quote and uses pv to make it render slowly.