Skip to content

Instantly share code, notes, and snippets.

View jusa's full-sized avatar

Enni Hämäläinen jusa

View GitHub Profile
#!/bin/sh
VERSION=6
GATHER_LOGS_BASE_DIR="/home/_gather_logs_tmp_$VERSION"
GATHER_LOGS_DIR="$GATHER_LOGS_BASE_DIR/sailfish_logs"
USE_USER=root
USE_GROUP=root
if [ $(id -u) != 0 ]; then
echo "This script needs to be run as root."
@jusa
jusa / audio_debugging.md
Last active August 13, 2019 13:33
Audio debugging

PulseAudio logs

  1. Stop PulseAudio

    # as user nemo
    $ systemctl --user stop pulseaudio
    
  2. Start logcat

# Common functions to use in utils.
#
# Add following boilerplate code to beginning of all scripts to get
# fancy collection of helper functions:
# (this apparently doesn't work in BSD, but what gives)
#
# SCRIPTPATH="$(dirname "`readlink -f $0`")"
# source "$SCRIPTPATH/common.sh"
#
@jusa
jusa / to_tmp
Created May 8, 2014 12:35
If it's worth doing it's worth overdoing. Nice with public key auth for uploading files.
#!/bin/bash
TARGET_HOST="example.org"
TARGET_DIR="webapps/upload_static"
TARGET_WEB="http://example.org/tmp"
declare -a uploaded
count=0
while [ $# -gt 0 ]; do

Keybase proof

I hereby claim:

  • I am jusa on github.
  • I am jusa (https://keybase.io/jusa) on keybase.
  • I have a public key whose fingerprint is DA7D 5AF4 BBFF BAFB 8B56 CB39 0EFA 6A56 0C88 F3B8

To claim this, I am signing this object: