Windows 10 "fall creators update" 2017, more precisely known as Windows 10 version 1709, brings with it a new version of the windows console.
This is the terminal that is used to display cmd.exe and PowerShell commandline environments.
Now the new version is nice, amongst other things it has is variable transparency, but it turns off processing terminal escape sequences from Python (and probably a load of other things) by default.
This is how to turn on the processing of terminal escape sequences in Win10 console V2.
Using RegEdit add "VirtualTerminalLevel" as a DWORD to ‘HKCU\Console’ set to value 0x1
Danny Angus
blog.killerbees.co.uk
Labels
Saturday, January 20, 2018
Note to self: How to re-enable terminal escape sequences in new WindowsConsole
Thursday, November 23, 2017
Note to Self: How to open the react-native debug menu without the rage-shake
I've been playing around with react-native for a week or so, and I'm liking it.
If you don't know what it is, its basically a toolkit for building mobile apps with, one that makes it easy to achieve good looking apps that integrate with your phone without you having to learn low-level details about how phones work (yay for that!).
One of the great things is that, with Android at least, you can use your own favourite editing tools and the Android SDK and react-native will build your app, install it on your phone, start it running, and attach a debugger to the app and the developer tools in your web browser.
All from one simple command:
react-native run-android
It even has a hot-patch and automatic re-load ability so that the running app updates as you edit your source files.
But one thing has been bugging me like mad, though, there is a "secret" menu of developer options installed in the app, including an option to force a reload, but it requires a "rage-shake" to wake it on the phone.
Or should I say it did.. because if you have your phone tethered with a USB to the Android Debug Bridge (adb) you can issue a keypress signal over adb and bind that to a menu or a keyboard shortcut in your computer. Yes, indeed, open a menu on the phone screen with a press of a key in your editor! All you have to do is to bind this command to a shortcut or key binding, and Bob's your uncle.:
adb shell input keyevent 82
Sunday, July 30, 2017
Note to self: How to reset windows permissions
We have just copied a big chunk of files off a broken home NAS by mounting the hdd in a windows PC. Luckily this one has a windows format partition on it, the other one doesn't so I'll need to make a bootable Linux USB dongle, probably via https://www.pendrivelinux.com/ and boot from that.
Run powershell "as administrator" cd to the broken directory and use this command to recursively reset the permissions to the system default set for a whole tree.:
icacls .\ /reset /T /C /L
If that doesn't work you can take ownership of the tree using this command and then try the icacls (eye cackles?) command again
takeown.exe /F .\ /R
Thursday, April 14, 2016
Note to self: How to mount virtualbox shared folders RW, and enable symlinks
So these are two commands to mount shared folder in a linux host on a linux guest so that the guest has full permission in the shared folders.
This first command should be executed on the guest VM
sudo mount -t vboxsf SHARE_NAME /MOUNT_POINT/ -o rw,users,umask=0000
This next command enables symlink creation and should be executed on the host.
VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1
Thursday, December 10, 2015
Note To Self: Display Raspberry Pi CPU Temperature
I have recently been messing around with a raspberry pi at work (a Pi2 model B) for driving display screens for our In-Venue product of which I am the product owner. And very exciting it is too, because the real world is the new frontier (this pdf is also a good primer). If you see what I mean, but more on that another time.
So.. I had to overclock the Pi to improve browser performance to even get near to acceptable speed and smoothness of animations. Pro Tip, the Pi is not a graphics device! Having done this and got acceptable results for a clunky prototype to demo with, and load averages that stayed on the sane side of normal I thought I'd better see if I was frying the CPU. And because I will inevitably forget this useful command I'm saving it here for posterity. Here's how I got the temperature reading..
/opt/vc/bin/vcgencmd measure_temp
Friday, February 27, 2015
Put code in your google docs
I'm writing a technical document using google docs, and I want to put code snippets into it.
I thought this would be hard, before I discovered http://hilite.me/
This awesome, and awesomely simple, web app converts snippets of code into coloured HTML.
It can format a comprehensive range of languages and apply an equally impressive variety of styles.
Here's a snip of javascript, I just copied and pasted it straight in here, so it doesn't handle the overflow well, but you have to admit that its pretty cool for something that has a quick copy/paste/click/copy/paste workflow:
for (var i = 0; i < dataObj.eventData.children.length; i++) { if (dataObj.isProduction){ dataObj.eventData.children[2].outcome.coupling = "1"; } if (dataObj.eventData.children[i].outcome.coupling.length > 0) { outcomeData = dataObj.eventData.children[i].outcome; priceBoost[counter] = Object.create(priceBoostObject); priceBoost[counter].createPriceBoostHTML(outcomeData); priceBoost[counter].applyPriceBoost(outcomeData); priceBoost[counter].applyExtraCss(outcomeData); priceBoost[counter].initialiseAnimatedImages('animated-' + outcomeData.id, 'images/test.png', 'test.html'); priceBoost[counter].checkTextWidth(outcomeData.id); counter++; } }
Friday, January 16, 2015
Privacy In Public III
Google Glass Explorer Program Shuts Down
I'm not going to say a lot about this, except that I'm glad, and I hope that the next step for this tech takes seriously into account the privacy-in-public implications of people walking around with cameras streaming whatever they see.Anyone who was ever concerned with the level of surveillance in modern society by CCTV, helmet cams, the hacking of web-cams, and the use this can be put to by the nefarious activities of GCHQ and the US NSA, will be pleased that the headlong rush to turn us all into autonomous surveillance drones has paused for thought.
Lets hope Google use the pause to reflect on this.
Thursday, May 30, 2013
note to self, how to fix "requires installation of untrusted packages" in Ubuntu
I tried to install a couple of updates on my work laptop, running Ubuntu 12.04, a minute or two ago when prompted by the update manager, and I got the "requires installation of untrusted packages" error.
I've since dicovered that there are two ways round this, one is to allow untrusted packages by doing the update as root or via sudo, and saying "y" when asked
Install these packages without verification [y/N]?But I don't like that, you don't know who might be spoofing you with what fake packages. The better way is to rebuild the apt cache. I found the instructions here, I'm claiming no credit for solving the problem, just reproducing them below so that I can be sure to find them again next time I need them. Hopefully some of you who read this in the future will also benefit.
sudo apt-get clean cd /var/lib/apt sudo mv lists lists.old sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
Enjoy!
Wednesday, May 01, 2013
The Best Indoor Streetview's in London
Googles "indoor streetview" is pretty cool, but when you stray away from the city centre there are some less glamourous locations that are a lot more fun, here are my five faves
Number Five, London's least exciting Art Gallery
View Larger Map
Number four, A garage in a railway arch
View Larger Map
At Three we have.. A Caff
View Larger Map
At Number TWO, Two guys in a post office
View Larger Map
My ALL Time Number ONE: Battersea Auto Stop!
View Larger Map
Friday, April 05, 2013
Privacy In Public II (less privacy)
Ars Technica ran this story last month
“Stop the Cyborgs” launches public campaign against Google Glass ,
Its about a group who think we should resist Google Glass, There are some thought provoking points raised:
As soon as we got inside however, the employees at Starbucks asked us to stop filming. Sure, no problem. But I kept the Glass’ video recorder going, all the way throughAnd
"Google Glass is possibly the most significant technological threat to 'privacy in public' I've seen," Woodrow Hartzog, an affiliate scholar at the Center for Internet and Society at Stanford Law School, told Ars.And
The law has yet to figure out how to unravel the fact that there are many situations where individuals expect privacy in public. So perhaps the best approach to this, at least initially, is a vocal, context-based opposition
Privacy In Public
I'm becoming increasingly disturbed by the possibility of what I call "MAC address stalking", where people could be located if their WiFi is on and if you can associate their phone number with the phone's MAC address.
So imagine my horror this week when I saw these instructions for accessing free WiFi in ASDA stores..
Registering for Asda Wi-Fi couldn’t be easier with just a few simple steps:and from their Terms and Conditions this:
1. Select Asda Free Wi-Fi from your network list on your phone
2. Enter your mobile number
3. Receive a text message with your access code
...
"By signing up to the WiFi service, you agree for us to share your information with ASDA and ASDA group companies for them to use this information for marketing and analytics purposes"Note that "ASDA group companies" probably means the whole of WalMart.
Doing this would mean that ASDA now have a link between MAC address and phone number.
At its most benign this means that whenever the same MAC address is seen nearby (you wouldn't even need to "connect" to their WiFi again) they could "use this information" to send a text or a call "for marketing" or just log you for "analytics purposes".
You wouldn't need to interact in any way for them to know that you walked past their store at 2am.
If this data got into the wrong hands (and ASDA isn't necessarily the right ones) it could be a stalkers charter.
Imagine if you could look up someone's phone number and get their phone's MAC address, then you could use the network to find out where they are connected, and use Google's location service to find their physical location.
Ok its not as simple as it sounds, but if I can imagine it, someone somewhere can make it happen. Interested?
Read more here:
android map - by samy kamkar
Stalker App Strikes Back at iPhones & Starbucks
Hacker pilfers browser GPS location via router attack
Hack uses Google Street View data to stalk its victims
Monday, January 14, 2013
The Road Not Taken
Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,
And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.
Robert Frost
Wednesday, January 02, 2013
Battersea Power Station
The Power Station has been one of my favourite London landmarks ever since I went to the funfair as a young kid, and was scared out of my wits by the roller coaster in the early seventies. In fact I didn't go on a roller coaster again for about ten years.
It was permanently closed down after five children were killed and thirteen others injured in an accident on 30 May 1972 when one of the trains became detached from the haulage rope, before rolling back to the station (the anti-rollback mechanism having also failed) and colliding with the other train. This is the worst accident in history of themeparks.
Friday, May 25, 2012
If Google and Oracle made aeroplanes where would your sympathy lie then?
There's been a lot of talk about the Oracle vs Google court case, and I was reading this when it occurred to me that I have a few reservations about the strength of Google's argument, and perhaps you'd like to hear them.
If you know about the technology you might want to skip ahead a bit, but I have to cover off some background, so we all know what we're talking about.
My thinking first took shape when the Apache Software Foundation (ASF), of which I am a member, was making its initial steps towards developing a Java Virtual Machine(JVM).
At its most simple abstraction the JVM is the thing that runs on your computer, and in its turn it executes the java programs, they are loaded into it. The JVM "hides" the differences between operating systems from the Java programs. For example Mac's and Windows might have different ways for a program to interact with memory, the JVM provides memory management which is the same for all java programs, to make this happen a Windows JVM will be different "inside" than a Mac one.
So Apache were attempting to create an Open Source JVM called Harmony, and it was during early discussions about the "Java Mail API" which I was involved in that I first ran into the issue which is being tested in court right now. (we will ignore the definition of an API at the moment, because we come to that a bit later, it stands for "Application Program Interface" but you don't need to know what that means)
I was PMC Chair of Apache James, a 100% Java email application server, and I had got chatting to the Harmony folks about one thing and another when the subject came up about whether an ASF licenced version of the JavaMail API would have a more natural home amongst the java email fanbois of the James project because it is a framework that allows people to write java programs that handle email more easily.
So I started to think about what this would mean from a code perspective, and began to untangle things in my head, here's where I get to the point, stop skipping!
The thing that we call "JavaMail" is composed of three parts, and this is true for many other Java API's including the ones in the court case, and in fact much of the JVM itself. Those parts are:
i) A specification or definition, this part is the API specification.
b) An internal component which makes one half of the software, This part is the API interface.
2a) An example of the other half that you are free to use, or to replace with an implementation of your own. This part is an implementation of the API, whoever wrote it.
If we use an analogy here, to avoid getting bogged down in abstract descriptions of computer science ideas, we can imagine that an airliner manufacturer would manufacture the floor in such a way as a seat manufacturer could manufacture seats which could be installed after the plane is built, without the plane having to be adapted.
In order for this to happen the specification for the floor connections would be published and made available to seat manufacturers, who would then compete their little hearts out to make the best/cheapest/lightest seats on the market compatible with the floor specification, and sell them directly to the owners of the planes to be installed after the plane is delivered.
The airliner manufacturer will make floors and install them in customers planes.
The specification is a piece of intellectual property, it has taken time to produce and does have some intrinsic value.
The situation in the Oracle v Google case would be analogous to the situation in which a rival airline manufacturer has published an identical copy of the specification of the floor, manufactured compatible floors and is wooing customers and seat manufacturers from the originator of the specification with the promise of compatibility for all the seats and tooling and expertise that they have invested in.
What Oracle are contending, or trying to, or failing to, or *ought to be* saying, is that the specification is not in the public domain, it is their intellectual property and they are within their rights to restrict its use to allow people to implement the replaceable parts (the implementations, the seats), and not the internal part (the interfaces, the floor). In other words, not only is it breach of copyright (as the court has recently determined) but it is also probably not "Fair Use" (which they are still to decide upon) for Google to produce an API of their own to Oracle's specification. If it is, then people are going to very quickly stop publishing API's that allow competitors to benefit from years of research and development.
Of course this is then masked by a big shit-storm of FUD and misdirection by both sides, trying to veer off the subject onto other more easily determined areas of IP law where they believe they have an edge, such as:
The "field of use" restrictions, which are important but not directly relevant to the API arguments.
Patent infringement, of course, which is the modern lawyer's soup-of-the-day for the whole decade and IMHO totally irrelevant here.
And the distracting but easy to comprehend copy'n'paste IP crime where code appears to have been copied from somewhere that it couldn't have been legally.
The last one is the worst FUD of the lot because that is copyright infringement, as is the case where the specification is used in contradiction to the terms of its licence, but its a different crime, a separate incident, qualitatively something else altogether .
From this point of view I don't think Google's position is as solid as they might want it to be, or as solid as the judgements may suggest, but the truth of the matter is that Sun caused this whole debacle by vacillating over the legal status of Java, the API's the JVM, the TCK and a raft of other things that they thought morally *ought* to be open source and free for people to use for any purpose but weren't in law, because they never made it clear enough what was being explicitly permitted and what was being benignly tolerated.
And that is why I have mixed feelings about the merit of Google's case, and some grudging understanding of Oracle's position, and a bad taste in the mouth about Sun's failed attempts to be Machiavellian with the IP laws.
And if you're wondering what happened to James and the JavaMail API, we never did take it on, its a very poorly designed API and would have brought us a lot of work with precious little benefit.
Wednesday, October 19, 2011
Eek! a Patent Troll
So, yesterday a patent troll in the form of a company called Kelora Systems, LLC came to my attention, for reasons which need not concern us at the moment. And having followed up on it a bit I can now understand why so many companies are involved in the aparently insane pastime of suing and counter suing each other through nearly every court in the world. I'll tell you why in a minute, but forst to kelora.
What staggered me is that they claim that they hold a patent, 6,275,821, known rather familiarly as '821, which covers "a method and system for executing a guided parametric search"
What is that? I'll tell you in a few short lines what the patent takes pages to painfully struggle to express:
In order to help people select a product from a catalogue the system displays a list of products and product attibutes.
Then, on the user selecting values the list of products is filtered to show only matching products, and the available attribute values are filtered to only show ones which still apply to the subset of products.
Or more simply still, if your system shows a list of products and gives the user the ability to filter this list by price, or size, or colour, you are potentially infringing the patent. My favourite example can be seen in the left hand column of this page (on a website which isn't within the jurisdiction of the US courts).
I hear you, you just said OMGWTF, didn't you? Yeah, so did I.
So I dug into it a bit and uncovered some interesting bits and pieces, first of all these trolls are gunning for just about everyone you could imagine, and a whole lot of other folks too. And it seems like there are legal challenges afoot by a number of big hitters to get the patent overturned, this from last year which was only partially sucessful and another move in the federal courts to be heard in November (2011).
I know theres a lot of talk about software patents, but for someone to be allowed to use a patent for something as self evident as the "method" and as dated and stuck in the 90's as the "system" is a total indictment of the whole notion. I could understand the intention (but not necessarily agree with it!) if the company had invented a useful product which was differentiated on the basis of the method, and sought to protect their investment, and if it was limited to the field of use originally intended, but this is little more than a patent on the application of common sense to a well recognised pattern of problem (how do you let people browse an online catalogue).
If the US patent office allows people to patent things as non specific as this its little wonder the courts are filled with patent cases, this isn't protecting your R&D this is a land grab for the common sense of the future. And if the courts continue to uphold patents like this, and the patent offices of the world carry on granting them we may find ourselves in a situation where innovation is held to ransom by lawyers and patent trolls.
Note to self, how to get a list of recipients from the maillog
I spent a while figuring out how to get a list of email recipient addresses from the maillog, without duplicates, for a specific day on RHEL.
In the end I distilled it into to one line.
I'm sure I will have to do it again, so I'm making a note of it here, meantime if you need to extract recipient addresses from maillog you're welcome to try it. just paste it onto the command line and hit the go button, its surpisingly quick.
cat /var/log/maillog | grep "Oct 19" |\
grep to= |cut -f5 -d":" | cut -f2 -d"=" | cut -f1 -d"," | \
sed 's/<//' | sed 's/>//' | \
sort | uniq > addresses.txt
Thursday, September 22, 2011
Penis seen from space IV
In my ongoing quest to keep you up to date with these important developments here's another one..
Penis Seen From Space For the other stories check out seen-from-space
Friday, August 19, 2011
Dipping a toe in FCommerce
![]() |
FStore Homepage |
We spent a lot of time looking at other peoples' facebook stores, and rather than try to cram everything in we decided that ours should not be only a replacement for our web store, instead we thought that as we have too much in our catalogue browsing it in facebook would be too cramped an experience. Rather it is intended to promote our web store to our facebook fans, and allow us to do more to monetize our investment in facebook.
![]() |
FStore category view |
So we have created a place where we can showcase a selection of products, in a specially selected range of categories. Our visual merchandisers have full control of the catalogue, using the same systems that they use to merchandise our other online channels, and I hope that in the coming weeks we will see the facebook store take on a character of its own, seperate from, but complimentary to, our main web site.
![]() |
FStore product detail |
![]() | |
FStore embedded "cart" |
Good Job Team!
Thursday, January 27, 2011
note to self, MySQL query profiler
Update The original article mentioned in this post is no longer available, but if you are still interested in query profiling in MySQL, check out this http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html
I will write up an quick start guide to profiling myself here, one day.
-- original post
this article is a great way to get started using the mysql query profiler.
If you've never used it before take some time to check it out, it will change the way you think about the database forever.
Wednesday, January 19, 2011
Note to self, how to get the top tens from MySQL slow query log
Use these two commands to get the top ten and top ten repeaters from MySQL's slow query log.
mysqldumpslow -t 10 ./slow-log > /home/danny/top_ten_slow_query.txt
mysqldumpslow -a -s c -t 10 ./slow-log > /home/danny/top_ten_repeat_slow_query.txt
Further Reading
-
Layers and Gateways, a historical view - One of the major issues in building the Internet or any large network is internetworking. If you have two networks built and run by different entities, h...3 months ago
-
[ANNOUNCE] Apache NetBeans 18 Released - The Apache NetBeans team is pleased to announce that Apache NetBeans 18 was released on May 30, 2023. What's in the Apache NetBeans 18 release: https://...1 year ago
-
The Security Failures of Online Exam Proctoring - Proctoring an online exam is hard. It’s hard to be sure that the student isn’t cheating, maybe by having reference materials at hand, or maybe by substit...3 years ago
-
ApacheCon@Home 2020 - Myrle Krantz has added a photo to the pool: [image: ApacheCon@Home 2020]3 years ago
-
-
GTID implementation - Oracle vs MariaDB - Oracle MySQL has implemented GTID differently from MariaDB; this article walks through some of the key differences. Before we look at the details, let’s ...5 years ago
-
ApacheCon Seville 2016 – Building a Container Solution on Top of Apache CloudStack- Steve Roles - Building a Container Solution on Top of Apache CloudStack- Steve Roles Cloud native applications running in containerised environments look set to create a...7 years ago
-
Nóirín Plunkett - https://www.flickr.com/photos/robertburrelldonkin/5729816462 smiles and socks retreating in co. wicklow now empty whiskey and secrets bar camping in ox...9 years ago
-
Hello world! - Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!9 years ago
-
Debugging MySQL Slow Queries With Many Joins - This week I encountered an issue that I hadn’t seen in a while. The ORM in a CMS project that I work on automatically joins to many subclass tables, causin...11 years ago
-
You’re invited to help us celebrate an unlikely pairing in open source - We are just days away from reaching a significant milestone for our team and the open source and open standards communities: the first anniversary of Micro...11 years ago
-
Boat For Sale - Boat For Sale: Price: £150 Terms and Conditions Oracle reserve the right to alter the web price of this acticle even after purchase. Price does n...17 years ago
-
-
-
-
I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.
Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.
Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)