immenser Pirat

Start

piratenpartei.png

avatar.jpg

Kalender

Projekte

fedora   fedora

Releasewechsel

dnf -y upgrade --refresh;
dnf -y install dnf-plugin-system-upgrade;
dnf -y system-upgrade download --refresh --releasever=28;
dnf system-upgrade reboot;

Standardinstallation ergänzen

  • einmal ergänze, immer aktuell
rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm;
rpm -Uvh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm;
dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm;
dnf -y update;
dnf -y install screen atop fail2ban-all evolution-bogofilter iotop nethogs NetworkManager-openvpn-gnome emacs-nox aspell-de cups-pdf openssh-askpass powertop torbrowser-launcher gitk git-gui;
dnf -y install firefox chrome-gnome-shell seahorse icedtea-web libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-langpack-de libreoffice-writer flash-plugin blender gimp simple-scan xsane-gimp backintime-gnome brasero gparted p7zip dconf-editor gnome-tweak-tool revelation yumex-dnf pavucontrol gnome-shell-extension-openweather gnome-shell-extension-alternate-tab libimobiledevice mumble gnome-books;
dnf -y install gstreamer1-{plugin-crystalhd,ffmpeg,plugins-{good,ugly,bad{,-free,-nonfree,-freeworld,-extras}{,-extras}}} libmpg123 lame-libs --setopt=strict=0
systemctl enable fail2ban sshd;
systemctl restart fail2ban sshd;
shutdown now -r;

firefox extensions

gnome extensions

eclipse plugins

dnf -y install eclipse-egit eclipse-m2e-core eclipse-m2e-core-tests eclipse-m2e-sourcelookup eclipse-abrt eclipse-checkstyle eclipse-eclox eclipse-findbugs eclipse-jdt eclipse-quickrex
dnf -y install texlive-scheme-tetex texlive-collection-latexextra

sshd prüfen

  • wegen ser Sicherheit
## cat /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
X11Forwarding yes
TCPKeepAlive yes

openvpn

  • certs
mkdir ~/easy-rsa
cd ~/easy-rsa
cp /usr/share/openvpn/easy-rsa/2.0/ .
. vars
./clean-all
./build-ca
./build-inter $( hostname | cut -d. -f1 )
./build-dh
mkdir /etc/openvpn/keys
cp -ai keys/$( hostname | cut -d. -f1 ).{crt,key} \
  keys/ca.crt keys/dh*.pem /etc/openvpn/keys/
emacs -nw /etc/openvpn/server.conf
restorecon -Rv /etc/openvpn
ln -s /lib/systemd/system/openvpn\@.service \
 /etc/systemd/system/multi-user.target.wants/openvpn\@server.service
systemctl -f enable openvpn@server.service
firewall-cmd --add-service=openvpn --permanent
  • config
## cat /etc/openvpn/server.conf
cd /etc/openvpn
dev tun
port 1194
proto udp
tls-server
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem
cipher BF-CBC
auth SHA1
server 192.168.fixMe.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
inactive 600
user openvpn
group openvpn
persist-tun
persist-key
verb 4
  • user-key
cd ~/easy-rsa
. vars
./build-key username
  • user-setting
restorecon -Rv /home/$user/.cert

filtering proxy

  • filter
## cat /etc/privoxy/config
listen-address  192.168.fixMe.x:8118
forward / 192.168.fixMe.x:8123
forward 192.168.fixMe.*/ .
accept-intercepted-requests 1
keep-alive-timeout 300
  • cache
## cat /etc/polipo/config
proxyAddress = "::0"

remove old cache

find /var/cache/polipo/ -mtime +7 -exec rm -rf {} \;

reset password

#mount -o remount,rw /sysroot
#chroot /sysroot/
passwd root
exit

docker

  • run basics
docker run -it fedora /bin/bash
docker run fedora /usr/bin/ls /var/www
docker cp fedora /etc/httpd/conf/httpd.conf .
docker run -d -p 80:80 -v /root/docker/fedora/html:/var/www/html fedora
docker exec -it <container_id> /bin/bash
docker build -t hello-world .

inadyn

  • Dockerfile
FROM fedora
RUN dnf -y install inadyn-mt
ADD inadyn-mt.conf /etc/inadyn-mt.conf
CMD /usr/sbin/inadyn

gitolite

  • Dockerfile
FROM fedora:27
RUN dnf -y install gitolite3 openssh-server hostname findutils glibc-locale-source
RUN localedef -v -c -i de_DE -f UTF-8 de_DE.UTF-8 || true
RUN ssh-keygen -A
RUN useradd git
ADD admin.pub /tmp/admin.pub
USER git
ENV USER=git
RUN gitolite setup -pk /tmp/admin.pub
USER root
EXPOSE 22/tcp
ENTRYPOINT /usr/sbin/sshd -D
  • docker-compose.yml
version: '2.0'
services:
  git:
    build: .
    image:
      gitolite:latest
    ports:
    - "7999:22"
    volumes:
      - gitolite:/home/git
volumes:
    gitolite:
  • list repositories
ssh git@ip -p 7999 info

murmur

  • Dockerfile
FROM fedora:27
RUN dnf -y install murmur
RUN sed -ie 's/#autoban/autoban/' /etc/murmur/murmur.ini
RUN sed -ie 's/welcometext=.*/welcometext="You made it!"/' /etc/murmur/murmur.ini
RUN sed -ie 's/serverpassword=.*/serverpassword=complicated/' /etc/murmur/murmur.ini
RUN sed -ie 's/#registerName=.*/registerName=myOwnMurmur/' /etc/murmur/murmur.ini
ADD murmur.sqlite /var/lib/mumble-server/murmur.sqlite
RUN chown mumble-server:mumble-server /var/lib/mumble-server/murmur.sqlite
CMD murmurd -fg -ini /etc/murmur/murmur.ini
  • docker-compose
version: '2.0'
services:
  murmur:
      build: .
      image:
        murmur:latest
      ports:
        - "64738:64738"
      volumes:
        - murmur:/var/lib/mumble-server
volumes:
  murmur:

onedrive

  • Dockerfile
FROM fedora:27                                                                                           |for more info):
RUN dnf -y update;\                                                                                      |
    dnf -y install onedrive;\                                                                            |  ‘dired-listing-switches’
    dnf clean all                                                                                        |  ‘dired-trivial-filenames’
ENTRYPOINT /usr/bin/onedrive
  • once: token-building
docker run -it \
  -v onedrive_onedrive:/root/OneDrive \
  -v onedrive_onedrive_cfg:/root/.config/onedrive \
  onedrive:latest
  • docoker-compose
version: '2.0'                                                                                           |for more info):
services:                                                                                                |
  onedrive:                                                                                              |  ‘dired-listing-switches’
      image:                                                                                             |  ‘dired-trivial-filenames’
        onedrive:latest                                                                                  |  ‘dired-marker-char’
      volumes:                                                                                           |  ‘dired-del-marker’
        - onedrive:/root/OneDrive                                                                        |  ‘dired-keep-marker-rename’
        - onedrive_cfg:/root/.config/onedrive                                                            |  ‘dired-keep-marker-copy’
volumes:                                                                                                 |  ‘dired-keep-marker-hardlink’
  onedrive:                                                                                              |  ‘dired-keep-marker-symlink’
  onedrive_cfg:

raspberry pi

next-cloud

webdav

  • setup
sudo apt-get install apache2
sudo a2enmod dav_fs
sudo htpasswd -c /etc/apache2/passwords paddy
sudo mkdir -p /var/www/webdav
sudo chown -R www-data /var/www/webdav
sudo systemctl enable apache2
sudo systemctl restart apache2
  • /etc/apache2/sites-available/default
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Alias /webdav "/var/www/webdav/"
        <Directory "/var/www/webdav/">
          DAV on
          Options +Indexes
          AuthType Basic
          AuthName DAV
          AuthUserFile /etc/apache2/passwords
          Require valid-user
        </Directory>
</VirtualHost>

TODO audio network by pa-doc

  • unfinished
- ~/.pulse/default.pa

load-module module-esound-protocol-tcp auth-anonymous=1
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16

sink/tunnel/mDNS
#for servers
load-module module-zeroconf-publish
#for clients
load-module module-zeroconf-discover

##On the sender side create an RTP sink:
load-module module-null-sink sink_name=rtp
load-module module-rtp-send source=rtp.monitor
set-default-sink rtp

