So many calendars at so many places! Ligthning / Iceowl is perfect to integrate them all. But how to get the Outlook calendar from the office?

With a Powershell script and Box.com (or Dropbox or …)! Basic idea is from the Hey, Scripting Guy! Blog.

# http://blogs.technet.com/b/heyscriptingguy/archive/2009/12/17/hey-scripting-guy-december-17-2009.aspx

# Requires -version 2.0

Add-Type -AssemblyName microsoft.office.interop.outlook 
$olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type]
$olCalendarDetail = "Microsoft.Office.Interop.Outlook.olCalendarDetail" -as [type]
#$olCalendarMailFormat = "Microsoft.Office.Interop.Outlook.olCalendarMailFormat" -as [type]

$outlook = New-Object -ComObject outlook.application
$namespace  = $Outlook.GetNameSpace("mapi")
$folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar)
$CalendarSharing=$folder.GetCalendarExporter()
$CalendarSharing.CalendarDetail = $olCalendarDetail::olFreeBusyAndSubject
$CalendarSharing.startDate = (Get-Date).addDays(-60)
$CalendarSharing.endDate = (Get-Date).addDays(365)
$CalendarSharing.RestrictToWorkingHours = $false
$CalendarSharing.IncludeAttachments = $false
$CalendarSharing.IncludePrivateDetails = $true
#$MailItem = $CalendarSharing.ForwardAsICal($olCalendarMailFormat::olCalendarMailFormatDailySchedule)

#$MailItem.Recipients.Add("Scripter@Microsoft.Com")

#$MailItem.Send()

$CalendarSharing.SaveAsICal("C:\Users\username\Box` Sync\cal\cal.ics")

Let this run as a scheduled job.

Give Lightning / Iceowl access to the ics file in the Box.com account.

Hardware

Pinnacle PCTV Diversity Stick Solo

PCTV DUAL DVB-T DIV STICK 2001E SPORT EU
613570224143
8230-10028-31

0408230513
8241-01088-01088-0

Software

$ sudo apt-get install firmware-linux-nonfree
$ sudo apt-get install w-scan
$ mkdir ~/dvb && cd $_
$ w_scan -c DE -L > channels.xspf

(XSPF ➞ https://wiki.videolan.org/XSPF/)

VLC ➾ Open file ➾ ~/dvb/channels.xspf ‘L’ ➾ Playlist / Stations list

Linux shell commands which are not that easy to remember; at least for me.

Important: This is a private notebook! I am not responsible for any damage caused because someone else than me uses any of the following!!!

sed

Useful one-line scripts for sed: sed.sourceforge.net/sed1line.txt

Cheat sheets

Link: cheatography.com

e. g. Closed-source Debugging with GDB Cheat Sheet by fristle

man pages reloaded

explainshell.com: Write down a command-line to see the help text that matches each argument

Extract many zip files in folders

Example: Extract foo.zip into new folder ./foo/

1
ls *.zip | awk -F '.zip' '{print "unzip \"" $0 "\" -d \"" $1 "\""}' | sh

Find in time range

1
2
3
touch -t 201406041800 /tmp/findfrom
touch -t 201406041900 /tmp/findto
find ~ -newer findfrom ! -newer findto | xargs ls -l

Copy with progress

1
2
rsync -a --progress /source/folder /destination/folder
rsync -a --progress /source/add-slash-for-files-in-folder/ /destination/folder

Add user to group without log off log in

1
2
sudo adduser myusername thenewgroup
exec su -l $USER

My aliases

Edit ~/bash_aliases and activate with . ~/bash_aliases. (The dot . is short for ``)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Alias definitions.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

alias ll="ls -al --block-size=\"'1\""

# MAC OS X commands to copy to/paste from clipboard
# install xsel by 'apt-get install xsel'
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'

alias aptguu='sudo apt-get update && sudo apt-get upgrade'
alias aptgi='sudo apt-get install'
alias aptgr='sudo apt-get remove'
alias aptcs='sudo apt-cache search'
alias aptcp='sudo apt-cache policy'

The apostrophe in the ls alias is very nice and I didn’t figure it out from the man pages. But GNU Coreutils says:

A block size specification preceded by ‘'’ causes output sizes to be displayed with thousands separators. The LC_NUMERIC locale specifies the thousands separator and grouping. For example, in an American English locale, ‘--block-size="'1kB"’ would cause a size of 1234000 bytes to be displayed as ‘1,234’.

That is for ls without block-size:

$ ls -al /bin/bash
-rwxr-xr-x 1 root root 1029624 Nov 13  2014 /bin/bash

And ls with block-size:

$ ls -al --block-size="'1" /bin/bash
-rwxr-xr-x 1 root root 1,029,624 Nov 13  2014 /bin/bash

to be continued…

Install tcplay:

sudo apt-get install tcplay

Create mount point:

mkdir /media/truecrypt

Insert USB stick and identify device name with

lsblk

Map & mount:

sudo tcplay -m truecrypt -d /dev/sdc1
sudo mount /dev/mapper/truecrypt /media/truecrypt

Release USB stick:

sudo umount /media/truecrypt
sudo dmsetup remove truecrypt

… with links to extensions.gnome.org

Configure with

gnome-shell-extension-prefs