We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba
and winbind
to properly work.
So, if not installed, install them:
sudo apt-get install playonlinux samba winbind
#!/bin/bash | |
DEFAULT_DISPLAY=:0 | |
X11VNC_DISPLAY="$DEFAULT_DISPLAY" | |
if [ -x /usr/bin/x11vnc ]; then | |
[ "$1" == '-nocache' ] && CACHE_FLAG='-noncache' || CACHE_FLAG='-noncache' | |
[ "$2" == '-guess' ] && GUESS_FLAG='-auth guess' || GUESS_FLAG='' | |
[ -f /root/.vnc/passwd ] && PASSWORD="/root/.vnc/passwd" | |
[ -f $HOME/.vnc/passwd ] && PASSWORD="$HOME/.vnc/passwd" | |
[ ! -z "$PASSWORD" ] && x11vnc -display $X11VNC_DISPLAY -xkb -rfbauth $PASSWORD -rfbport 5900 -shared -forever -nowf -norc -notruecolor -bg $GUESS_FLAG $CACHE_FLAG -noxdamage |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/bin/sh | |
# This script, intended to be run as a cron job, checks if there are any logins or recent logins and shuts down if there are none. It is not intended to be portable and was written on a Ubuntu 16.04 machine. | |
last_login_time=$(grep "systemd-logind" /var/log/auth.log | perl -pe "s/ ip.*//" | tail -1 | date --file=/dev/stdin +%s) | |
if [ $(($cur_time - $last_login_time)) -ge 3600 ] && [ $(who | wc -l) -eq 0 ] | |
then | |
init 0 | |
else |
SNMP is a foundational protocol for enterprise network and system management. Getting it right shows that a vendor actually cares about servicing IT in the enterprise. Debian, and its downstream progeny, Ubuntu, ship a configuration for the SNMP server, snmpd, that's so broken it positively screams "I don't care".
This brokenness is a known thing. The following bug reports go back to , but nothing has been done to address them:
The following has been tested on both Ubuntu 16.04 LTS and 18.04 LTS.
This is a sample script for replacing text to image for Google Document using Google Apps Script (GAS). There is a method for replacing text to text at Class Text of DocumentApp. But there are not methods for replacing text to image. So I created this sample script.
This sample image was created by k3-studio.
The initial goal of this project is to use the raspberry pi in place of my Wireless Range Extender and then going from 3 wireless networks (2.4ghz, 2.4ghz extended, 5ghz) at home to only one (5ghz). This way I'm reducing the exposition to radio waves for the whole familly at home.
Ok, enough drama for now, let's go technical. 😁
# /etc/conf.d/redshift | |
DISPLAY="${DISPLAY:-:0}" | |
# Make it a function in case we have to repeat it in init script later | |
set_xauth() { | |
# common case (works in almost all tested environments (except of lightdm)): | |
#XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*' | cut -d ' ' -f 2)" |
short url: caseywatts.com/selfpublish
my book is out! an applied psychology / self-help book targeted at developers: Debugging Your Brain
Markdown
--> PDF
(as a booklet!)
Markdown
--> EPUB
and MOBI
#!/usr/bin/env python | |
""" A simple Interactive Brokers application that will fetch | |
current market data for a contract from the IB TWS/Gateway. """ | |
import argparse | |
import logging | |
from typing import List | |
from ibapi import wrapper |