Name: Danny Angus
Member since: 2002-03-04 10:33:48
Last Login: 2007-11-23 15:22:26

Homepage: http://www.killerbees.co.uk

Projects

Recent blog entries by Killerbees

Note to self: How to re-enable terminal escape sequences in new WindowsConsole

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


restart the console and bob is your uncle.

Syndicated 2018-01-20 14:26:00 (Updated 2018-01-20 14:26:24) from Danny Angus

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 
    

Syndicated 2017-11-23 13:40:00 (Updated 2017-11-23 13:40:41) from Danny Angus

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.

However back to windows, and I can't read any of the files on Win10 because the permissions don't map onto the users and groups in Win10, and UAC doesn't help because it won't allow me to "be" an administrator.

But I found the answer! :-D
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

Syndicated 2017-07-30 15:08:00 (Updated 2017-07-30 15:11:56) from Danny Angus

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 
    

Syndicated 2016-04-14 10:19:00 (Updated 2016-04-14 10:35:29) from Danny Angus

10 Dec 2015 (updated 14 Apr 2016 at 11:06 UTC) »

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
    
Enjoy!

Syndicated 2015-12-10 12:35:00 (Updated 2016-04-14 10:36:41) from Danny Angus

238 older entries...

 

Killerbees certified others as follows:

Others have certified Killerbees as follows:

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page