Posts

Showing posts from 2017

test automation

Dowloaded a project sent me by BP. Needs docker and NPM. NPM’s already there, and docker just comes from the Arch repos. npm i installs the dependencies. To run the docker daemon it’s dockerd (makes sense of mongod for me). Then find I need to adjust my permissions ( usermod -a -G docker <username> ). and… that’s it?

core dynamics

Lately I’ve been actively observing my processes when I’m working and trying to be analytical about them so I can make best use of my time and energy (physcial and emotional!). After our latest Scratch game jam I had a thought which seemed relatively important in terms of approaching the production of a game, and maybe about the end product itself. Last night we made Atomic Nudist X . The procedure was to generate a random name then make a minimal viable product within a short timescale (an hour, in this case). Before adding it to the code pod game studio on Scratch, I spent a few minutes fixing some obvious bugs and rolling it in glitter, and it occurred to me how lacking it was in any ludic qualities. We hadn’t gotten around to including collision detection or any real incentive to avoid the baddies. My only motivation was to troubleshoot technical issues - there’s no way I could accidentally start having fun with it as an actual game . Compare that experience with Pen...

vscode tabs

Image
Taken up vscode with avengence - lovely stuff. There’s a few little bugs, like code folding in vim mode, but I figure I can live with that ‘til it gets sorted. Anyways, here’s what to add to keybindings.json to make my usual alt+arrow keys move back and forth through open tabs: { "key" : "alt+right" , "command" : "workbench.action.nextEditor" }, { "key" : "alt+left" , "command" : "workbench.action.previousEditor" } Oh, and here’s how you embed an image in md, just ‘cause I happen to be here: ![ image ]( https : //www.royalcanin.com/~/media/Royal-Canin/Product-Categories/cat-senior-landing-hero.ashx)

testing syntax highlighting add

OK! Got this working with gruvbox theme same as my vim setup. Basically, just add < link href = 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/gruvbox-dark.min.css' rel = 'stylesheet' /> < script src = '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js' /> <script type= 'text/javascript' > hljs.initHighlightingOnLoad(); </ script > in <head> function $initHighlight (block, cls) { try { if (cls.search( /\bno\-highlight\b/ ) != - 1 ) return process(block, true , 0x0F ) + ` class = "${cls}" `; } catch (e) { /* handle exception */ } for ( var i = 0 / 2 ; i < classes.length; i++) { if (checkCondition(classes[i]) === undefined ) console.log( 'undefined' ); } } export $initHighlight; // note - you use csh for this not css! body { background : black; color : white; margin : 0 ...

sort within blocks

Started using style guides, one of which specifies that CSS declarations be listed alphabetically. Not sure what most people’s solutions to that is, but I’m just going to whack CSS in however and periodically run vi{ :sort v - enter visual mode i{ - select inside braces : - enter command mode sort - sort alphabetically look at :help sort for other options, eg: %sort! - reverse alphabetical %sort u - sort and remove duplicate values %sort n - sort numeric etc

Node issues

Not sure quite what happened, but I pacman -Syu ‘d as normal and got a bunch of errors relating to npm (basically a whole list of exists in filesystem errors). Now, if I’d been sensible with the xps like I was with the latitude I would’ve done $sudo pacman -Syu --ignore npm , seen a missing ca-certificates.crt file and (hopefully) found my way to the Arch news posting that told me how to resolve. I could then have --ignore ‘d npm or whatever and figured out the real deal later. What I did do was rename /usr/lib/node_modules/npm (the source of the files I could see) to npm.bak then upgrade as normal. This has fucked me. Then I get errors any time I try to run any node or npm command saying shared library error, libcrypto.so.1.0.0 does not exist. Symlinked that to whatever libcrypto I did have, got same issue for libssl.so.1.0.0. Symlinked that , got some error about undefined ssl symbols or I dunno what. So. uninstalling and resintalling npm and node doesn’t work. downgra...

wifi confirmation

`systemctl start netctl-auto@wlp58s0` is definitely the way to go in the first instance when I don't automatically connect to an established profile. I think in the past I would restart netctl and that would take ownership away from from netctl-auto and that's when things started getting additionally messed up.

Statusline Arrows

I really want to use input mono as my main font for coding, but it seems to push out the alignment on my vim-airline and powerline-shell statuslines. Rather than get into a whole thing patching fonts with super-tweaked arrow icons I just decided I could live with square separators. Vim-Airline Add this to .vimrc : let g:airline_left_sep = '' let g:airline_right_sep = '' Add what you like between the quotes for separators. Powerline-shell Add --mode flat as a flag to the line that calls the python script in .bashrc . The other thing I did with powerline-shell was edit powerline-shell.py to the ‘untracked’ character is not u2753 , which is not available on any of the patched fonts. I used u26A0 which is a triangle with an exclaimation mark. Seems appropriate. I also finally figured out that the colors in powerline-shell/themes/default.py are the ones shown here - cterm or something, I dunno. Backup default.py change the colors as you...

Blogging Like a Hacker

Testing YAML front matter for pushing blogposts to blogger from stackedit.io .

the latest wifi adventure

more flakiness systemctl enable netctl-auto@wlp58s0 systemctl start netctl-auto@wlp58s0 No idea if some of my earlier actions ( netctl-auto enable-all ) or the stopped status of netctl had anything to do with anything. Not tested resume from suspend yet.

nectl-auto

Every so often I get sucked into the wifi-config labyrinth. I have my standard things I try: $ netctl restart my-network $ ip link set wlp58s0 down etc Here’s what I had to do this time: $ netctl stop-all $ systemctl start netctl-auto@wlp58s0 I don’t know what the interface was hung on. Hopefully I’ll learn to do all this stuff properply one day… Written with StackEdit .

Test Export

Test I’m using stackedit to write markdown docs and save them to googledocs. I’ve just seen that there’s an option to export to blogger, so I’m testing how the formatting works. Here’s an inline code block , and here’s a code paragraph For (i=0; i<10; i++) { etc etc } I guess in a perfect world I'd be able to add syntax highlighting... What else? quoted text block? Subheading -[ ] checkboxes don’t even work -[ ] in stackedit -[ ] with github formatting on :-( and so forth.

random note

changed to numix-cinnamon theme (for workspace switcher numbers, opaque taskbar, general dark theme) I'm trying to get this stuff all saved as configs and backed  up to github, but there are various aspects of system config I wouldn't necessarily be able to reproduce if my system borked need to get proper snapshot backups in place really

8bitdo

start Looking to update the firmware on the 8bitdo. http://www.fc30.com/eng/Firmware-update.html  & http://download.8bitdo.com/Manual/FC30_Pro_Manual_ENG_v1.0.pdf Have nothing for Linux http://www.omgubuntu.co.uk/2016/08/update-8bitdo-firmware-linux suggests  fwup update fwup is in the AUR but depends on  fwupdate  which in turn depends on  pesign did it work? Of course not!  fwupd  gives command not found. Looked at the  github page  and tried  fwupdmgr get-devices  instead: Error calling StartServiceByName for org.freedesktop.fwupd: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.fwupd': timed out next back to the  AUR page  where a comment describes my issue but the package maintainer’s proposed solution (comment out a line in some file somewhere) does not work. Am abandoning this approach for now. Not priority. I thought I had updat...

arch mirror list

I have a feeling I'm not managing my arch mirrorlist very well. https://wiki.archlinux.org/index.php/Mirrors#List_by_speed back it up: (NB don't do this on xps now as it only contains the 6 fastest!) # cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup uncomment all: # sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup rank and output 6 fastest: # rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist

dwarf fortress

dwarf therapist (for arch) is not compatible with df past v.43.03 downgraded to this version, but got errors because libGLEW.so.1.10 is now long replaced by 2.0. So: $ pwd /usr/lib32 $ sudo ln -s libGLEW.so.2.0.0 libGLEW.so.1.10 now complains that the index file is corrupt, but making progress as per the https://wiki.archlinux.org/index.php/Dwarf_Fortress#Troubleshooting advice, I went to http://robertqualls.com/2013/06/24/getting-dwarf-fortress-to-work-on-linux.html and changed the persmissions settings in the /bin/dwarffortess and /usr/bin/dwarffortress and /opt/dwarffortress (more?) None of which worked. It does run with sudo, but as the post suggests, this is not a good ideal, so I'd like to find a fix.

vim clipboard

paste from system clipboard: "+p yank to system clipboard (without copying line numbers!): :1,21y+ (the above yanks lines 1 to 21 - use :%y+ to get everything ) There are probably logical extensions of these you can figure out.

bluetooth xps13

bluetooth's a bugger. I've not used it for ages, and figure it's eating my battery up most of the time. https://wiki.archlinux.org/index.php/Power_management#Bluetooth used systemctl enable rfkill-block@bluetooth.service to try to remedy. I'm writing this down because as soon as I forget this I'll want to play a game with my 8bitdo or link the laptop to the bluetooth speaker or something. i guess it's just a matter of systemctl disable the same service and maybe restarting it? [2017-02-12 EDIT] This didn't work - or didn't persist past reboots/updates, whatever. So frustrating. I just used systemctl stop bluetooth.service but I don't know if that actually kills the hardware process and stops battery drain of it just stops a management daemon. More reading required, but not right now.

firefox default zoom

go to about:config change value of layout.css.devPixelsPerPx

XHTML

http://www.w3schools.com/html/html_xhtml.asp

APIs

https://www.programmableweb.com/api-university/what-are-apis-and-how-do-they-work This analogy with power sockets is the best API metaphor I've heard yet.