Skip to content

Instantly share code, notes, and snippets.

View burmudar's full-sized avatar

William Bezuidenhout burmudar

View GitHub Profile
@burmudar
burmudar / gist:b8907af71b8ecb8363a0b283980e4c25
Created December 19, 2023 17:54
nix build of 'python311Packages.pyqt6-webengine'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@burmudar
burmudar / update-repo-origin
Created March 17, 2022 16:41
Update repo origin
#!/bin/bash
USERNAME="Burmudar"
NEW_USERNAME="burmudar"
SRC="~/development"
for dir in $(fdfind -H -t d -d 2 -p ".git" $SRC)
do
cd $dir
url=$(git remote get-url origin)
@burmudar
burmudar / raspi_spotifyd_bluetooth_setup.txt
Last active August 16, 2020 13:29
Raspberry PI Bluetooth setup
pi@thepi:~ $ sudo apt-get install bluez python-gobject python-gobject-2 bluez-tools udev
pi@thepi:~ $ sudo adduser pi bluetooth
pi@thepi:~ $ sudo adduser pi audio
pi@thepi:~ $ sudo bluetoothctl
[BLUETOOTH] power on
[BLUETOOTH] scan on
[BLUETOOTH] agent on
[BLUETOOTH] default-agent
[BLUETOOTH] trust 17:15:19:01:80:23
[BLUETOOTH] connect 17:15:19:01:80:23
@burmudar
burmudar / gist:cb869a173198f8445e7c2c62f590a0a1
Created April 3, 2016 18:22
SSH: Copy file back to host over active ssh connection
Type Enter ~C Enter -R 22042:localhost:22 Enter to create a reverse port forwarding from your server to your desktop (22042 can be any port number between 1024 and 65534 that's not in use).
Then scp -P 22042 foo localhost: will copy the file foo in your current directory on the server to your home on the desktop.
Now move the file into your current directory on the desktop by typing Enter ~ Ctrl+Z mv ~/foo . Enter fg Enter.
From http://askubuntu.com/questions/13382/download-a-file-over-an-active-ssh-session
@burmudar
burmudar / ssh config with proxy command
Created March 14, 2016 10:17
SSH config snippet for accessing a host you can't directly ssh into using proxycommand
Host aws-deploy
Hostname #HOST TO WANT TO BE AT BUT CAN'T SSH INTO DIRECTLY
User ubuntu
ProxyCommand ssh -W %h:%p aws
IdentityFile ~/.ssh/keys/work.pem
Host aws
Hostname #ENTRY_HOST / HOST TO SSH INTO FIRST
ForwardAgent yes
User ubuntu
@burmudar
burmudar / build.gradle
Last active March 8, 2016 10:59
Gradle task to add build information to build resources output
import java.time.LocalDateTime
apply plugin: 'application'
apply plugin: 'java'
task buildVersion {
//replacing " characters othewise they're included in the property value when read from the Properties class
def version = 'hg parents --template "{latesttag}.{latesttagdistance}-{node|short}"'.execute().text.trim().replace("\"", "")
def destDir = sourceSets.main.output.resourcesDir
destDir.mkdirs()
def buildFile = new File(destDir, "build.properties")
@burmudar
burmudar / about.md
Last active September 26, 2015 22:27 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer