Skip to content

Instantly share code, notes, and snippets.

@1fexd
1fexd / id_austria_root_patch.md
Last active November 13, 2024 17:15
ID Austria / Digitales Amt mit Root und/oder entsperrtem Bootloader
@extremecoders-re
extremecoders-re / genymotion-headless.md
Last active November 2, 2024 10:24
Run Genymotion on a Headless server

As per the official documentation it's not possible to run Genymotion on a headless server. This is because Genymotion does the UI processing outside the VM on the host. If the host is headless, i.e. doesn't have hardware acceleration, Genymotion won't be able to render the Android OS display. As a result the VM will boot up in VirtualBox but there won't be any display.

(Note that getting a GUI via X11 Forwarding, XRDP, X2Go is not the same as a dedicated display. These are virtual displays. The Genymotion app will start but on booting an Android VM the player window will be blank.)

Quoting from https://stackoverflow.com/a/39448004/1833653

When you start a Genymotion device on the standard way from Genymotion Soft, the Android OS is starting inside a VirtualBox VM but all the UI processing (which uses OpenGL) is done outside the VM to make the rendering pipeline uses your computer's GPU. Using this hardware acceleration makes the Genymotion devices fairly smooth and fast.

When you start the Genymoti

@Aikhjarto
Aikhjarto / DD_WRT_nvram_tricks.txt
Last active May 17, 2024 21:31
DD-WRT nvram tricks
This file provides some nifty command-line tools around DD-WRT's nvram command.
https://www.dd-wrt.com/wiki/index.php/Hardware#NVRAM
USE WITH CAUTION: fiddling with nvram can wipe your settings and you may loose access to your router.
Hint 1: Different version of DD-WRT might use different nvram variables. Thus, be carefull when updating.
Hint 2: The commands listed below should be issued via a ssh-connection since the webinterface for issuing commands might time out for the longer commands.
Background
==========
Extracting the content of configuration variables with nvram would provide an easy way of selective backup/restore of settings. However, listing the content of the nvram via
nvram show
@cyberang3l
cyberang3l / Libvirt-Start-VMs-In-Order-Instructions.md
Last active May 20, 2024 16:03
Necessary scripts and procedure to start libvirt VMs in a provided order, with an given delay before starting each subsequent VM.
  1. Ensure that your VMs can shutdown gracefully when the power-button is pressed.

  2. Place the file vm-boot-order.py in /opt directory

  3. Make it executable: chmod +x /opt/vm-boot-order.py

  4. Check that the script starts and shuts down your VMs as expected. The script can be executed as follows:

     /opt/vm-boot-order.py start
     /opt/vm-boot-order.py stop
     /opt/vm-boot-order.py status
    
  5. Make a systemd service to execute the script when booting or shutting down the hypervisor:

@pretorh
pretorh / Listing watched files on kodi (xbmc).md
Last active May 23, 2022 16:58
Listing watched files on kodi (xbmc)

Listing watched files on kodi (xbmc)

To list the full path of all watched files that are still accessable: (assuming the sql query was saved to list-watched-files.sql)

sqlite3 ~/.kodi/userdata/Database/MyVideos90.db < list-watched-files.sql | xargs -L 1 -I filename ls "filename" 2>/dev/null

Explanation

Get the list of watched files from the Kodi database

Kodi uses sqlite databases, located in ~/.kodi/userdata/Database/. The video database is MyVideosXX.db, where XX is the version (MyVideos90.db on OSMC on 2015-05-09)

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@ChristianUlbrich
ChristianUlbrich / update_dns_hosteurope.sh
Last active January 27, 2021 22:21
Aktualisiert eine Subdomain bei HostEurope - auch bekannt als "poor man's dyndns". :)
#!/bin/sh
#aktualisiert DNS-Einträge bei HostEurope
#HostEurope-Zugangsdaten
KUNDENNR=xxx
PASSWORD=xxx
#Host-ID des eigentlichen Eintrages
HOSTID=xxx
#externe IP bestimmen und dann vergleichen