Kategoriarkiv: Linux

Adding SSH Keys to CloneZilla disk-image

Create working-directory in root’s homdir: root@Voyager:~# mkdir my-clonezilla root@Voyager:~# cd my-clonezilla/ root@Voyager:~/my-clonezilla# Generate SSH Keys: root@Voyager:~/my-clonezilla# ssh-keygen -t rsa -f ./id_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been … Læs resten

Udgivet i Linux | Skriv en kommentar

Screenshot script for Ubuntu 18.04

This script will take a screenshot, upload it to a server and copy the URL into your clipboard and finaly play a sound to tell you that it’s done, first install xclip: apt-get install xclip Create screenshot.sh #!/bin/bash filename=’Screenshot_from_’`date +%Y-%m-%d_%H-%M-%S`’.png’ … Læs resten

Udgivet i Linux, Workstation | Skriv en kommentar

WM independant shortcuts with xbindkeys

First install: apt-get install xbindkeys And create a config file, /home/user/.xbindkeysrc: “/home/user/scripts.sh” Control + Alt + P And run xbindkeys -p

Udgivet i Linux, Workstation | Skriv en kommentar

Installing Vagrant and host-manager with LXC on Ubuntu 18.04

This took me quite a while and failed tries to figure out: apt-get update apt-get install lxc wget https://releases.hashicorp.com/vagrant/2.1.2/vagrant_2.1.2_x86_64.deb dpkg -i vagrant_2.1.2_x86_64.deb vagrant plugin install vagrant-lxc vagrant plugin install vagrant-hostmanager You should probably check if a newer version has been … Læs resten

Udgivet i Development, Linux, Vagrant, Workstation | Skriv en kommentar

Inotify, Run (Python) script once it changes

This is sadly Linux Only, start by installing inotify-tools: # apt-get install inotify-tools and create the following script: #!/bin/sh clear echo Waiting for filechange … inotifywait -q -m -e close_write,moved_to –format %e/%f . | while IFS=/ read -r events file; … Læs resten

Udgivet i Linux, Vim | Skriv en kommentar

Apple-style screenshoting with autoupload

Install xclip and scrot: apt-get install scrot xclip Download a shutter wave, i found one here: https://www.soundjay.com/camera-sound-effect.html Actually this one: https://www.soundjay.com/mechanical/camera-shutter-click-03.wav Add the following lines to your i3 config (~/.config/i3/config): bindsym –release Shift+Print exec –no-startup-id scrot -s -e ‘scp $f root@example.com:/var/www/screenshots && … Læs resten

Udgivet i I3WM, Knowledge Base, Linux, Workstation | Skriv en kommentar

Ratelimiting på Linux

Linie 2 matcher kun 10 pakker i sekundet, med en burst på 20 (forklaret længere nede) og disse jumpes til accept. Resten fortsætter i tabellen, hvor man så kan gøre andet med den – f.eks. logge den. iptables -N RateLimit … Læs resten

Udgivet i Knowledge Base, Linux, Networking | Skriv en kommentar

Dræb en SSH session selv når den hænger

Hvis din ssh session hænger kan den lukkes ved at trykke <ENTER><~><.>

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

MVC .NET Core med EF (Entity Framework) og Postgresql som database

Siden Microsoft har ændret taktik og begyndt at koncenterer sig mere om opensource, have vi fået dotnet core. Det er en opensource implementation af deres .Net Framework, der er stadig meget der mangler i dotnet core. men web delen er … Læs resten

Udgivet i Knowledge Base, Linux, Old Base, Uncategorized | Skriv en kommentar

Forward webtrafic during server migration

We had to move some servers to another datacenter, and the customers dns provider was a bunch of n00bs so we had to respond on both ip’s for some time. So we kept a virtualcenter in the old datacenter running … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar