Friday, December 6, 2013
Find, xargs, split2flac split everything in a directory.
find ./ -maxdepth 1 -type d | xargs -I{} split2flac {}
Thursday, December 5, 2013
How I updated my rooted nexus 5 with a custom kernel to kitkat 4.4.1
- Download the 4.4.1 image (7ed504f678cea49ecf0974e8cd956e2974e3f943.signed-hammerhead-KOT49E-from-KRT16M.7ed504f6.zip)
- Download the stock image (hammerhead-krt16m-factory-bd9c39de.tgz).
- Copy the updated image to the phone
$ adb push ~/Downloads/7ed504f678cea49ecf0974e8cd956e2974e3f943.signed-hammerhead-KOT49E-from-KRT16M.7ed504f6.zip /mnt/sdcard/ - Reboot into fastboot (power and volume down when booting).
- Extract the stock image.
$ tar zxvf hammerhead-krt16m-factory-bd9c39de.tgz - Unzip the image
$ unzip image-hammerhead-krt16m.zip - Flash the boot img
$ fastboot flash boot boot.img - Reboot into bootloader
$ fastboot reboot-bootloader - Flash the system img.
$ fastboot flash system system.img - Go into recovery (TWRP for me) and flash the 4.4.1 update copied over earlier.
- Flash custom kernel on sdcard.
- Let twrp install supersu and reboot.
- Not rooted - download the latest twrp (openrecovery-twrp-2.6.3.4-hammerhead.img)
- Reboot into fastboot mode again.
- Flash the twrp image
$ openrecovery-twrp-2.6.3.4-hammerhead.img - Boot into recovery mode.
- Download latest supersu (UPDATE-SuperSU-v1.80.zip)
- Copy supersu over to card.
$ adb push UPDATE-SuperSU-v1.80.zip /sdcard/update-supersu-v1.80.zip - Install it from TWRP.
- Done.
Tuesday, December 3, 2013
Android 4.4 trying to resolve local domains with dhcp server on server 2003.
My android 4.4 device would not resolve local domains.
Ex:
sv00004 - could not resolve
sv00004.blah.com - resolved.
Solution:
* start->-run-> mmc
* Add/remove snap in-> DHCP
* Right click DHCP "Add server"
* Select the DHCP server.
* Expand to server options.
* Right click server options
I added my two DNS servers to "006 DNS Servers" and my domain blah.com to "015 DNS Domain Name".
Seems to resolve fine now - at least from chrome.
Ex:
sv00004 - could not resolve
sv00004.blah.com - resolved.
Solution:
* start->-run-> mmc
* Add/remove snap in-> DHCP
* Right click DHCP "Add server"
* Select the DHCP server.
* Expand to server options.
* Right click server options
I added my two DNS servers to "006 DNS Servers" and my domain blah.com to "015 DNS Domain Name".
Seems to resolve fine now - at least from chrome.
Saturday, June 15, 2013
Nexus 7 rooting on arch.
Following this tutorial: http://forum.xda-developers.com/showthread.php?t=1741395
1.) pak -S android-tools
2.) adb devices showed
List of devices attached
???????????? no permissions
3.) fixed with pak -S android-udev
4.) DL CWM touch and superSU
5.) Allow computer connection on device.
6.) adb push path-to-zip/JB-SuperSU.zip /sdcard/0/Download/update.zip
7.) adb reboot bootloader
8.) fastboot oem unlock
9.) Yes, unlock bootloader.
10.) $ fastboot flash recovery ~/Downloads/recovery-clockwork-touch-6.0.3.1-grouper.img
sending 'recovery' (6644 KB)...
OKAY [ 8.759s]
writing 'recovery'...
OKAY [ 0.512s]
finished. total time: 9.271s
11.) tablet - use volume buttons to boot into recovery.
12.) mounts and storage
13.) mount system
14.) adb shellcd /systemmv recovery-from-boot.p recovery-from-boot.bak
15.) Return back to recovery.
16.) Navigate to update.zip
17.) install update.zip
1.) pak -S android-tools
2.) adb devices showed
List of devices attached
???????????? no permissions
3.) fixed with pak -S android-udev
4.) DL CWM touch and superSU
5.) Allow computer connection on device.
6.) adb push path-to-zip/JB-SuperSU.zip /sdcard/0/Download/update.zip
7.) adb reboot bootloader
8.) fastboot oem unlock
9.) Yes, unlock bootloader.
10.) $ fastboot flash recovery ~/Downloads/recovery-clockwork-touch-6.0.3.1-grouper.img
sending 'recovery' (6644 KB)...
OKAY [ 8.759s]
writing 'recovery'...
OKAY [ 0.512s]
finished. total time: 9.271s
11.) tablet - use volume buttons to boot into recovery.
12.) mounts and storage
13.) mount system
14.) adb shellcd /systemmv recovery-from-boot.p recovery-from-boot.bak
15.) Return back to recovery.
16.) Navigate to update.zip
17.) install update.zip
Wednesday, February 13, 2013
Exchange EMC
Running EMC would cause this:
Connecting to remote server failed with the following error message: The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help topic.
Tried every single thing I could find on google, set winrm maqxrequests, reinstall exchange, reinstall winRM, spent 12 hours.
My solution (issue was caused by wsus messing with dynamiccompression module)
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']
Tuesday, February 12, 2013
Exchange 2010 ECP event ID 4
New exchange2010 installation, ECP complained with
Test-ecpconnectivity -verbose | fl
PerformanceCounterName : ECP Web Sevice Logon Latency
Result : Failure
Error : An exception was thrown by the Web service: The remote server returned an error: (500)
and event viewer had getlist failures on msexchagne control panel 4
failed with the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpHandler' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
reloading counters didn't help, removing and reinstall ECP did not help.
Solution in IIS set the application pool for msexchagneECPapppool to .net 2.0 instead of .net 4.0.
Test-ecpconnectivity -verbose | fl
PerformanceCounterName : ECP Web Sevice Logon Latency
Result : Failure
Error : An exception was thrown by the Web service: The remote server returned an error: (500)
and event viewer had getlist failures on msexchagne control panel 4
failed with the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpHandler' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
reloading counters didn't help, removing and reinstall ECP did not help.
Solution in IIS set the application pool for msexchagneECPapppool to .net 2.0 instead of .net 4.0.
Friday, December 21, 2012
Exchange 2010 KB2756496 error 80070643
Update Rollup 7-v2 for Exchange Server 2010 Service Pack 1 (KB2756496)
Installation date: 12/21/2012 11:31 PM
Installation status: Failed
Error details: Code 80070643
Update type: Important
This update rollup resolves problems that were found in Exchange Server 2010 Service Pack 1 (SP1) since Exchange Server 2010 SP1 was released and replaces previously released update rollups for Exchange Server 2010 SP1.
More information:
http://support.microsoft.com/?kbid=2756496
http://go.microsoft.com/fwlink/?LinkId=207096
Help and Support:
http://technet.microsoft.com/en-US/exchange/dd203064
Fix:
http://www.expta.com/2012/08/exchange-2010-sp2-roll-up-4-does-not.html?showComment=1349847237817#c894835615165077581
Edited C:\Program Files\Microsoft\Exchange Server\V14\Scripts\ManageScheduledTask.ps1
Edited C:\Program Files\Microsoft\Exchange Server\V14\Scripts\ManageScheduledTask.ps1
and changed line 462 to write-output instead of return.
Exchange 2010 & Windows Server 2012 exchange management console crash.
Trying to gather data from the exchange console kept getting: error FX:{A5406CA3-6393-48a0-8827-CF06F0C94C55} Exception has been thrown by the target of an invocation.
Everything showed "Unavailable".
Fix is here:
http://social.technet.microsoft.com/forums/en-US/exchangesvrdeploylegacy/thread/02881780-9982-4a5a-a7fd-1cf609913779
Open mmc, add the exchange management console snap in and save it as emc.msc
create a bat file
set __COMPAT_LAYER=RUNASINVOKER
set COMPLUS_Version=v2.0.50727
"C:\Users\youri\Desktop\emc.msc"
Everything showed "Unavailable".
Fix is here:
http://social.technet.microsoft.com/forums/en-US/exchangesvrdeploylegacy/thread/02881780-9982-4a5a-a7fd-1cf609913779
Open mmc, add the exchange management console snap in and save it as emc.msc
create a bat file
set __COMPAT_LAYER=RUNASINVOKER
set COMPLUS_Version=v2.0.50727
"C:\Users\youri\Desktop\emc.msc"
and the management console will work.
Friday, November 30, 2012
"Unable to find a version of the runtime to run this application."
Saw this trying to install software using ClickOne with a dependency on .NET framework full on windows XP.
"Unable to find a version of the runtime to run this application."
.NET framework 4 full was installed.
Solution was to download .NET framework 2.0
http://www.microsoft.com/en-us/download/details.aspx?id=20137
Let windows update install .NET framework 3.5 update.
Install .net Framework 4.
"Unable to find a version of the runtime to run this application."
.NET framework 4 full was installed.
Solution was to download .NET framework 2.0
http://www.microsoft.com/en-us/download/details.aspx?id=20137
Let windows update install .NET framework 3.5 update.
Install .net Framework 4.
Thursday, September 20, 2012
xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file
xrdp_sec_incoming: error reading /etc/xrdp/rsakeys.ini file
Fix : run xrdp as root
Tuesday, April 10, 2012
Visual Studio 2010 and "Cannot publish because a project failed to build".
Problem is with visualmicro addon.
Tools->add-in manager - > Visual Micro Arduino
Uncheck "start" and "command line" and everything works
Tools->add-in manager - > Visual Micro Arduino
Uncheck "start" and "command line" and everything works
Thursday, March 1, 2012
Apps on my Toshiba Thrive
Box.net
Stopwatch & Timer
PaintJoy
QuickPic
Whiteboard Pro
SSHDroid
Earth
Wifi Analyzer
Opera Mobile
Copilot Live USA
ColorNote
MyFitnessPal
Amazon AppStore
Parcels
Google Sky Map
MX VIdeo Player
ES File Explorer
Adsense Dashboard
Dolphin for PAD
Skype
TeamworkPM
Tapatalk
GetJar
Calculator
AdFree
Stopwatch & Timer
PaintJoy
QuickPic
Whiteboard Pro
SSHDroid
Earth
Wifi Analyzer
Opera Mobile
Copilot Live USA
ColorNote
MyFitnessPal
Amazon AppStore
Parcels
Google Sky Map
MX VIdeo Player
ES File Explorer
Adsense Dashboard
Dolphin for PAD
Skype
TeamworkPM
Tapatalk
GetJar
Calculator
AdFree
Saturday, February 11, 2012
My steps for rooting a toshiba thrive hmj 37.31.5.011
Toshiba thrive version HMJ 37.31.5.0011.
I got all the information from thriveforums.org threads.
1. Downgrade to HMJ37.01.5.0032
http://www.thriveforums.org/forum/dalepl-development/4359-downgrade-official-toshiba-hmj37-31-5-0011-hmj37-01-5-0032-rollback.html
2.) Boot into recovery mode ( power off -> hold power + volume up)
3.) Select white package, select 'install update from external card'
4.) Reboot - thrive is downgraded
5.) Turn on usb debugging in settings -> applications -> development
6.) Download dalenet easy flash tool http://www.thriveforums.org/forum/dalepl-development/1974-root-tool-dalenet-thrive-10-1-easy-flash-tool.html
7.) Download a rooted ROM
8.) Extract easy flash tool
9.) Plug in thrive, install adb drivers (they were part of easy flash tool zip) (takes a while)
10.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\adb.exe devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
280400643406517 device
11.) shutdown, boot into recovery mode
12.) select fast boot (usb icon)
13.) Device looks like hangs at 'starting usb download protocol'
14.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe devices
? fastboot
15.) Reboot it
16.)PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe reboot
rebooting...
finished. total time: -0.000s
17.) Steps 9-16 confirm that the usb connection is good
18.) Reboot into fastboot again
19.) Run thrive_easy_flash_tool.bat
20.) Select #1
21.) extract update.zip from rom image onto the sd card
22.) go to applications -> super user and update it
23.) root has been obtained
24. safe boot again
25.) thrive easy flash tool
26.) 3 - install flash recovery
27.) Install clockwork
28.) thrive will hang at installing mrb image
29.) reboot into recovery, select the package icon
30.) should be in CWM mode, install zip from sdcard
31.) reboot from the cwm menu
32.) Should be on the right image now & rooted
I got all the information from thriveforums.org threads.
1. Downgrade to HMJ37.01.5.0032
http://www.thriveforums.org/forum/dalepl-development/4359-downgrade-official-toshiba-hmj37-31-5-0011-hmj37-01-5-0032-rollback.html
2.) Boot into recovery mode ( power off -> hold power + volume up)
3.) Select white package, select 'install update from external card'
4.) Reboot - thrive is downgraded
5.) Turn on usb debugging in settings -> applications -> development
6.) Download dalenet easy flash tool http://www.thriveforums.org/forum/dalepl-development/1974-root-tool-dalenet-thrive-10-1-easy-flash-tool.html
7.) Download a rooted ROM
8.) Extract easy flash tool
9.) Plug in thrive, install adb drivers (they were part of easy flash tool zip) (takes a while)
10.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\adb.exe devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
280400643406517 device
11.) shutdown, boot into recovery mode
12.) select fast boot (usb icon)
13.) Device looks like hangs at 'starting usb download protocol'
14.) PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe devices
? fastboot
15.) Reboot it
16.)PS C:\Users\youri\Downloads\DaleNet-Thrive_10-Easy_Flash_Tool-v1.5\tools> .\fastboot.exe reboot
rebooting...
finished. total time: -0.000s
17.) Steps 9-16 confirm that the usb connection is good
18.) Reboot into fastboot again
19.) Run thrive_easy_flash_tool.bat
20.) Select #1
21.) extract update.zip from rom image onto the sd card
22.) go to applications -> super user and update it
23.) root has been obtained
24. safe boot again
25.) thrive easy flash tool
26.) 3 - install flash recovery
27.) Install clockwork
28.) thrive will hang at installing mrb image
29.) reboot into recovery, select the package icon
30.) should be in CWM mode, install zip from sdcard
31.) reboot from the cwm menu
32.) Should be on the right image now & rooted
Wednesday, February 8, 2012
VB.net defeat simple padding obfuscation
There is an applicationthat obfuscates a serial number by padding each character. Here is a de-obfuscator I made.
First: define the array with all the characters the algorithm uses:
Public charArray() As Char = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", _
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", _
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", _
"V", "W", "X", "Y", "Z"}
Function that will deobfuscate it.
Private Function OffsetAChar(ByVal chartooffset As Char, ByVal offset As Integer)
Dim posInArray As Integer = Array.IndexOf(charArray, chartooffset)
Dim ArrayLength As Integer = charArray.Length
If posInArray + offset = ArrayLength Then
Return "0"
End If
If (posInArray + offset) <= ArrayLength And (posInArray + offset) > 0 Then
Return charArray(posInArray + offset)
End If
If posInArray + offset = 0 Then
Return 0
End If
If (posInArray + offset) < 0 Then
Return charArray(ArrayLength + posInArray + offset)
End If
If (posInArray + offset) > ArrayLength Then
Return charArray(Math.Abs(ArrayLength - (posInArray + offset)))
End If
End Function
Usage is simple:
Dim charArray2() As Char
Dim ArraySTring As String = txtDecode.Text
ArraySTring = ArraySTring.Replace("-", "")
charArray2 = ArraySTring
txtCodeDecoded.Text += OffsetAChar(charArray2(0), -19).ToString.ToUpper
Figuring out the offset of two letters
Public Function OffsetFinder(ByVal letter1 As Char, ByVal letter2 As Char)
Dim CharPos1 = Array.IndexOf(charArray, letter1)
Dim CharPos2 = Array.IndexOf(charArray, letter2)
Return CharPos2 - CharPos1
End Function
First: define the array with all the characters the algorithm uses:
Public charArray() As Char = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", _
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", _
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", _
"V", "W", "X", "Y", "Z"}
Function that will deobfuscate it.
Private Function OffsetAChar(ByVal chartooffset As Char, ByVal offset As Integer)
Dim posInArray As Integer = Array.IndexOf(charArray, chartooffset)
Dim ArrayLength As Integer = charArray.Length
If posInArray + offset = ArrayLength Then
Return "0"
End If
If (posInArray + offset) <= ArrayLength And (posInArray + offset) > 0 Then
Return charArray(posInArray + offset)
End If
If posInArray + offset = 0 Then
Return 0
End If
If (posInArray + offset) < 0 Then
Return charArray(ArrayLength + posInArray + offset)
End If
If (posInArray + offset) > ArrayLength Then
Return charArray(Math.Abs(ArrayLength - (posInArray + offset)))
End If
End Function
Usage is simple:
Dim charArray2() As Char
Dim ArraySTring As String = txtDecode.Text
ArraySTring = ArraySTring.Replace("-", "")
charArray2 = ArraySTring
txtCodeDecoded.Text += OffsetAChar(charArray2(0), -19).ToString.ToUpper
Figuring out the offset of two letters
Public Function OffsetFinder(ByVal letter1 As Char, ByVal letter2 As Char)
Dim CharPos1 = Array.IndexOf(charArray, letter1)
Dim CharPos2 = Array.IndexOf(charArray, letter2)
Return CharPos2 - CharPos1
End Function
VB.net 2010 run an app, activate it, and send keys.
This isn't an elegant way to do it, but it works for me. It runs a program, sends alt+h, a, tab, then ctrl+c to copy text to a clipboard and puts the contents of the clipboard into a textbox.
In sendkeys:
% = alt
vbTab = tab
^ = crl
{escape} = ESC
Imports System.Diagnostics.Process
Imports System.Threading
Public Class Form1
Public Sub GetSerials()
Dim pInfo As ProcessStartInfo = New ProcessStartInfo("C:\Program Files (x86)\CustomApp\Bin\customapp.exe")
pInfo.WindowStyle = ProcessWindowStyle.Maximized
Process.Start(pInfo)
Thread.Sleep(3000)
AppActivate("CustomApp 1.1.5")
System.Windows.Forms.SendKeys.SendWait("%")
System.Windows.Forms.SendKeys.SendWait("h")
System.Windows.Forms.SendKeys.SendWait("a")
System.Windows.Forms.SendKeys.SendWait(vbTab)
System.Windows.Forms.SendKeys.SendWait("^c")
TextBox2.Text = (TextBox1.Text & " : " & Clipboard.GetText & vbCr)
System.Windows.Forms.SendKeys.SendWait("{escape}")
System.Windows.Forms.SendKeys.SendWait("%")
System.Windows.Forms.SendKeys.SendWait("f")
System.Windows.Forms.SendKeys.SendWait("q")
End Sub
End Class
In sendkeys:
% = alt
vbTab = tab
^ = crl
{escape} = ESC
Imports System.Diagnostics.Process
Imports System.Threading
Public Class Form1
Public Sub GetSerials()
Dim pInfo As ProcessStartInfo = New ProcessStartInfo("C:\Program Files (x86)\CustomApp\Bin\customapp.exe")
pInfo.WindowStyle = ProcessWindowStyle.Maximized
Process.Start(pInfo)
Thread.Sleep(3000)
AppActivate("CustomApp 1.1.5")
System.Windows.Forms.SendKeys.SendWait("%")
System.Windows.Forms.SendKeys.SendWait("h")
System.Windows.Forms.SendKeys.SendWait("a")
System.Windows.Forms.SendKeys.SendWait(vbTab)
System.Windows.Forms.SendKeys.SendWait("^c")
TextBox2.Text = (TextBox1.Text & " : " & Clipboard.GetText & vbCr)
System.Windows.Forms.SendKeys.SendWait("{escape}")
System.Windows.Forms.SendKeys.SendWait("%")
System.Windows.Forms.SendKeys.SendWait("f")
System.Windows.Forms.SendKeys.SendWait("q")
End Sub
End Class
Monday, January 23, 2012
VB.net and oracle package that returns boolean
Public Function VALIDATE_NUMBER(ByVal num As String)
'connection string oraconnstring = "Data Source=" & OracleDataSource & ";User ID=" & OracleUserID & ";Password=" & OraclePassword & ";"
'initialize commandDim oraclecmd As New OracleCommand oraConnection.Open()
'Initiate the package command oraclecmd = oraConnection.CreateCommand oraclecmd.CommandType = CommandType.StoredProcedure oraclecmd.CommandText = "CUSTOM_PACKAGE.GET_NUM"'create parameters that will be passed with command Dim dbNum As OracleParameter Dim dbPartNum As OracleParameter Dim dbCode As OracleParameter'serialnumber is sent to package dbNum = oraclecmd.Parameters.Add("I_STR_NUMBER", OracleDbType.Varchar2) dbNum.Value = serialnum dbNum.Direction = ParameterDirection.Input dbNum.Size = 25'value is modified by oracle package dbPartNum = oraclecmd.Parameters.Add("O_STR_PART_NUMBER", OracleDbType.Varchar2) dbPartNum.Value = DBNull.Value dbPartNum.Direction = ParameterDirection.InputOutput dbPartNum.Size = 25'value is modified by oracle package dbCode = oraclecmd.Parameters.Add("O_STR_HEAT_CODE", OracleDbType.Varchar2) dbCode.Value = DBNull.Value dbCode.Value = "default" dbCode.Direction = ParameterDirection.InputOutput dbCode.Size = 25oraclecmd.ExecuteNonQuery()'populate class numinfo.PartNumber = dbForgingPartNum.Value.ToString numinfo.Code = dbHeatCode.Value.ToString Return numinfo oraConnection.Dispose()end function-------------if the package returns a boolean value, which vb.net/oracle adapter can't handle, then a solution is to create a wrapper around that package.oraclecmd = oraConnection.CreateCommand 'initiate return value Dim ReturnValue As OracleParameter = oraclecmd.Parameters.Add(":ReturnValue", OracleDbType.Varchar2) ReturnValue.Direction = ParameterDirection.Output ReturnValue.Size = 1 'Wrapper for the stored function (anonymous block) 'boolean datatype is not available outside of pl/sql oraclecmd.CommandType = CommandType.Text oraclecmd.CommandText = "declare tmp boolean; ReturnValue varchar2(1) ;begin tmp := FS.GETSN('" & value & "');if tmp = true then :ReturnValue := 'T'; else ReturnValue := 'F'; end if; end;" 'execute the anonymous block oraclecmd.ExecuteNonQuery() 'convert returnvalue into a string Dim a As String = oraclecmd.Parameters(":ReturnValue").Value.ToStringA will be T or F.
Friday, November 4, 2011
pacman-key --init not enough random bytes available
Running pacman-key I get
[youri@slavluv ~]$ sudo pacman-key --init
gpg: Generating pacman keychain master key...
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 284 more bytes)
[youri@slavluv ~]$ sudo pacman-key --init
gpg: Generating pacman keychain master key...
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 284 more bytes)
1.) Get RNG-TOOLS
a.)[youri@slavluv aur]$ wget http://aur.archlinux.org/packages/rn/rng-tools/rng-tools.tar.gz
b.)[youri@slavluv aur]$ tar zxvf rng-tools.tar.gz
c.)[youri@slavluv aur]$ cd rng-tools
d.)[youri@slavluv rng-tools]$ makepkg -s
e.)[youri@slavluv rng-tools]$ sudo pacman -U rng-tools-3-2-i686.pkg.tar.xz
f.) change timeout=0 to timeout=10 in /etc/conf.d/rngd
2.) [youri@slavluv rng-tools]$ sudo rngd -f -r /dev/urandom
3.) [youri@slavluv ~]$ sudo pacman-key --init
Password:
gpg: Generating pacman keychain master key...
....+++++
................+++++
gpg: key DBCCC88E marked as ultimately trusted
gpg: Done
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
Tuesday, June 7, 2011
Trying to play GTA vice city under linux with wine.
First I need to install wine:
Now to configure wine and create all the folders, and it also installs gecko packages. In config I added drive D: as /tmp/CD
[youri@slavluv Downloads]$ winecfg
Make the folder in CD in tmp and mount the iso. "-o loop" (modprobe loop if it's not loaded)
[youri@slavluv tmp]$ mkdir CD
[youri@slavluv tmp]$ sudo mount -o loop /home/youri/Downloads/Grand\ Theft\ Auto\ Vice\ City\ -\ PC/GTA_Vice_City.iso CD/
Run the setup:
[youri@slavluv tmp]$ wine CD/setup.exe
Went through install (did not choose to use radio stations)
Using the no-cd crack (I have the cd but not cd-rom drive, so I have to download it, it's not illegal if you have the licensed CD)
[youri@slavluv Grand Theft Auto Vice City - PC]$ cp -f Crack/gta-vc.exe /home/youri/.wine/drive_c/Program\ Files/Rockstar\ Games/Grand\ Theft\ Auto\ Vice\ City/
Now I went to install directory ( /home/youri/.wine/drive_c/Program Files/Rockstar Games/Grand Theft Auto Vice City ) and ran wine gta-vc.exe
It messed up my screen/didn't work.
Mounting the play CD the same way I did the install CD loaded the game. All the textures are blocky though. Probably would work fine at this point for someone with a decent video card..
Errors:
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
Disabling "Allow pixel shader" in wine settings fixes the blockiness. Game is still slow though.
[youri@slavluv Downloads]$ sudo pacman -S wine
Now to configure wine and create all the folders, and it also installs gecko packages. In config I added drive D: as /tmp/CD
[youri@slavluv Downloads]$ winecfg
Make the folder in CD in tmp and mount the iso. "-o loop" (modprobe loop if it's not loaded)
[youri@slavluv tmp]$ mkdir CD
[youri@slavluv tmp]$ sudo mount -o loop /home/youri/Downloads/Grand\ Theft\ Auto\ Vice\ City\ -\ PC/GTA_Vice_City.iso CD/
Run the setup:
[youri@slavluv tmp]$ wine CD/setup.exe
Went through install (did not choose to use radio stations)
Using the no-cd crack (I have the cd but not cd-rom drive, so I have to download it, it's not illegal if you have the licensed CD)
[youri@slavluv Grand Theft Auto Vice City - PC]$ cp -f Crack/gta-vc.exe /home/youri/.wine/drive_c/Program\ Files/Rockstar\ Games/Grand\ Theft\ Auto\ Vice\ City/
Now I went to install directory ( /home/youri/.wine/drive_c/Program Files/Rockstar Games/Grand Theft Auto Vice City ) and ran wine gta-vc.exe
It messed up my screen/didn't work.
Mounting the play CD the same way I did the install CD loaded the game. All the textures are blocky though. Probably would work fine at this point for someone with a decent video card..
Errors:
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
Disabling "Allow pixel shader" in wine settings fixes the blockiness. Game is still slow though.
Thursday, April 21, 2011
lighttpd fastcgi issues
Suddenly "mod_fastcgi" being enabled in "server.modules" for lighttpd is causing problems.
2011-04-21 19:30:58: (log.c.166) server started
2011-04-21 19:30:58: (mod_fastcgi.c.978) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 Permission denied
2011-04-21 19:30:58: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-04-21 19:30:58: (server.c.938) Configuration of plugins failed. Going down.
Fix:
[youri@nemesis run]$ sudo gpasswd -a youri http
Password:
Adding user youri to group http
Or I should maybe make lighttpd run as http user again.
2011-04-21 19:30:58: (log.c.166) server started
2011-04-21 19:30:58: (mod_fastcgi.c.978) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 Permission denied
2011-04-21 19:30:58: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-04-21 19:30:58: (server.c.938) Configuration of plugins failed. Going down.
Fix:
[youri@nemesis run]$ sudo gpasswd -a youri http
Password:
Adding user youri to group http
Or I should maybe make lighttpd run as http user again.
Wednesday, April 20, 2011
Mapping the cell locations from an iphone db on google maps
IOs stores the GPS locations of towers it connects to in this file:
I noticed a bunch of towers I never connected to (far away places) so there are some problems with this.
/var/root/Library/Cache/locationd/consolidated.db
It's an sqlite3 file... So here is a script to pull the longtitude and lattitudes and turn them into a simple KML file.
#/bin/bash
#this is the KML heading
echo '<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>youri</name>'
#pull the longitude and latitude from sqlite3
for i in $(sqlite3 consolidated.db 'select longitude,latitude from celllocation';)
do coordinate=$(echo $i | sed 's/|/,/g')
echo '<Placemark><name>'$coordinate'</name><Point><coordinates>'$coordinate',0</coordinates></Point></Placemark>'
done;
echo '</Document></kml>'
I added this to my lighttpd.conf and restarted it.
".kml" => "application/vnd.google-earth.kml+xml",
Then it's just a matter of passing the kml file to google maps..
http://maps.google.com/maps?q=http://$yourserver/output.kml
I noticed a bunch of towers I never connected to (far away places) so there are some problems with this.
Monday, April 11, 2011
Gnome-shell annoying bug.
Accidentally hitting the print screen button (which I do a lot because of this stupid keyboard) I get an annoying popup:
Text was empty (or contained only whitespace)
and in /.xsession-errors
Window manager warning: Error on command 33 "": Text was empty (or contained only whitespace)
Went to system settings - > keyboard -> shortcuts and disabled the printscreen shortcut for now.
Update: removing ~/.gconf and ~/.gnome* fixes this.
Update: removing ~/.gconf and ~/.gnome* fixes this.
Friday, March 25, 2011
Convert mp3 to iphone ringtone.
Convert the mp3 too a wav first.
[youri@nemesis ringtone]$ mplayer -ao pcm Loudest_Ringtone.mp3 -ao pcm:file="ringtone.wav"
Then wav to m4r. M4r is the format iphone wants ringtones in.
[youri@nemesis ringtone]$ faac ringtone.wav -o loudest.m4r -w
Transfer file to iphone. I use sftp.
[youri@nemesis ringtone]$ sftp root@yphone:/Library/Ringtones
root@yphone's password:
Connected to yphone.
Changing to: /Library/Ringtones
sftp> put loudest.m4r
Uploading loudestm4r to /private/var/stash/Ringtones.wljzz0/loudest.m4r
loudest.ringtone.m4r 100% 306KB 305.8KB/s 00:01
sftp> exit
Sunday, February 20, 2011
Avant-window-navigator system notification daemon applet crashed
GStreamer-CRITICAL **: gst_debug_add_log_function: assertion `func != NULL' failed
aborting...
aborting...
Solution: re-install avant-window-navigator-bzr & awn-extras-applets-bzr
configure: error: The xdg python module is required (pyxdg or python-xdg)
Aborting...
Stupid python3!
Solution: sudo ln -s /usr/bin/python2 /usr/bin/python
Saturday, February 19, 2011
Joining many AVI files together & changing framerate
convert into one file:
framerate (25):
ffmpeg -i FINAL.avi -f yuv4mpegpipe - | yuvfps -s 25:1 -r 25:1 | ffmpeg -f yuv4mpegpipe -i - -b 1000k faster.avi
for i in $(ls); do cat $i >> bigavi.avi; done
mencoder -forceidx -oac copy -ovc copy bigavi.avi -o FINAL.avi
framerate (25):
Thursday, February 17, 2011
Remove dead repo (installed by package) from cydia via ssh
Failed to fetch http://ispaziorepository.com/./Packagez.gz HTTP/1.1 404 Not found.
Can't remove the repo through cydia, it was installed by JB tool.
[youri@nemesis ~]$ ssh root@192.168.1.6
root@192.168.1.6's password:
yPhone:~ root# rm /etc/apt/sources.list.d/ispazio.net.list
Fixed.
Can't remove the repo through cydia, it was installed by JB tool.
[youri@nemesis ~]$ ssh root@192.168.1.6
root@192.168.1.6's password:
yPhone:~ root# rm /etc/apt/sources.list.d/ispazio.net.list
Fixed.
Sunday, February 13, 2011
Upgrading ubuntu 10.10 to natty narwhal
youri@zexlette:~$ sudo do-release-upgrade -d
This hangs at "Calculating the changes"
1164 packages upgraded, 135 newly installed, 78 to remove and 0 not upgraded.
Need to get 623MB of archives. After unpacking 3,940kB will be freed.
E: Couldn't configure pre-depend x11-common for x11-utils, probably a dependency cycle.
youri@zexlette:~$ sudo dpkg --force-depends --remove x11-xkb-utils
[source]
youri@zexlette:~$ sudo aptitude full-upgrade
This hangs at "Calculating the changes"
youri@zexlette:~$ sudo aptitude update
youri@zexlette:~$ sudo aptitude full-upgrade
Need to get 623MB of archives. After unpacking 3,940kB will be freed.
E: Couldn't configure pre-depend x11-common for x11-utils, probably a dependency cycle.
youri@zexlette:~$ sudo dpkg --force-depends --remove x11-xkb-utils
[source]
Monday, February 7, 2011
mjpg-streamer on arch with uvc webcam
[youri@nemesis ~]$ pak -S mjpg-streamer-uvc
[youri@nemesis ~]$ mjpg_streamer
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Unable to set format: Invalid argument
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
[youri@nemesis ~]$ mjpg_streamer -i "input_uvc.so -d /dev/video -y" -o "output_http.so"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: YUV
i: JPEG Quality......: 80
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
[youri@nemesis ~]$ mjpg_streamer
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Unable to set format: Invalid argument
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
[youri@nemesis ~]$ mjpg_streamer -i "input_uvc.so -d /dev/video -y" -o "output_http.so"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: YUV
i: JPEG Quality......: 80
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
501: Not Implemented! no www-folder configured
http://localhost:8080/?action=stream works
Monday, January 3, 2011
Cydia: Parsing dependency pre-depends
Cydia shows error: parsing dependency pre-depends
SSH'ing and doing apt-get update shows this:
Reading package lists... Error!
E: Problem parsing dependency Pre-Depends
E: Error occurred while processing com.sinfuliphone.adblocker (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/www.sinfuliphonerepo.com_._Packages
E: The package lists or status file could not be parsed or opened.
E: Problem parsing dependency Pre-Depends
E: Error occurred while processing com.sinfuliphone.adblocker (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/www.sinfuliphonerepo.com_._Packages
E: The package lists or status file could not be parsed or opened.
Problem is that Pre-Depends: is empty for some packages.
Solution until sinful fixes things:
rm /var/lib/apt/lists/www.sinfuliphonerepo.com_._Packages
or remove pre-depends from adblocker and tlert in sinfulliphonerepo
Wednesday, December 29, 2010
Cydia 'unable to parse package file'
Cydia error:
SSHing into phone and deleting the file fixes it.
Unable to parse package file /var/lib/apt/lists/cydia.xsellize.com_. _Pacakges.IndexDiff (1)
SSHing into phone and deleting the file fixes it.
Monday, December 27, 2010
Amarok PHP and mYSQL
<?php
//charset=utf-8 makes it so unicode output doesn't get gobbled up by browser
header("Content-type: text/html; charset=utf-8");
echo '<p>Youri\'s id3v2 script</p>';
//connect to mysql and select amarokdb
$link=mysql_connect("localhost", "username", "password") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("amarokdb") or die(mysql_error());
echo "Connected to Database<br />";
//this makes the mysql db play well with utf8
mysql_set_charset('utf8',$link);
//globally retrieve all variables in the url string
$variable = $_GET['what'];
$bitratevariable = $_GET['bitrate'];
$coversaction = $_GET['coversaction'];
$idofartist= $_GET['idofartist'];
$artistName= $_GET['artistName'];
//navigation
echo "<a href=?what=bg1cd>Look for albums that have a CD num set</a> <br />";
echo "<a href=?what=blt128>Look for tracks with bitrate lower than 128kbps</a> <br />";
echo "<a href=?what=covers&coversaction=lookup>Look up covers</a> <br />";
echo "<a href=?what=nulltracknum>Look for tracks with no tracknumber set</a>";
echo '<br/><br/>';
echo "Look up bitrates<br />";
echo "[<a href=?what=bitrate&bitrate=128>128</a>] ";
echo "[<a href=?what=bitrate&bitrate=160>160</a>] ";
echo "[<a href=?what=bitrate&bitrate=192>192</a>] ";
echo "[<a href=?what=bitrate&bitrate=256>256</a>] ";
echo "[<a href=?what=bitrate&bitrate=320>320</a>] ";
echo '<br/><br/>';
//return the artist's name when an artist iD is passed
function getArtist($artistnum)
{
$artist = mysql_query("SELECT * FROM `artists` where `id` = $artistnum");
while ($row = mysql_fetch_array($artist))
{
return $row{'name'};
}
}
//returns the album's name when an album id is passed
function getAlbum($albumnum)
{
$album = mysql_query("SELECT * FROM `albums` where `id` = $albumnum");
while ($row = mysql_fetch_array($album))
{
return $row{'name'};
}
}
//this lists all the artists in the database except for various artists
function listArtists()
{
//select UNIQUE artist ID's from a join table of artists and album (join by referencing artists id column with albums artist column
/*
artists albums
ID NAME NAME ARTIST
88 ARTIST ALBUM 88
*/
$result = mysql_query("select distinct artist from artists join albums on albums.artist=artists.id ORDER BY `artists`.`name`");
//walk through the result and pull artist id and artistname
while ($row = mysql_fetch_array($result))
{
//urlencode for spaces in artists and utf8 artists
$artistID = $row{'artist'};
$artistNameSQL=getArtist($artistID);
echo "<a href=?what=covers&coversaction=getArtistAlbums&idofartist=$artistID&artistName=",
urlencode($artistNameSQL),
">$artistNameSQL</a><br />";
}
}
//listallalbums belonging to artist ID when given an artist ID
//artistname is passed only for html output
function listAlbumsById($idofartist,$artistName)
{
$albums = mysql_query("SELECT * FROM `albums` where `artist` = $idofartist" );
echo "<strong>$artistName</strong><br />";
while ($row = mysql_fetch_array($albums))
{
$album = $row{'name'};
//amarok stores album covers by getting and md5sum hash of lowercased artist and album
//mb_strtolower works on unicode white strtolower doesn't
echo "<div style=\"display: inline-block\">";
echo "$album<br />";
echo "/home/youri/.kde4/share/apps/amarok/albumcovers/large/",md5(mb_strtolower("$artistName$album",'UTF-8')),"<br/>";
echo "<img width=500px src=./albumcovers/",md5(mb_strtolower("$artistName$album",'UTF-8')),"><br/>";
echo "</div>";
}
}
if ($variable=="bg1cd")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `discnumber` IS NOT NULL");
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
echo "$artist - $album <br />";
}
}
elseif ($variable=="blt128")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `bitrate` < 128 ORDER BY `tracks`.`artist` ASC");
$num_rows = mysql_num_rows($result);
echo "$num_rows Tracks<br /><br />";
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
$tracknumber = $row{'tracknumber'};
$title = $row{'title'};
$bitrate = $row{'bitrate'};
echo "$artist - $album - $tracknumber - $title [$bitrate]<br />";
}
}
elseif ($variable=="bitrate")
{
$result = mysql_query("SELECT * FROM `tracks` WHERE `bitrate` = $bitratevariable");
$num_rows = mysql_num_rows($result);
$totaltrax = mysql_query("SELECT * FROM `tracks`");
$num_rows_total = mysql_num_rows($totaltrax);
echo "$num_rows Tracks are $bitratevariable kbps ";
echo "out of a $num_rows_total total tracks<br />";
$percentage=($num_rows/$num_rows_total *100);
echo "Which equals: ";
echo number_format($percentage, 1)."%<br/>";
}
//if covers is called with lookup, list artists
//if covers is called with get artistalbums, then get artist's albums
elseif ($variable=="covers")
{
if ($coversaction == "lookup" )
{
listArtists();
}
elseif ($coversaction == "getArtistAlbums" )
{
listAlbumsById($idofartist,$artistName);
}
}
elseif ($variable=="nulltracknum")
{
$result = mysql_query("SELECT * FROM `tracks` where `tracknumber` is null");
while ($row = mysql_fetch_array($result))
{
$artist = getArtist($row{'artist'});
$album = getAlbum($row{'album'});
$title = $row{'title'};
}
}
?>
Subscribe to:
Posts (Atom)