Skip to content

Instantly share code, notes, and snippets.

View dryliketoast's full-sized avatar

Michael Kane dryliketoast

View GitHub Profile
@dryliketoast
dryliketoast / gist:1fb9bea91ef1e4b7953d737bd84a8dcb
Created January 27, 2018 01:11
Libvirt + Apparmor + Overlayroot
On Ubuntu, apparmor will sometimes prevent libvirt from working.
/usr/sbin/libvirtd: error while loading shared libraries:
libvirt-admin.so.0: cannot open shared object file: Permission denied
If you are seeing the libvirt container fail with the error above, disable the libvirt profile.
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
@dryliketoast
dryliketoast / gist:63d4ebe2ffa4b2b9023c463a41ede53d
Last active January 27, 2018 01:11
SAMBA with Win10 version 1709
https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server
If you are not planning to enable anonymous (guest) access to shares
or you need to get things working again without using REGEDIT on Windows
remove the map to guest parameter or set it to Never (default)
map to guest = never
you also need to ensure each share has a user
add users to smb like this:
IF THE DEVICE CONTAINS A VALID MD SUPERBLOCK, THE BLOCK IS OVERWRITTEN WITH ZEROS:
# mdadm --zero-superblock /dev/sdc /dev/sdd
CREATE RAID1 USING /DEV/SDC1 AND /DEV/SDD1
# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1
https://raspberrypi.stackexchange.com/questions/4474/tightvnc-copy-paste-between-local-os-and-raspberry-pi#4475
First install autocutsel (sudo apt-get install autocutsel)
Then open your /home/pi/.vnc/xstartup (nano /home/pi/.vnc/xstartup) and put autocutsel -fork on it like this:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
autocutsel -fork
Ubuntu 16.04 LTS
To install the LTS branch of LXD, run:
apt install lxd lxd-client
To install the feature branch of LXD, run:
apt install -t xenial-backports lxd lxd-client
https://stackoverflow.com/questions/14914715/express-js-no-such-file-or-directory#14914716
There are two package in Ubuntu that have similar names, node and nodejs.
node does this,
Description-en: Amateur Packet Radio Node program. The node program accepts TCP/IP and packet radio network connections and presents users with an interface that allows them to make gateway connections to remote hosts using a variety of amateur radio protocols.
DISM tool
https://support.microsoft.com/en-us/kb/947821
# DISM.exe /Online /Cleanup-image /Restorehealth
System File Checker (SFC) Scan:
https://support.microsoft.com/en-us/kb/929833
# sfc /scannow
# convert large.jpg -resize 150x -gravity center -extent 200x175 output.jpg
// scales large.jpg so the width is 150px (height is calculated)
// move resized image to center of a canvas that is 200x175px in size
// save the new image as output.jpg
Create test user:
useradd test
passwd test
usermod -G www-data test
usermod -d /usr/share/nginx/html test
chown test:www-data /usr/share/nginx/html
Additions to sshd_config:

Keybase proof

I hereby claim:

  • I am dryliketoast on github.
  • I am dryliketoast (https://keybase.io/dryliketoast) on keybase.
  • I have a public key ASBNENxIg6zaeZX0VOh3AgZ_5Wom-ofzTizvmBgR1I8HnAo

To claim this, I am signing this object: