Linux

Bash: SSH with Tunnel

Syntax

ssh user@remoteHost.com -L 81:remoteHost:81

ssh user@192.168.0.112 -L 81:r192.168.0.112:81

Script

#!/bin/bash
function ssh-tunnel-112(){
        export $(grep -v '^#' .env | xargs)
        echo "ssh to .112:8081 to pi:3001"
        sudo ssh me@192.168.0.112 -L 8081:pi:3001
}
echo "creating tunnel on port 81"
ssh-tunnel-112

 

Tags

Linux: Bash: /bin/bash^M: bad interpreter: No such file or directory

 

/bin/bash^M: bad interpreter: No such file or directory

the ^M is the key to the solution here.... invalid line endings

Windows & Linux use different EOL encoding...

in Notepad++ open the file and then select one according to the runtime host OS

  • Edit > EOL Conversion > Linux(LF)
  • Edit > EOL Conversion > Windows (CR LF)
  • Edit > EOL Conversion > Macinstosh (CR)
Tags

Linux: Bash: Echo Commands

echo Options


 Options      Description
 -n      do not print the trailing newline.
 -e      enable interpretation of backslash escapes.
 \b      backspace
 \\      backslash
 \n      new line
 \r      carriage return
 \t      horizontal tab
 \v      vertical tab
Tags

jackaudio.org: How can I use multiple soundcards with JACK

Source: https://jackaudio.org/faq/multiple_devices.html


How can I use multiple soundcards with JACK?

JACK is fundamentally designed to be a component in a pro-audio/music creation environment and standard operating practice for such setups involves using only a single digital sample “clock” (something counting off the time between audio samples). This means that trying to use multiple independent soundcards is problematic, because each soundcard has its own sample clock, running independently from the others. Over time, these different clocks drift out of sync with each other, and cause glitches in the audio. You can’t stop this drift, although in some cases the effects may be insignificant enough that some people might not care about them.

Tags

Pi: USB HDD Setup

List Disks

sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL

mdp@pi:/ $ sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL
[sudo] password for mdp:
UUID                                 NAME        FSTYPE   SIZE MOUNTPOINT           LABEL   MODEL
                                     sda                   29G                              Storage_Device
d486f62b-1ad3-4140-ab53-129665994877 └─sda1      xfs       29G /media/mdp/PiDrive   PiDrive
                                     sdb                465.8G                              MQ01ABD050V
409821DB9821D068                     └─sdb1      ntfs   465.8G /media/silosix/W[500 W[500   
                                     mmcblk0             59.5G                              
3FFE-CDCA                            ├─mmcblk0p1 vfat     256M /boot                boot    
3122c401-b3c6-4d27-8e0d-6708a7613aed └─mmcblk0p2 ext4    59.2G /                    rootfs

Tags
Subscribe to Linux