Sat, 30 Sep 2017
In order to upgrade a rooted Nexus 6P:
The codename for this device is "angler".
- Download the image.
- Follow section 9 of this guide.
- Plug the USB cable in and on a windows terminal check the connection:
- adb devices
- Boot into bootloader by holding down power and volume down for five seconds or so and check the connection
- fastboot devices
- Flash TWRP if it is not already there. Follow the guide. See this guide too.
- NOTE that in order to boot into recovery mode the USB cable probably needs to be disconnected.
- Install Magisk from this guide.
- Copy the magisk zip file with "adb push G:\g\n6p\Magisk-v14.0.zip /mnt/sdcard"
- Plug the USB cable in and on a windows terminal check the connection:
Sat, 15 Jul 2017
Keywords: Windows setup
I needed to set up a new Windows 10 box. In case I need to do it again, I'm making a few notes.
- https://conemu.github.io/ - https://chocolatey.org/ - https://joelpurra.com/projects/X-Mouse_Controls/ - in chocolatey: - 7zip - autohotkey - clementine - Firefox - GoogleChrome - jdownloader - logitechgaming - Revo.Uninstaller - vim - virtualbox - VirtualBox.ExtensionPack - windirstat - to swap cpas lock and escape - download Interception: https://github.com/oblitum/interception/releases/latest - as administrator, run install-interception /install - add a shortcut to caps2esc.exe to the startup directory - Windows-R / shell:startup / add link
Sun, 14 May 2017
I didn't get as much done on the final day of the Perl Toolchain Summit because I needed to get home for work on Monday. But I did manage to enlist others in helping me, which is even better.
Devel::Cover has always had a problem in that top level statements (those not in a sub) in modules cannot be covered. This is because perl throws away the optree as soon as it has executed. My knowledge of the internals has never been good enough to even work out a sensible plan for how to solve this, but fortunately Aaron Crane is a good deal cleverer than me and thinks he might be able to develop a solution. It may need perl to have extra hooks, or it might involve deep magic, or both, but at least the end of the tunnel is not pitch black any more. Thanks Aaron!
Then I was discussing how to improve cpancover with Olaf and mentioned that a queue for newly uploaded modules would help to reduce latency for the coverage reports. Joel Berger was sitting right there too, and he knows something about Minion, the job queue for Mojolicious. Joel kindly offered to put together a queue system to replace my naïve shell script. Thanks Joel!
I took part in the discussion about the future of the PTS (spolier - we like it, and have a few ideas on how to make it better still) and then it was time to head back home.
Thanks to Neil, BooK, and Laurent for organising such a great event. Thanks to Wendy to keeping us all healthily fed (or not so healthily, if desired). Thanks to everyone who attended and helped make the event such a success. And, as ever, thanks to the sponsors: Booking.com, ActiveState, cPanel, FastMail, MaxMind, Perl Careers, MongoDB, SureVoIP, Campus Explorer, Bytemark, CAPSiDE, Charlie Gonzalez, Elastic, OpusVL, Perl Services, Procura, Oetiker+Partner.
My third day at the Perl Toolchain Summit (PTS) was primarily spent in trying to make the cpancover server and infrastructure into more of a production-ready system and less of a Devel::Cover playground. The first step in this direction was supposed to be easy - I made a login for the metacpan group with the idea that they could regularly rsync the coverage results for backup purposes. Unfortunately, this lead me down a yak shaving path I wasn't planning on travelling until later.
When setting up cpancover, I decided to take the easy option and chuck all the results into a single directory. I made the filesystem ext4 so I wouldn't have to worry about hitting limits. Unfortunately, the metacpan box doing the rsync is set up on ext3 and won't support more that 32k subdirectories. So I need to fix up the way that results are stored. I knew this would come sooner or later, even if only because I would surely one day get sufficiently tired of typing ls and immediately regretting it.
In order to make such a change, I need a proper development area to test it. Cpancover has basically just been running since I set it going about three years ago, when I pretty much built it in place. So before making such a large change I need to be able to control things like the docker image being used and the directories being written to. This is also important to be able to allow anyone else to work on the system. So much of the day was spent on this.
Two people separately came to me with the problem that some of their tests
require extra modules to be installed and so, by default, these tests aren't
run and the coverage suffers accordingly. Four years ago, at the QA Hackathon
in Lancaster, a number of clever people got together, and I was there too. We
thrashed out The Lancaster
which, thankfully, included a solution to this problem. The environment
$EXTENDED_TESTING can be set to indicate that
the user or process
running tests is willing to run optional tests that may take extra time or
resources to complete. So I make cpancover set that environment variable, and
Graham and Tux altered Moo and Spreadsheet::Read respectively to pay attention
to it. I mention this in detail for such a simple change (for me) just to
point out (again) the value of the summit, not just for the work which takes
place at the time, but also for how it smooths subsequent work, even years
I did a few other bits and bobs, and ended up watching an Italian dancing gorilla and a horse on a ladder from Azerbaijan whilst waiting for some modules to install, which can't be bad. (Thanks Eurovision.)
Thanks again to all the sponsors who made this possible: Booking.com, ActiveState, cPanel, FastMail, MaxMind, Perl Careers, MongoDB, SureVoIP, Campus Explorer, Bytemark, CAPSiDE, Charlie Gonzalez, Elastic, OpusVL, Perl Services, Procura, Oetiker+Partner.
Sat, 13 May 2017
My first day at the Perl Toolchain Summit (PTS) was largely spent coding, or dealing with pull requests, tickets, and releasing. The second day had far less of that sort of stuff, and a lot more of the sort of stuff that it's much harder to do away from the summit.
But it started off with a new pull request from Todd Rinaldo resurrecting a closed RT ticket. There is a whole class of problems Devel::Cover has to del with which stem from the program being exercised changing the environment as it runs. The most obvious, perhaps, is changing directory, which is also something I looked at again yesterday. But this time it has to do with dropping permissions during the run. Todd and I had a discussion about it and, with the principles in place we'll deal with the technical matters in the coming days.
Then I had a productive discussion with Leo and Olaf regarding cpancover. With a bus number of somewhat less than one, we want to make cpancover.com more resilient. As a first step, the coverage data will simply be backed up to the metacpan infrastructure, meaning that in the event of hardware failure, or a mistaken rm -r, we can get ourselves back up again with the historical data.
Then I spent some time reviewing the way in which the cpancover server is set up, and improving and documenting the process, with the idea that it should be fairly simple for anyone to be able to reprovision the server, or set up a new one.
I should note here that the cpancover server is generously provided by Bytemark. I also have a personal server there and they provide an excellent service.
After dinner, Leo and Lee helped me through the process of setting up metacpan locally, using vagrant and virtualbox. The process was painless due to the fine work they had done in automating it.
I also managed to process a few odd tickets here and there during the day and do other bits and bobs. All in all, it was the type of day that is only really possible at an event such as this, so thanks again to all the sponsors for making it possible: Booking.com, ActiveState, cPanel, FastMail, MaxMind, Perl Careers, MongoDB, SureVoIP, Campus Explorer, Bytemark, CAPSiDE, Charlie Gonzalez, Elastic, OpusVL, Perl Services, Procura, Oetiker+Partner.
Thu, 11 May 2017
This year the Perl QA Hackathon has been rebranded as the Perl Toolchain Summit on the advice of the marketing team. This is the tenth year that the event has been held and, after missing the first few due to scheduling conflicts with my (then young) children's birthdays, I suppose I have now become something of a regular. This year the event is being held in sunny^W rainy Lyon - a shortish train and car (thanks Lee) ride for me.
The Perl Toolchain Summit (hereafter PTS) has become the most important Perl event of the year for me. It's a chance to get together in one room (two actually) as many of the people as possible who work on the Perl infrastructure. This is not the perl core, but the entire toolchain that fits around the core - primarily focussed on CPAN, the archive of Perl modules. CPAN was one of the first such archives, and the infrastructure around it - especially with regard to CPAN Testers and the MetaCPAN architecture, is generally regarded as without peer.
PTS brings together about 35 Perl developers from around the globe to work on this infrastructure together, and to thrash out the sort of problem in which five or six people can sit together and find a good solution which might otherwise have taken months of discussion to reach.
These discussions often mean that people leave with longer TODO lists than when they arrive, which is probably as it should be. But apart from the discussions, there's also a lot of hacking work that takes place, and it's remarkably efficient, when working on code that uses someone else's module, to be able to lean over and ask them a specific question about that module.
In short, if you or your company cares about Perl, you should probably care about PTS.
PTS started on Wednesday afternoon for me. On the train I was able to merge a pull request for Devel::Cover that I had been putting off for too long. I carried on merging pull requests on Thursday, the first full day of the PTS, and fixed various problems and closed a number of tickets. Then I released Devel::Cover 1.25.
In the evening we had a joint meal at an Ethiopian restaurant, sponsored by cPanel (thanks!) and Lyon almost beat Ajax by enough to get to the Europa League final, but just missed out.
Looking forward to day 2 being as productive.
Many thanks to all the sponsors without whom this event would simply not be possible:
Sat, 22 Oct 2016
Keywords: Windows capslock escape control caps2esc
On almost all modern keybaords the useless capslock key is right where something useful should be. Initially the control key would have been there. On some keyboards the escape key was there and this influenced the design of vi.
The escape key and the control key can actually be combined such that if you press the key on its own then you get an escape, and if you press it with something else you get the control key. Then you need to put this key where the capslock key is now and move the capslock to the escapse key.
On Windows the Interception library can be used to do this. The steps for Windows 7 are:
- Download and install the Windows Driver Kit from https://www.microsoft.com/en-us/download/details.aspx?id=11800 - Set WDK to C:/WinDDK/7600.16385.1 (or wherever it was installed) - git clone https://github.com/oblitum/Interception - run buildit.cmd in the library directory - run buildit.cmd in the samples/caps2esc directory - copy caps2esc/objfre_wxp_x86/i386/caps2esc.exe and library/objfre_wxp_x86/i386/interception.dll into a new directory (I use C:/caps2esc) - add a shortcut to c:/caps2esc/caps2esc.exe to the startup directory
For linux use caps2esc, but this won't work well inside a VM.
For Windows 10 tihngs are somewhat simpler:
- download Interception: https://github.com/oblitum/interception/releases/latest - as administrator, run install-interception /install - add a shortcut to caps2esc.exe to the startup directory - Windows-R / shell:startup / add link
Wed, 28 Jan 2015
Keywords: linux debian conntrack
To set up conntrack on debian 6:
# aptitude install conntrack # modprobe nf_conntrack_ipv4 # cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max # cat /proc/net/ip_conntrack # aptitude install iptstate # rehash # iptstate
Sat, 27 Jul 2013
Keywords: rvm ruby 1.9.3 tmuxinator zsh
In order to upgrade tmuxinator I needed to run Ruby 1.9.3. So I installed rvm as follows:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
and added the following to my .zshrc:
if [[ -e ~/.rvm/scripts/rvm ]] then . ~/.rvm/scripts/rvm . ~/.rvm/gems/ruby-1.9.3-p448/gems/tmuxinator-0.6.2/completion/tmuxinator.zsh fi
$ rvm install 1.9.3 $ rvm use 1.9.3 --default $ gem install tmuxinator
I also had up change my tmuxinator config files:
$ cd ~/.tmuxinator $ perl -pi.bak -e 's/cli_args/tmux_options/' *.yml $ perl -pi.bak -e 's/tabs/windows/' *.yml $ perl -pi.bak -e 's/^project_//' *.yml $ perl -pi.bak -e 's/-2$/-l -2/' *.yml
The last change there is because with just the "-2" in tmux_options I got the error:
in `tmux_options': undefined method `strip' for -2:Fixnum (NoMethodError)
Sat, 22 Jun 2013
Keywords: linux ubuntu postfix Return-Path Sender From
My family connects to my mail server in order to send mail. But everyone has mail addresses that differ from their login names. On sending mail, postfix would add a Return-Path header matching my username on the mail server. In order to have the correct Return-Path added, I created /etc/postfix/generic with the following content:
email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org
And added to /etc/postfix/main.cf:
smtp_generic_maps = hash:/etc/postfix/generic
# postmap /etc/postfix/generic # service postfix restart
Passing that mail through another server running exim4, I added the following lines to /etc/exim4/exim4.conf:
no_local_from_check untrusted_set_sender = *