Skip to content

Instantly share code, notes, and snippets.

View lmiphay's full-sized avatar
🤿
Working from home

Paul Healy lmiphay

🤿
Working from home
  • Dublin, Ireland
View GitHub Profile
@lmiphay
lmiphay / gist:53b006b5f05e0c6b62db
Created April 29, 2015 15:52
gentoo Dockerfile - openrc version
wget http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64/stage3-amd64-20150423.tar.bz2
bzcat stage3-amd64-20150423.tar.bz2 | docker import - 'gentoo:latest'
FROM gentoo:latest
MAINTAINER Paul Healy <ph>
EXPOSE 22
RUN echo "root:supersecret" | chpasswd
RUN mkdir /usr/portage
RUN rc-config add sshd
ENTRYPOINT ["/sbin/init"]
@lmiphay
lmiphay / gist:483903c73322e97d4cea
Created July 16, 2015 08:51
gentoo skype (net-im/skype-4.3.0.37-r5) abort on startup
The suggestion from here works:
http://community.skype.com/t5/Linux/Skype-4-3-crash-on-ubuntu-14-04/td-p/3219892/page/2
sqlite3 ~/.Skype/[YOURUSER}/main.db
sqlite> DELETE FROM Messages WHERE type=68;
sqlite> .quit
Note that this deletes file transfer history.
@lmiphay
lmiphay / .xinitrc for startkde
Last active April 17, 2016 18:28
gentoo KDE 5 Update
# ref: https://wiki.gentoo.org/wiki/ConsoleKit#startx_integration
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session startkde
@lmiphay
lmiphay / 40-vnc.conf
Created June 9, 2016 18:53
tigervnc server type configuration: /etc/X11/xorg.conf.d/40-vnc.conf
# Notes:
# set the server use flag on tigervnc: net-misc/tigervnc server
# turn off compositing/all-effects
# set password with vncpasswd(1)
Section "Module"
Load "vnc"
EndSection
Section "Screen"
@lmiphay
lmiphay / gist:60a602884ff3039c33204aff5a8c754f
Created June 9, 2016 19:11
kde5 plasma custom widgetry
# from: lmiphay overlay
emerge -av kde-misc/plasma-custom-desktop-menu kde-misc/webslice-plasmoid
# see:
# post-install message from kde-misc; e.g. add /usr/share/applications/uxterm.desktop
# add webslice widget to the desktop - sample urls:
# http://www.met.ie/weathermaps/Web_radar.gif
# http://www.yr.no/place/Ireland/Leinster/Dublin/meteogram.png
# http://www.rte.ie/weather/images/nat-today.gif
# top mount point
/shared /shared none bind,unbindable,shared 0 0
# virtual machines
/lxc/c1 /shared/c1 none bind 0 0
/lxc/c2 /shared/c2 none bind 0 0
/lxc/c3 /shared/c3 none bind 0 0
/home /shared/home none bind 0 0
@lmiphay
lmiphay / gentoo runscript to openrc-run fixup
Created October 16, 2016 14:09
One liner to silence boot-up warnings about runscript being used instead of openrc-run
#!/bin/bash
sed -i -- 's/runscript/openrc-run/g' $(grep -l '^#!/sbin/runscript' /etc/init.d/*)
@lmiphay
lmiphay / make.conf
Created October 17, 2016 13:11
Prevent sys-apps/yum from installing a spurious cron file
...
INSTALL_MASK="/etc/cron.daily/0yum-update.cron"
...
@lmiphay
lmiphay / lxc-copy
Last active June 11, 2023 22:38
Cloning/copying an lxc on gentoo (lxc-copy / lxc-clone)
lxc-copy is the replacement for lxc-clone:
mkdir -p <new_lxc_path>
lxc-copy --name=<existing_lxc_name> --newname <new_lxc_name> --newpath /<new_lxc_path>
In the new container:
1. /etc/conf.d/hostname - set new hostname
2. /etc/conf.d/net - set new ip (if static ip)
3. /etc/hosts - add new ip/hostname
@lmiphay
lmiphay / 40-vnc.conf
Last active November 19, 2016 19:06
vnc server configuration for an existing X11 session
# /etc/X11/xorg.conf.d/40-vnc.conf
# requires: net-misc/tigervnc[server]
Section "Module"
Load "vnc"
EndSection
Section "Screen"
Identifier "Default Screen"
# create with: vncpasswd