Skip to content

Instantly share code, notes, and snippets.

View joshschmelzle's full-sized avatar
༼ つ ◕_◕ ༽つ ø

jsz joshschmelzle

༼ つ ◕_◕ ༽つ ø
View GitHub Profile
@joshschmelzle
joshschmelzle / remove-gamebar-powershell-win10.md
Last active September 2, 2024 22:42
How to Remove the Xbox Game Bar with Powershell on Windows 10. Scroll to the end of the gist for Windows 11.

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Please note that some of these first options are probably not be available unless you are running an older version of Windows 10.

Uninstalling/Removing the Game Bar (old Windows 10 build GUI options)

(this is no longer an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.
  3. Right-click on the app and pick Uninstall. Answer Yes to the prompt, and wait for the process to finish.
@joshschmelzle
joshschmelzle / ffmpeg-cut-out-video.cmd
Created November 29, 2016 18:17
Cut a video without re-encoding with ffmpeg
ffmpeg -i input.mp4 -c copy -ss 00:04:25.000 -to 00:09:25.000 output.mp4

macOS/BSD specific

Thanks @seldo and @NurmiWilliam

sudo lsof -iTCP -sTCP:LISTEN -n -P | awk 'NR>1 {print $9, $1, $2}' | sed 's/.*://' | sort -u | while read port process pid; do echo "Port $port: $(ps -p $pid -o command= | sed 's/^-//') (PID: $pid)"; done | sort -n

git-sweep.sh

@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active August 8, 2024 12:28
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@joshschmelzle
joshschmelzle / win-clippy.md
Last active August 6, 2024 20:21
Copy win32 command line output to Windows Clipboard

To save the output of a command on the Windows clipboard, add a pipe* (|) operator to your command followed by the clip command.

Examples

dir | clip - copy the listing of current folder contents to the clipboard.

tree | clip - copy a recursive directory structure to the clipboard.

pwd | clip - copy the present working directory to the clipboard.

@joshschmelzle
joshschmelzle / tftp-server-installation.md
Last active May 16, 2024 04:29
running tftp server on ubuntu

Using tftpd-hpa - HPA's tftp server on Ubuntu 18.04.3 LTS to host a tftp server.

install tftp server

$ sudo apt install tftpd-hpa

configure tftp server

create new directory for tftp.

@joshschmelzle
joshschmelzle / ffmpeg-slow-a-video.md
Last active April 21, 2024 02:38
Slow a video down with ffmpeg

To slow down your video, you have to use a multiplier greater than 1:

ffmpeg -i input.mkv -filter:v "setpts=2.0*PTS" output.mkv

For example, to double the speed of the video, you can use:

ffmpeg -i input.mkv -filter:v "setpts=0.5*PTS" output.mkv

Source

@joshschmelzle
joshschmelzle / iperf3.md
Created September 20, 2022 01:54
iPerf3 systemd.unit

iPerf3 service with systemd

  • Create file at /etc/systemd/system/iperf3.service with contents from iperf3.service

systemctl

  • To start a service at boot, use the enable command: sudo systemctl enable iperf3.service
  • To view the service status, use the status command: sudo systemctl status iperf3.service
  • To start the service, use the start command: sudo systemctl start iperf3.service
  • To stop the service, use the stop command: sudo systemctl stop iperf3.service
@joshschmelzle
joshschmelzle / gist:b03964a543e3aa0499a9ec360298878b
Last active November 27, 2023 16:20
Fix flash drive for Windows installation media

Thanks to cereberus on tenforums.com.

Do you have a flash drive that you previously used for a Linux install and now want to use it for a Windows install? Does the flash drive not show up for the Windows installation media? Follow the steps below to wipe the USB flash drive and stage it for Windows.

Open a command prompt/terminal with admin rights and type the following:

diskpart
@joshschmelzle
joshschmelzle / oui3.py
Last active October 16, 2023 00:31 — forked from flagranterror/oui3.py
Handy OUI lookup script for Python 3+. Tested on Windows 10.
#!/usr/bin/python
# Who owns the OUI? IEEE knows.
#
# Auto-refreshes once a month.
# Run with -u to force update.
from urllib.request import urlopen
from getpass import getuser
import codecs