Posts

Showing posts from 2018

Arch XPS shut down on suspend

XPS is shutting down on every suspend action - closing lid, power button, manual select - instead of suspending following an arch upgrade. solution is just to go through a proper shutdown process and start up again.

detect printer on network

to detect the printer on my new WAN, I tried `avahi-browse -alr` but the demon wasn't running. `systemctl start avahi-daemon.service` sorted that.

no sound (headphones)

`alsactl restore` https://bbs.archlinux.org/viewtopic.php?pid=1749454#p1749454

2018-05-09-importing-images

I always seem to have this recurring problem getting images into react components whose sole purpose is to handle images. Problem You can import an image from a local source easy enough, but I want to pass a reference to the image in as a prop, and props aren’t available outside the class. I can require() an image url within class easily enough, but this function only seems to accept literal URLs, not props.sourcePath (or whatever I’ve called it). And then I get confused passing this stuff through to styled-components . It feels marginally less complicated to use an <img /> tag since the src can sit right on there and can be accessed more easily by whatever approach I’m taking. When I want to use an image as background-image on a styled.div… man, I’m lost. You can find stuff about this online, but it’s not as straightforward to find and adapt a solution to this as it seems to be with most things I get stuck on. (current) Solution After my latest round of trial and er

vim

vim Vim :bufdo - do to all buffers eg :bufdo e! to update after a $ git pull reload with update

vim

`:bufdo e!` reload all tabs after `$ git pull`

2018-04-05-ssh-aws-yulife.md

I was getting ‘access denied - public key’ until I did the following: ssh -i ~/.ssh/yu-wiki.pem ubuntu@ec2-54-229-139-63.eu-west-1.compute.amazonaws.com

metro bundler can't listen on port 8081

Metro Bundler can't listen on port 8081 sudo lsof -i :8081 kill -9 [process number]

arch won't boot

... something to do with there not being a `/bin/plymouth' executable, but that's a red herring. I'd post the actual stop error but I'm in the bath now. short version: fstab got corrupted during a bad shutdown. i looked around the arch wiki page and tried targeting the specific drive that wasn't recognised, but in the end just ran `fsck -AR -y`

W is not an editor option

command! -bang -range=% -complete=file -nargs=* W <line1>,<line2>write<bang> <args> command! -bang Q quit<bang> get rid of that annoying uppercase W complaint by pasting this into .bashrc