Recent Posts
Infojunk November 2018
This is a collection of interesting links and resources I came across in November 2018, covering topics such as security, Linux, AWS, and development.
Hacking / MITM-API-Testing
Linux
- GNOME3: Shell Mousewheel to zoom into your desktop in your presentations.
- Preload Linux applications
- Setup custom wayland resolution - xrandr will not work anymore!
Windows
Python
KataCode
- KataCode Playground with fully functional real browser shells for learning without barriers (using Containers?).
- GoTTY
How aboutgotty -w docker run -it --rm anapsix/nyancat:alpine?
Spectre/Meltdown
- (IMPORTANT) Phoronix: Performance impact on upcoming Linux 4.20 mitigation with STIBP Overhead well it’s “fixed” now for the final release.
- Kernel Boot Option: disable Spectre, KPTI
spectre_v2=[off,netpoline,amd]nospectre_v2spectre_v2=off nopti …
Connect to GitLab via SSH
Start an SSH Agent
If you haven’t already done so, add the following command to your shell’s RC file (such as .bashrc or .zshrc) to start the ssh-agent:
$ eval $(ssh-agent)
Add Your Generated Key
Use the ssh-add command to add your private SSH key (assuming it is the default id_rsa file) to the agent:
$ ssh-add ~/.ssh/id_rsa
List Keys
You can list the keys currently loaded by the ssh-agent using the following command:
bash: shell table output to json
This post presents a Python script that converts tabular command-line output into a more versatile JSON format. This allows for easier data manipulation using tools like jq, as an alternative to complex text-processing pipelines in bash.
You know that sometimes it would be really great to format a shell output to a more versatile format like JSON or YAML that you can process with jq instead of writing long pipes with text-processing.
Infojunk October 2018
This is a collection of interesting links and resources I came across in October 2018, covering a wide range of topics including browser extensions, collaborative coding, Linux, AWS, and more.
Browser Extensions
- I don’t care about cookies
- Imagus or HoverZoom+ to enlarge images on mouse over (don’t use HoverZoom since it’s a data hog).
- Amazon Infinite Scroll
Collaborative Coding
Focusing on IDEs. Web-based solutions are mostly ignored.
- Floobits - IntelliJ, SublimeText, Atom, vscode-plugin in the works
- CodeStream - the new and fancy one
- tmate - terminal sharing over tmux
- Visual Studio Live Share - Visual Studio Code
- AWS Cloud9 - coding for the cloud
- ScreenHero - h264 video streaming and now bought by Slack.io, lacking Linux support
Linux
- Use Chromium to have Hardware Acceleration in your YouTube Videos - don’t forget to install the h264ify browser extension to force h264 (Chrome chooses VP9 by default which is currently not accelerated).
- Touchpad Gestures for …
Color-Laser-Printer: Xerox Workcentre 6515DNI
After my 15-year-old Konica Minolta magicolor 2530DL finally died, I was on the hunt for a new color laser printer. This post outlines my requirements and compares the top contenders, ultimately leading to my choice of the Xerox Workcentre 6515DNI.
I finally gave up my 15-year-old color laser printer, the Konica magicolor 2530DL, due to a failed firmware update. I cannot find out how to reset the firmware via a USB-Stick since most links now go to 404, and the DL model from 2003 does not have a parallel port anymore. USB and Ethernet are dead. Help is appreciated!
PulseAudio: Mono-Sink Audio
Just in case your 10,000+ employee corporation doesn’t plug in the microphone jack correctly and no one is allowed to ask questions (presentation-only).
Creating a Mono Audio Sink with PulseAudio
To force stereo audio output into a single mono channel, you can use the PulseAudio module module-remap-sink. This is often useful for presentations or when hardware is misconfigured (e.g., a microphone is plugged into an unbalanced stereo input, but only one channel is picked up).
AWS S3 Sync is Not Reliable and Slow!
This article explores reliability issues with AWS CLI’s S3 sync functionality and provides alternative solutions for better file synchronization.
While migrating from s3cmd to AWS S3 CLI, I noticed that files don’t sync properly when using AWS CLI.
I tested with different versions and they all revealed the same behavior:
python2.7-awscli1.9.7python2.7-awscli1.15.47python3.6-awscli1.15.47
Test Setup
- Setup AWS CLI utility and configure your credentials
- Create a testing S3 bucket
- Setup some random files
# Create 10 random files of 10MB each
for i in {1..10}; do dd if=/dev/urandom of=multi/part-$i.out bs=1MB count=10; done;
# Then copy the first 5 files over
mkdir multi-changed
cp -r multi/part-{1,2,3,4,5}.out multi-changed
# And replace the content in 5 files
for i in {6..10}; do dd if=/dev/urandom of=multi-changed/part-$i.out bs=1MB count=10; done;
Testing S3 Sync with AWS CLI
Cleanup
$ aws s3 rm s3://testbucket/multi --recursive
Initial Sync
$ aws s3 sync multi …git: reducing repository size (gc and destructive)
This article discusses two approaches to reducing the size of a Git repository: non-destructive garbage collection and destructive history rewriting. It provides a script for running git gc on multiple repositories and links to resources for more advanced techniques.
Garbage Collection (non-destructive)
This works especially well when removing a file added in the most recent unpushed commit. Git Garbage Collection automates some of these cleanup jobs.
I ran the following over my source folders:
AWS sync is not reliable!
While migrating from s3cmd to the AWS S3 CLI, I noticed that files did not reliably sync when using the AWS CLI.
I tested this behavior with different versions, and they all exhibited the same issue:
python2.7-awscli1.9.7python2.7-awscli1.15.47python3.6-awscli1.15.47
Test Setup
-
Set up the AWS CLI utility and configure your credentials.
-
Create a testing S3 bucket.
-
Set up some random files:
# Create 10 random files of 10MB each for i in {1..10}; do dd if=/dev/urandom of=multi/part-$i.out bs=1MB count=10; done; # Then copy the first 5 files over mkdir multi-changed cp -r multi/part-{1,2,3,4,5}.out multi-changed # And replace the content in the remaining 5 files (6-10) for i in {6..10}; do dd if=/dev/urandom of=multi-changed/part-$i.out bs=1MB count=10; done;
Testing S3 sync with AWS CLI
Cleanup
$ aws s3 rm s3://l3testing/multi --recursive
Inital sync
$ aws s3 sync multi s3://l3testing/multi
upload: multi/part-1.out to s3://l3testing/multi/part-1.out
upload: …Infojunk September 2018
This is a collection of interesting links and resources I came across in September 2018, covering topics like Kotlin, Python, Markdown, note-taking apps, web development, Linux, and more.
Kotlin
- Kotlin vs. Scala vs. Java
- What should I choose instead of Java?
- Super Kotlin Tutorial
- SQL with Kotlin Exposed
- Kotlin Playground
Python
Markdown Notetaking
Some notetaking apps you should give a try. At least Notion is very promising (yet you have to pay).