##This will make rtp the default sink, i.e. all applications will write to this virtual RTP device by default. On the client sides just load the reciever module:
load-module module-rtp-recv

pi radio

Wie mit einfachen Mitteln Radio gespielt werden kann:

sudo aptitude install mpd mpc
sudo service mpd restart
sudo service mpd status
mpc add http://ndr-n-joy-mp3.akacast.akamaistream.net/7/665/273752/v1/gnl.akacast.akamaistream.net/ndr_n-joy_mp3
mpc {play|stop|clear|current}

pi230v

Es folgt: wie man mit einem Pi 230v-Schaltkreise und Funksteckdosen schaltet.

TODO waterpi

  • Es folgt noch: wie man mit einem Pi die Gartenbewässerung steuern kann.

usb hdd spindown

hdparm -B 25 /dev/sdx

freifunk   freifunk

Kurzanleitung zum Flashen eines Routers

emacs   emacs

gobal

Navigation key
switch to other window C-x o
close current window C-x 0
close other windows C-x 1
help  
shortcuts with C-c C-c C-h
shortcuts widh C-x v C-x v C-h
git  
add C-x v i
pull C-x v i
push C-x v P
next-action C-x v v
diff file C-x v =
diff tree C-x v D
tag C-x v s
log C-x v l
top of tree history C-x v L
latex  
begin/open new block C-c C-o
end block C-c C-e
compile, view result C-c C-c, C-c C-c
toggle-truncate-lines  

plantuml

plantuml-mode installieren

M-x package-install [RET] plantuml [RET]

und Pfad setzen

init.el:
(setq plantuml-jar-path "~/Downloads/plantuml.jar")

elfeed

Wie man mit emacs rss- und atom-feeds lesen kann.

M-x package-install [RET] elfeed [RET]
M-x package-refresh-contents [RET]
M-x elfeed [RET]

blog

Wie man mit emacs im org-mode bloggt.

Und das mit ox-twbs. Auszug aus README:

M-x package-install [RET] ox-twbs [RET]
M-x package-refresh-contents [RET]
init.el:
(package-initialize)
(add-to-list 'load-path "~/.emacs.d/elpa/ox-twbs-1.1.0/")
  key
export to html M-x org-twbs-export-to-html
  C-c C-e w h

org mode

all shortcuts key
Motion  
next/previous heading C-c C-n/p
next/previous heading same level C-c C-f/b
Structure Editing  
new item at current level C-RET
new heading after subtree S-RET
Tables  
move cursor to beginning/end of field M-a/e
kill column M-S-LEFT
new column to left of cursor M-S-RIGHT
move content@cursor to next line M-S-RET
Links  
insert/edit link C-c C-l
insert file link with completion C-u C-c C-l
open file links in emacs C-c C-o
TODO Items/Checkboxes  
select next/previous state S-LEFT/S-RIGHT
new checkbox in plain list M-S-RET
toggle checkbox at point C-c C-c
update checkbox statistics C-u
archive C-c C-x C-a
Tags  
set tags C-c C-q
realign tags C-u C-c C-q
create sparse tree matching tags C-c \
Timestamps  
insert timestamp C-c .
Agenda  
weekly agenda M-x org-agenda-list
global TODO list M-x org-todo-list
ical export all files M-x org-icalendar-export-agenda-files
view whole year v y

package-system

  • add to ~/.emacs.d/init.el

    as described on ergomacs.org

    (when (>= emacs-major-version 24)
      (require 'package)
      (add-to-list
       'package-archives
       '("melpa" . "http://stable.melpa.org/packages/")
       t)
      (package-initialize))
    

blog-tool

Warum ich mit emacs blogge? Darum:

  • emacs [16/16]
    • [X] Rechtschreibung
    • [X] Silbentrennung
    • [X] offline
    • [X] standalone
    • [X] text-basiert
    • [X] tags
    • [X] suche
    • [X] einfache Installation
    • [X] einfaches Backup
    • [X] inline-code
    • [X] inline-code-results (sic!)
    • [X] tables
    • [X] permalinks
    • [X] responsive
    • [X] list of todos
    • [X] agenda-view

Impressum

Sebastian Frenger
Hinter den Langen Höfen 3K
31275 Lehrte - Immensen

+49 177 5422061
email@frenger-it.de