Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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

jsz joshschmelzle

༼ つ ◕_◕ ༽つ ø
View GitHub Profile
@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
@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 / remap-capslock-to-control-win10.md
Last active April 13, 2024 22:39
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 / remove-gamebar-powershell-win10.md
Last active April 3, 2024 14:09
How to Remove the Xbox Game Bar with Powershell on Windows 10

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 / tftp-server-installation.md
Last active March 28, 2024 14:23
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 / 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
@joshschmelzle
joshschmelzle / list-ssh-sessions.md
Last active August 4, 2023 11:23
List all connected SSH sessions

How to list all connected SSH sessions

I was curious how to view sessions on a Linux box I had at my desk. Similar to the session table on an Aruba controller (show loginsessions). Here are some ways you can list active SSH sessions; some commands return more output than others. This applies to most modern Linux boxes or say a WLAN Pi.

All examples below are using 2 MobaXterm user sessions from a Windows machine to a Linux 4.14.42-sunxi64 aarch64 (NanoPi NEO2).

w

wlanpi@wlanpi:~$ w
@joshschmelzle
joshschmelzle / setup.sh
Last active April 28, 2023 21:20
Mac Setup
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# inspired by https://gist.github.com/chris-sev/45a92f4356eaf4d68519d396ef42dd99
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock