Skip to content

Instantly share code, notes, and snippets.

@rduplain
rduplain / xscreensaver-watch.sh
Created October 8, 2012 15:02
Watch xscreensaver lock/unlock events and act on them.
#!/bin/sh
# Watch xscreensaver and react to status changes.
#
# Replaced my previous perl-based recipe with this:
# http://semicomplete.googlecode.com/svn/tools/xscreensaver-watch.sh
#
# Include somewhere in X session startup with:
#
# xscreensaver-watch &

Notes

  • This shouldn't be any more dangerous than flashing anything else, but as always be careful. If something does break, it's on you.
  • When you have a terminal or CMD window open (which you will), keep it open until you're sure you're finished with everything! Unless you know what you're doing, it can be a hassle to CD into the right directory.
  • On Windows, make sure you have the LG Mobile drivers installed.

Windows 10

  1. Open the Windows Store and install the Ubuntu (by Canonical) app.
  2. Open Ubuntu and let it install.
  3. Once installed, make sure everything is updated, using sudo apt update and then sudo apt dist-upgrade.
  4. Make sure you have the following:
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@ThePlenkov
ThePlenkov / boot.sh
Last active November 13, 2024 23:49
Resolve WSL DNS automatically
#!/bin/bash
# Remove existing "nameserver" lines from /etc/resolv.conf
sed -i '/nameserver/d' /etc/resolv.conf
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf
# we use full path here to support boot command with root user
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null