Skip to content

Instantly share code, notes, and snippets.

@avinoamsn
avinoamsn / wslTerminator.vbs
Last active July 3, 2022 16:31
VBScript for quietly launching a Terminator window in WSL with VcXsrv. Code comments link to the guides I referenced while writing the script.
' NOTE: additional discussion & implementations can be found here: https://gist.github.com/ropnop/10800fb5066bd5144d9aaad55a8a4d18
' https://medium.com/@bhupathy/install-terminator-on-windows-with-wsl-2826591d2156
set shell = WScript.CreateObject("Shell.Application")
if not IsProcessRunning("vcxsrv.exe") then
shell.shellExecute "vcxsrv.exe", ":0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto", "C:\Program Files\VcXsrv\", "", 0
end if
shell.ShellExecute "bash", "-c -l ""DISPLAY=:0 terminator""", "", "open", 0
' https://stackoverflow.com/questions/19794726/vb-script-how-to-tell-if-a-program-is-already-running
@jcsteh
jcsteh / SpotifyGlobalKeys.ahk
Last active May 16, 2024 13:28
AutoHotkey script to control Spotify with global keyboard shortcuts
; SpotifyGlobalKeys.ahk:
; AutoHotkey script to control Spotify with global keyboard shortcuts
; Author: James Teh <jamie@jantrid.net>
; Copyright 2017-2018 James Teh
; License: GNU General Public License version 2.0
DetectHiddenWindows, On
; Get the HWND of the Spotify main window.
getSpotifyHwnd() {
@ViktorNova
ViktorNova / rotate-video.sh
Created August 8, 2016 21:33
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@kevinwright
kevinwright / arch-firstboot.md
Last active October 25, 2023 08:28
Arch first-boot configuration. Setup the first user, sudo, vm tools, and enough of a dev env to support AUR+yaourt

OpenSSH daemon

pacman -S openssh
systemctl start sshd
systemctl enable sshd.socket

Sudoers

@wandernauta
wandernauta / sp
Last active May 26, 2024 16:02
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#