Posts

Showing posts from 2016

RTL keyboard shortcut

CTRL + SHIFT + X Kept having  my text jump to the right side of the box and start typing right-to-left for no obvious reason. Happened mostly in Trello and especially when adding hyperlinks in markdown. Anyway, somehow I must've been hitting the above combo, as unlikely as that seems.

resolver

I recently had cause to make a complaint to a company I'd been a customer of. I've worked in call centres, and I've managed customer service teams. I know exactly how those environments work and all the things that happen to stop complaints being dealt with, whether they're mistakes by the customer, mistakes (or deliberate mishandling) by the company rep,  institutional failure... and so on. I could write an essay on all those things, but I want to get to the point, which is this: Even though I know how to approach these situations as a customer, it involves a lot of work for me. Dial the numbers, follow the IVR, get to the right department, take the rep's name, take a note of the time, explain your situation, leave your contact details, confirm your contact details, ask for a case reference, establish a timescale.... and that's just the initial call. Then I have to set a reminder for myself, call them back, complain about the lack of contact

ghost

 Installling ghost locally . Warning recived during install: Upgrading Ghost involves replacing old files with the new files, and restarting the server. However, as the database, image uploads and custom themes are stored alongside Ghost in the content directory, care should be taken to only replace the necessary files as explained at http://support.ghost.org/how-to-upgrade/ . It is highly recommended that you make a backup of your data before upgrading. To backup all the data from your database, log into your Ghost install and go to /ghost/debug/. Press the export button to download a JSON file containing all of your data.

netctl issues? netctl-auto not working?

Throwing errors: could not create configuration file for wlp58s0 blah blah in journalctl -xe? sudo killall dhcpcp sudo ip link set wlp58s0 down systemctl start netctl-auto@[network]@wlp58s0

Disable touchpad

Today's mission has been to effectively disable the touchpa on the xps so I can take a more keyboard-driven approach and type in an uninhibited manner without weird annoying shit happening all the time. Long story short, the best way of doing this is with synclient: > synclient TouchpadOff=1 to disable the touchpad and, unsurprisingly > synclient TouchpadOff=0 to enable it again. Now, I can't rely on always being able to remember that stuff in however many month's time I need it again, so I've aliased the commands "ontouchpad" and "offtouchpad" to the relevent instructions. this equates to "on" and "off" when autocomplete is used via TAB. FURTHERmore, I have set Fn+F8 to synclient TouchpadOff=1 so I can quickly deactivate the pad in the heat of the moment. I tried a couple of scripts I found online to toggle the touchpad, but they didn't work for some reasons I didn't prioritise identifying. so, FYI

Photos

In the process of backing up, de-duplicating and collating all the photos from my laptop, the external storage HDD etc. I used the following: $ du -sh Pictures/ du = disc usage -sh = summarise, human-readable Pictures/ = directory path $ find Pictures/ -type f | wc -l find = find Pictures/ = directory path -type f = specify type as file | wc -l = print newline counts (see wc --help for specifics) So it basically lists all the files in Pictures/ but instead of outputting to a txt file it pipes the results to wc, which reads stdout as if it was a txt file, and returns newlines (each of which corresponds to a file). I don't know whether directories are omitted or not. https://www.linux.com/learn/how-sort-and-remove-duplicate-photos-linux Now I skip down to the bit about FSlint, only I install rmlint instead, which seems to be the commandline equivalent recommended by Arch. $ rmlint On it's own looks for empty and duplicate files in the current directory. It ge

rpi wifi

I followed the post here: http://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wifi-network/ to get a rpi wirelessly connected via a dongle. I set it with a static IP (207), but for some reason it's on the network twice - as 207 and 217. Why? Don't fucking know, don't fucking care.

launch steam

LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam on xps I don't pretend to understand it

vim find/replace

:8,20 s/search_term/replace_with/g :%s/foo/bar/gc - search whole doc, ask for confirmation

christ

OK, got netctl-auto handling my wifi as per the instructions on the nrtctl page in the Arch wiki (see last post for link). I also added a new service as described here: https://wiki.archlinux.org/index.php/netctl#Problems_with_netctl-auto_on_resume to handle automatic reconnection on resume from suspend. All good. Then I had a nice time adding some lines to .conkyrc to display relevant information about the network connection (when up). So now I think I have everything I need. The next ball-ache started when I started trying to add a netctl profile for the eduroam service at work. Not only could I not get this working, in the process of trying I somehow managed to stop my previously functional netctl-auto service from doing it's thing. *sigh*. Anyway, long story short: after trying all kinds of start/stop enable/disable I found that netctl start [profile] worked fine, it just wouln't work automatically. I found this forum post: https://bbs.archlinux.org/viewtopi

wifi drama

xps suddenly started having wifi problems. something weird with NetworkManager and the brcmfmac driver/kernel module. p2p_disc error and the network interface wlp58s0 already assigned and nonsense like that. After fucking around for ages I thought I'd identified the issue as being a conflict between netctl and NM, but I've tried disabling netctl and it doesn't seem to resolve the problem with NM. netctl does, however, work perfectly for me, but it's not that useful for logging on to random networks when I'm out and about - the whole point of the xps. so, I'vebeen all round the houses, even trying to get rid of NM completely (can't becuase it's a cinnamon dependency *sigh*) and use systemd.networkd with the wpa_gui  (which is promising, but I can't get to work. I've also mesed about hiding .conf files and creating test ones at /etc/wpa_supplicant /etc/systemd/network, so look out for those if you're looking at this in the future!) my c

bash enquiry

Q: bash command that'll remove all empty folders in the present directory A: find . -type d -empty -delete find finds, . specifies the present folder, -type d specifies directories (to avoid deleting empty files), -empty specifies empty, -delete instructs to delete. duh.

bash enquiry

Q: bash command that'll remove all empty folders in the present directory A: find . -type d -empty -delete find finds, . specifies the present folder, -type d specifies directories (to avoid deleting empty files), -empty specifies empty, -delete instructs to delete. duh.

wireless scanning

I noted way back when that I'd got the wireless Pixma 535 Canon printer working easily with packages from the AUR - I never took note of the ACTUAL packages. Needed to install it on the xps. cnijfilter-mx530series for the driver simple-scan for the frontend. Works off the bad. FAB!

windows change language shortcut

default shortcut ALT + SHIFT cycles through keyboard layouts for different languages. to disable, go to control panel -> Clock, Language and Region -> Change Display Language Language -> Change keyboards -> Advanced Key Settings -> select "between input languages" click Change Key Sequence select Not Assigned for both OK Apply OK/Cancel [edit: to go here quickly open Start, type intl.cpl , enter, then Keyboards and Languages tab] absolutely fucking batshit. This is only for Windows 7 as well... [edit: after removing the shortcut, my keyboard was stuck on something else.

ghostscript

When concatenating PDFs into a single file, I tried imagemagick: convert first.pdf second.pdf third.pdf output.pdf but the resolution suffered. This forum suggests that Imagemagick makes use of ghostscript in this action and provides a command that cuts out the middleman: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=temp.pdf pdf1.pdf pdf2.pdf This worked like a charm, and fast, but I'm not massively happy copypasting commands I'll never remember. 1) record it here for future use 2) alias it, or write a super simple bash script? 3) look into ghostscript and see if I can simplify the command, learn the syntax

ghostscript

When concatenating PDFs into a single file, I tried imagemagick: convert first.pdf second.pdf third.pdf output.pdf but the resolution suffered. This forum suggests that Imagemagick makes use of ghostscript in this action and provides a command that cuts out the middleman: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=temp.pdf pdf1.pdf pdf2.pdf This worked like a charm, and fast, but I'm not massively happy copypasting commands I'll never remember. 1) record it here for future use 2) alias it, or write a super simple bash script? 3) look into ghostscript and see if I can simplify the command, learn the syntax

excel static reference

finally think I've figured this out, after many attempts. quite simple really. http://stackoverflow.com/questions/3881209/keep-absolute-reference-even-when-inserting-rows-in-excel-2007 formula is =INDIRECT("[reference]") the crucial part is the quotes. presumably they turn the refernce into a literal string which obviously does not change with the workbook structure.

excel force caps

Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column < 5 Then Exit Sub If Target.Column > 5 Then Exit Sub On Error GoTo ErrHandler Application.EnableEvents = False Target.Formula = UCase(Target.Formula) ErrHandler: Application.EnableEvents = True End Sub adapted from this forum http://www.excelforum.com/excel-formulas-and-functions/347695-automatically-change-text-to-uppercase.html

excel current date

https://exceljet.net/keyboard-shortcuts/insert-current-date CTRL + ; when recording a macro, this action will be interpreted as insert "11/05/2016" say - rather than "insert current date" you need = Date instead

get_iplayer

https://github.com/get-iplayer/get_iplayer/wiki/documentation my usage so far has been: get_iplayer --type=radio [search term] to locate the Programme ID (PID) then: get_iplayer --type=radio --pid:b00sf0d1

add uefi entry

I managed this more or less by myself. sudo pacman -S linux-lts linux-headers-lts Installing the lts kernel will prompt for the headers, so you might as well do them together. Then go to /boot and find the conf file, under loader or wherever. copy the file and append -lts to the linux img lines and vmlinuz-linux. then sudo bootctl update, reboot, and you should have the new entry in the UEFI boot menu.

jittery gba controls - map to D pad

https://weekendengineer.wordpress.com/2014/09/08/setting-up-gameboy-advance-for-retropie/ got the gba stuff sorted, thanks to this post. F10 after launching a GBS game (keyboard required).

retropie

I wasn't documenting changes I made to the retropie project. As is so often the case, I suppose, each one seemed relatively straightforward and memorable when I figured it out or googled it right. Now, though, I'm looking at starting from scratch with a pi 3 and may have to replicate various bits of config. So here's what I remember. Imaging the SD card and whatnot is as you'd expect. SSH in as user pi and password raspberry. ROMs go in the folders for the appropriate emulator. get rid of screen borders by editing /boot/config.txt and uncommenting #disable_overscan=1 I resized the SNES screen just with screen ratios in the retroarch menus gba only works when you put gba_bios.bin in the same folder as  /opt/retropie/emulators/gpsp, and I altered the config at ROM startup to use gpsp as the default emulator. Controls aren't sorted yet. Will add more as I remember.

resize gifs

https://davidwalsh.name/resize-animated-gif sudo pacman -S gifsicle gifsicle --scale 6 -i basic_walkcycle.gif > basic_walk_cycle.gif [where 1 = 100%, .5 = 50% etc.]

reisub

On x86 - You press the key combo 'ALT-SysRq-<command key>'. Note - Some keyboards may not have a key labeled 'SysRq'. The 'SysRq' key is also known as the 'Print Screen' key. Also some keyboards cannot handle so many keys being pressed at the same time, so you might have better luck with "press Alt", "press SysRq", "release SysRq", "press <command key>", release everything.

hide media

To stop a folder being indexed by the photo app on my android tablet I created an empty text file called .nomedia. Done.

unable to ssh to pi

I just upgraded my raspberry pi media centre to raspi 3 running kodi on osmc. all is well apart from being unable to ping or ssh into my new pi on static IP 192.168.1.239. pinging gives me host unreachable. ssh gives me no route to host on port 22. tried adding -v to ping command on the suggestion of a forum troubleshooting post [mitch@latitude ~]$ ping -v 192.168.1.239 ping: socket: Permission denied, attempting raw socket... ping: socket: Permission denied, attempting raw socket... PING 192.168.1.239 (192.168.1.239) 56(84) bytes of data. From 192.168.1.153 icmp_seq=1 Destination Host Unreachable From 192.168.1.153 icmp_seq=2 Destination Host Unreachable From 192.168.1.153 icmp_seq=3 Destination Host Unreachable 64 bytes from 192.168.1.239: icmp_seq=4 ttl=64 time=83.6 ms 64 bytes from 192.168.1.239: icmp_seq=5 ttl=64 time=102 ms 64 bytes from 192.168.1.239: icmp_seq=6 ttl=64 time=22.7 ms 64 bytes from 192.168.1.239: icmp_seq=7 ttl=64 time=44.2 ms 64 bytes from 192.168.1.239: i

drop shadows required

Finally decided that the lack of borders made distiniguishing all my title-bar-less windows with identical grey styling difficult. Activated compositing and immediately got drop shadows, which resolves it for me. It should also help with the screen tear I get in my browser (qutebrowser).  Just need to get some control over the depth of the shadows and what applications they apply to. I don't want it on the panel, for example.

draft xps install notes

1 )  When the SATA-controller is set to "RAID On" in Bios, the hard disk (at least the SSD) is not recognized. Set to "Off" or "AHCI" before attempting to install Arch. ?) The   "NVM Express"   SSD requires adding "nvme" in modules to detect the PCIe SSD. Edit your  /etc/mkinitcpio.conf  file: ... MODULES="... nvme" ... # mkinitcpio -p linux Then update the bootloader. where  linux  is the name of the image loaded on boot. If you installed  linux-mainline AUR  then change that to  linux-mainline . This note from my last XPS pre-install agenda ... 2) Download linux headers and broadcom-wl driver module tarball to another computer and transfer to the XPS by usb/flashcard. I assume I need to install these in the live arch environment to give me access to the internet, then go to step 3), continue installation, and remember to install the drivers in chroot as well... did I do this? I can't remember.

extend logical volumes

The LVs I set up for my Arch install are getting full - / is 15G and /home is 150G. Both are pushing 90%, so time to extend. [edit] Well, that was stupidly easy. system-config-lvm in the AUR. download it and install it. tar -xvf [file] cd [file] makepkg -sri run it and select/edit volumes in the logical view. It let me extend /home and / in the live system. wow.

install rpm.tar.gz drivers

[edit: gave up trying to build my own package for these drivers - too hard for me right now! Found drivers for the mx500 series in the AUR. Worked a treat when I first installed them, but can't seem to find the printer now. another issue for the list!] [edit] I needed to start and enable the service: systemctl  start  org.cups.cupsd.service systemctl enable  org.cups.cupsd.service The printer is canon pixma mx535. the site actually has linux drivers, but only in rpm http://www.canon-printerdrivers.com/2015/02/canon-pixma-mx535-driver-download.html?m=0 I've downloaded the first one, gunzipped it, then extracted it from the tar tar xvf scangearmp-mx530series-2.30-1-rpm.tar This gave me a bunch of individual rpm files. I ignore the i686 ones, leaving scangearmp-common-2.30-1.x86_64.rpm scangearmp-mx530series-2.30-1.x86_64.rpm I run rpmextract.sh  scangearmp-common-2.30-1.x86_64.rpm and it gives me /etc and /usr filepaths containing udev rule