Wednesday, December 17, 2014

Diff for plex media server chromecast 5.1 audio issue

diff -aur src/usr/lib/plexmediaserver/Resources/Profiles/Chromecast.xml srcpatched/usr/lib/plexmediaserver/Resources/Profiles/Chromecast.xml
--- src/usr/lib/plexmediaserver/Resources/Profiles/Chromecast.xml 2014-12-17 03:45:38.000000000 -0500
+++ srcpatched/usr/lib/plexmediaserver/Resources/Profiles/Chromecast.xml 2014-12-17 20:48:48.500219267 -0500
@@ -51,7 +51,7 @@
     <VideoAudioCodec name="aac">
       <Limitations>
         <UpperBound name="audio.bitrate" value="768" isRequired="false"/>
-        <UpperBound name="audio.channels" value="6" />
+        <UpperBound name="audio.channels" value="2" />
       </Limitations>
     </VideoAudioCodec>
     <MusicCodec name="mp3">


prepare()
{
cd "${srcdir}"
echo "Applying chromecast 2 channel patch"
patch -p1 < chromecast_2channel.patch
}

Thursday, December 11, 2014

irssi/znc install

youri@buggle ~ $ sudo aura  -S irssi
youri@buggle ~ $ irssi

In Irssi:

/NETWORK add znc-freenode

/SERVER add -auto -network -ssl znc-freenode znserver.com +6617 youri/freenode:zncpass

/NETWORK add znc-synirc

/SERVER add -auto -network -ssl znc-synirc znserver.com +6617 youri/synirc:zncpass

wget http://dave.waxman.org/irssi/xchatnickcolor.pl

mv xchatnickcolor.pl ~/.irssi/scripts/autorun

Monday, November 24, 2014

arch sonarr auto update sonarr PKGBUILD script

sonarr-develop in aur now automatically installs the latest version. (pkgver) https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
 #!/bin/sh  
 # Where the release information is.  
 API_ENDPOINT="https://services.sonarr.tv/v1/update/develop?os=linux"  
 # Put the release info into a variable.  
 json=$(curl -s $API_ENDPOINT)  
 # Get version and hash using JSON parser for the shell.  
 VERSION=$(jshon -e updatePackage -e version -u <<< $json)  
 HASH=$(jshon -e updatePackage -e hash -u <<< $json)  
 echo "Found latest version:" $VERSION  
 echo "Changing PKGBUILD"  
 # Get the version inside the PKGBUILD.  
 PREV_VER=$(grep pkgver PKGBUILD | head -n1 | awk -F= '{print $2;}' | sed 's/\"//g')  
 # Replace old version with new.  
 sed -i "s/^pkgver=\"$PREV_VER\"$/pkgver=\"$VERSION\"/" PKGBUILD  
 echo "Downloading Release"  
 # Get the release.  
 if [ -f NzbDrone.master.$VERSION.mono.tar.gz ]; then  
   echo "Already have latest version"  
   return   
 fi  
 wget http://update.nzbdrone.com/v2/develop/mono/NzbDrone.develop.$VERSION.mono.tar.gz  
 echo $HASH "NzbDrone.develop."$VERSION".mono.tar.gz"| sha256sum -c - --status  
 if [ $? = 0 ]; then  
      updpkgsums  
      makepkg -f  
      sudo pacman -U "sonarr-develop-"$VERSION"-1-any.pkg.tar.xz"  
      sudo systemctl daemon-reload  
      sudo systemctl restart sonarr  
 else  
   echo "CHECKSUMS DID NOT MATCH"  
 fi  

Thursday, November 20, 2014

VirtualBox virtual serial port Windows Guest to linux host.


1.) Select "Enable Serial Port"
2.) Port mode: Host Pipe
3.) Create Pipe Checked.
4.) Port/File Path: /tmp/vboxCOM'

Now the port shows up windows.

My version of netcat allows connecting to sockets.

extra/gnu-netcat 0.7.1-5 [installed]



nc -U /tmp/vboxCOM
test
testback


To test sending data over the socket with bash:

function sendData()
{
    nc -U /tmp/vboxCOM <<< $(echo -en "\x1B$*\xD")
}
echo "Sending ST"
sendData "ST"

With python
#!/usr/bin/env python
import socket
import os, os.path
import time 
socketLocation = '/tmp/vboxCOM' 

print("Connecting...")
s = socket.socket(socket.AF_UNIX)
s.settimeout(1) # 1 second timeout, after all it should be instant because its local
s.connect(socketLocation)

def sendMessage(message):
    '''
    Sends a message to a socket.
    '''

    s.send(str.encode(message))
 
 
print("Sending a test message")
sendMessage("test\n")

Friday, October 3, 2014

VirtualBox/Windows 10 tech preview get okay resolution without guest additions.

I ran

VBoxManage setextradata tv-00002 CustomVideoMode1 1920x1080x32

rebooted - and was able to select the 1920x1080 resolution.

It added:

      <ExtraDataItem name="CustomVideoMode1" value="1920x1080x32"/>

to the vbox file for the virtual machine.

Thursday, July 17, 2014

Reverting libstagefright_httplive.so to 4.4.2 on nexus 7 4.4.4


  1. Downloaded nakasi-kot49h-factory-5e9db5e1.tgz
  2. Extracted nakasi-kot49h-factory-5e9db5e1.tgz
  3. Unzipped image-nakasi-kot49h.zip
  4. git clone https://github.com/YuLaw/ext4-utils.git
  5. cd ext4-utils and 'make'
  6. ext4-utils/simg2img system.img img.raw
  7. sudo raw.img system/
  8. adb push libstagefright_httplive.so /sdcard/
  9. adb shell
  10. su
  11. cp /sdcard/libstagefright_httplive.so /system/lib/
  12. chmod 744 /system/lib/libstagefright_httplive.so
  13. reboot