Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/libraries/src/Document/Renderer/Feed/AtomRenderer.php on line 89 Hacks https://www.isaacray.com/index.php/hacks 2024-05-10T21:23:34+00:00 IsaacRay Joomla! - Open Source Content Management MySQL on DSL 2016-09-02T03:59:45+00:00 2016-09-02T03:59:45+00:00 https://www.isaacray.com/index.php/hacks/mysql-on-dsl Super User <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">4/11/2010</p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">I've recreated this page to support a more logical and portable installation of the latest MySQL GA source release in DamnSmallLinux and to package it as an extension.</p> <ol style="font-size: 12.16px; line-height: 15.808px;" type="1"> <li class="MsoNormal" style="line-height: normal;">Executed with DSL-4.4.10 live CD loaded to the command prompt with the boot option command "dsl 2".   Because I'm running the live CD, there's no hard drive so if you intend to do the same, you will need about 650 MB Ram to build MySQL. You can also use a hard drive but that's outside the scope of this tutorial.</li> <li class="MsoNormal" style="line-height: normal;">Work out of the /opt directory so as to have space. <ol type="1"> <li class="MsoNormal">cd /opt</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To compile MySQL you need to add some compiler tools to the system. You don't have to use wget, but I kept copies on my own local FTP server so that I could easily start over. Gcc1-with-libs.dsl and gnu-utils.dsl are both available in the MyDSL Browser. Mysql src came from www.mysql.org. <ol type="1"> <li class="MsoNormal">wget ftp://[someserver]/mysql-5.1.45.tar.gz</li> <li class="MsoNormal">wget ftp://[someserver]/gcc1-with-libs.dsl <ol> <li class="MsoNormal">http://distro.ibiblio.org/pub/linux/distributions/damnsmall/mydsl/system/gcc1-with-libs.dsl</li> <li class="MsoNormal">you can install from the command line with "mydsl-wget gcc1-with-libs.dsl system"</li> </ol> </li> <li class="MsoNormal">wget ftp://[someserver]/gnu-utils.dsl <ol> <li class="MsoNormal">http://distro.ibiblio.org/pub/linux/distributions/damnsmall/mydsl/system/gnu-utils.dsl</li> <li class="MsoNormal">you can install from the command line with "mydsl-wget gnu-utils.dsl system"</li> </ol> </li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Install the utilities (skip this if you used the browser) <ol type="1"> <li class="MsoNormal">mydsl-load gcc1-with-libs.dsl</li> <li class="MsoNormal">mydsl-load gnu-utils.dsl</li> <li class="MsoNormal">tar xvzf mysql-5.0.67.tar.gz</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Clean up (for space) <ol type="1"> <li class="MsoNormal">rm -f gcc1-with-libs.dsl</li> <li class="MsoNormal">rm -f gnu-utils.dsl</li> <li class="MsoNormal">rm -f mysql-5.0.67.tar.gz</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Compile mysql. "make -j4" and "sudo make install -j4" are for multiple processors. You may do better removing "-j4". Adjust your .configure options as you see fit.I'm putting everything into the /opt/mysql directory so this needs to be configured during the build. <ol type="1"> <li class="MsoNormal">cd mysql-5.1.45</li> <li class="MsoNormal">./configure --prefix=/opt/mysql --without-debug --without-man --without-docs --without-bench --without-innodb --without-ndb-test --without-ndb-debug --disable-dependency-tracking</li> <li class="MsoNormal">make -j4</li> <li class="MsoNormal">sudo make install -j4</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Clean up (for space) <ol type="1"> <li class="MsoNormal">cd /opt</li> <li class="MsoNormal">rm -Rf mysql-5.1.45</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To make your DSL extension have an "out of the box" startup configuration, add this script to /opt/mysql as "dsl-setup.sh" or use the steps to get your database up and runnin <ol type="1"> <li class="MsoNormal">sudo ln -s /opt/mysql/bin/* /opt/bin/</li> <li class="MsoNormal">#enable the man symlinks of you have man</li> <li class="MsoNormal">#sudo ln -s /opt/mysql/share/man/man1/* /usr/share/man/man1/</li> <li class="MsoNormal">#sudo ln -s /opt/mysql/share/man/man8/* /usr/share/man/man8/</li> <li class="MsoNormal">sudo adduser --system mysql</li> <li class="MsoNormal">sudo addgroup mysql</li> <li class="MsoNormal">sudo adduser mysql mysql</li> <li class="MsoNormal">sudo cp /opt/mysql/share/mysql/mysql.server /etc/init.d</li> <li class="MsoNormal">sudo cp /opt/mysql/share/mysql/my-small.cnf /etc/my.cnf</li> <li class="MsoNormal">sudo update-rc.d mysql.server defaults</li> <li class="MsoNormal">sudo mkdir /opt/mysql/var</li> <li class="MsoNormal">sudo /opt/bin/mysql_install_db</li> <li class="MsoNormal">sudo chgrp -R mysql /opt/mysql</li> <li class="MsoNormal">sudo chown -R mysql /opt/mysql</li> <li class="MsoNormal">sudo chmod -R u+wrx /opt/mysql</li> <li class="MsoNormal">sudo /etc/init.d/mysql.server start</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Make it executable <ol type="1"> <li class="MsoNormal">chmod +x /opt/mysql/dsl-setup.sh</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Move to the FS root to package the extension. <ol type="1"> <li class="MsoNormal">cd /</li> <li class="MsoNormal">tar -cvzf /ramdisk/mysql_5.1.45.dsl /opt/mysql</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To install this extension on another DSL box <ol type="1"> <li class="MsoNormal">mydsl-load mysql_5.1.45.dsl</li> <li class="MsoNormal">sudo /opt/mysql/dsl-setup.sh</li> </ol> </li> </ol> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">Want to do something dangerous to get root access to mysql from the network? From the mysql prompt:</p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">mysql&gt; GRANT ALL on *.* to 'root'@'%' identified by 'y0urPassw0rD';</p> <p> </p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">4/11/2010</p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">I've recreated this page to support a more logical and portable installation of the latest MySQL GA source release in DamnSmallLinux and to package it as an extension.</p> <ol style="font-size: 12.16px; line-height: 15.808px;" type="1"> <li class="MsoNormal" style="line-height: normal;">Executed with DSL-4.4.10 live CD loaded to the command prompt with the boot option command "dsl 2".   Because I'm running the live CD, there's no hard drive so if you intend to do the same, you will need about 650 MB Ram to build MySQL. You can also use a hard drive but that's outside the scope of this tutorial.</li> <li class="MsoNormal" style="line-height: normal;">Work out of the /opt directory so as to have space. <ol type="1"> <li class="MsoNormal">cd /opt</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To compile MySQL you need to add some compiler tools to the system. You don't have to use wget, but I kept copies on my own local FTP server so that I could easily start over. Gcc1-with-libs.dsl and gnu-utils.dsl are both available in the MyDSL Browser. Mysql src came from www.mysql.org. <ol type="1"> <li class="MsoNormal">wget ftp://[someserver]/mysql-5.1.45.tar.gz</li> <li class="MsoNormal">wget ftp://[someserver]/gcc1-with-libs.dsl <ol> <li class="MsoNormal">http://distro.ibiblio.org/pub/linux/distributions/damnsmall/mydsl/system/gcc1-with-libs.dsl</li> <li class="MsoNormal">you can install from the command line with "mydsl-wget gcc1-with-libs.dsl system"</li> </ol> </li> <li class="MsoNormal">wget ftp://[someserver]/gnu-utils.dsl <ol> <li class="MsoNormal">http://distro.ibiblio.org/pub/linux/distributions/damnsmall/mydsl/system/gnu-utils.dsl</li> <li class="MsoNormal">you can install from the command line with "mydsl-wget gnu-utils.dsl system"</li> </ol> </li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Install the utilities (skip this if you used the browser) <ol type="1"> <li class="MsoNormal">mydsl-load gcc1-with-libs.dsl</li> <li class="MsoNormal">mydsl-load gnu-utils.dsl</li> <li class="MsoNormal">tar xvzf mysql-5.0.67.tar.gz</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Clean up (for space) <ol type="1"> <li class="MsoNormal">rm -f gcc1-with-libs.dsl</li> <li class="MsoNormal">rm -f gnu-utils.dsl</li> <li class="MsoNormal">rm -f mysql-5.0.67.tar.gz</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Compile mysql. "make -j4" and "sudo make install -j4" are for multiple processors. You may do better removing "-j4". Adjust your .configure options as you see fit.I'm putting everything into the /opt/mysql directory so this needs to be configured during the build. <ol type="1"> <li class="MsoNormal">cd mysql-5.1.45</li> <li class="MsoNormal">./configure --prefix=/opt/mysql --without-debug --without-man --without-docs --without-bench --without-innodb --without-ndb-test --without-ndb-debug --disable-dependency-tracking</li> <li class="MsoNormal">make -j4</li> <li class="MsoNormal">sudo make install -j4</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Clean up (for space) <ol type="1"> <li class="MsoNormal">cd /opt</li> <li class="MsoNormal">rm -Rf mysql-5.1.45</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To make your DSL extension have an "out of the box" startup configuration, add this script to /opt/mysql as "dsl-setup.sh" or use the steps to get your database up and runnin <ol type="1"> <li class="MsoNormal">sudo ln -s /opt/mysql/bin/* /opt/bin/</li> <li class="MsoNormal">#enable the man symlinks of you have man</li> <li class="MsoNormal">#sudo ln -s /opt/mysql/share/man/man1/* /usr/share/man/man1/</li> <li class="MsoNormal">#sudo ln -s /opt/mysql/share/man/man8/* /usr/share/man/man8/</li> <li class="MsoNormal">sudo adduser --system mysql</li> <li class="MsoNormal">sudo addgroup mysql</li> <li class="MsoNormal">sudo adduser mysql mysql</li> <li class="MsoNormal">sudo cp /opt/mysql/share/mysql/mysql.server /etc/init.d</li> <li class="MsoNormal">sudo cp /opt/mysql/share/mysql/my-small.cnf /etc/my.cnf</li> <li class="MsoNormal">sudo update-rc.d mysql.server defaults</li> <li class="MsoNormal">sudo mkdir /opt/mysql/var</li> <li class="MsoNormal">sudo /opt/bin/mysql_install_db</li> <li class="MsoNormal">sudo chgrp -R mysql /opt/mysql</li> <li class="MsoNormal">sudo chown -R mysql /opt/mysql</li> <li class="MsoNormal">sudo chmod -R u+wrx /opt/mysql</li> <li class="MsoNormal">sudo /etc/init.d/mysql.server start</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Make it executable <ol type="1"> <li class="MsoNormal">chmod +x /opt/mysql/dsl-setup.sh</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">Move to the FS root to package the extension. <ol type="1"> <li class="MsoNormal">cd /</li> <li class="MsoNormal">tar -cvzf /ramdisk/mysql_5.1.45.dsl /opt/mysql</li> </ol> </li> <li class="MsoNormal" style="line-height: normal;">To install this extension on another DSL box <ol type="1"> <li class="MsoNormal">mydsl-load mysql_5.1.45.dsl</li> <li class="MsoNormal">sudo /opt/mysql/dsl-setup.sh</li> </ol> </li> </ol> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">Want to do something dangerous to get root access to mysql from the network? From the mysql prompt:</p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;">mysql&gt; GRANT ALL on *.* to 'root'@'%' identified by 'y0urPassw0rD';</p> <p> </p> Rotate tomcat logs 2016-09-02T03:59:30+00:00 2016-09-02T03:59:30+00:00 https://www.isaacray.com/index.php/hacks/rotate-tomcat-logs Super User <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">If you want Tomcat to automatically rotate/cycle catalina.out with the date then do the following:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Find and edit the file: catalina.sh</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">change:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: 'Courier New';">CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out</span></strong></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">to:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: 'Courier New';">CATALINA_OUT="$CATALINA_BASE"/logs/catalina.`date +%Y-%m-%d`.out</span></strong></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Note:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Be sure you are editing the correct file as many different installs may use their own catalina.sh or even rename it and move it to /etc/init.d.  Windows users may have to find work-arounds for the date function.</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">If you want Tomcat to automatically rotate/cycle catalina.out with the date then do the following:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">Find and edit the file: catalina.sh</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">change:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: 'Courier New';">CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out</span></strong></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">to:</span></p> <p class="MsoNormal" style="font-size: 12.16px; margin-bottom: 0.0001pt; line-height: normal;"><strong><span style="font-size: 10pt; font-family: 'Courier New';">CATALINA_OUT="$CATALINA_BASE"/logs/catalina.`date +%Y-%m-%d`.out</span></strong></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Note:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Be sure you are editing the correct file as many different installs may use their own catalina.sh or even rename it and move it to /etc/init.d.  Windows users may have to find work-arounds for the date function.</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p> Apache Reverse Proxy 2016-09-02T03:59:02+00:00 2016-09-02T03:59:02+00:00 https://www.isaacray.com/index.php/hacks/apache-reverse-proxy Super User <p><span style="font-size: 12.16px; line-height: 15.808px;">Why do you need a reverse proxy? </span><br style="font-size: 12.16px; line-height: 15.808px;" /><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">In a normal case, you may have one public IP address, and 4 servers behind your firewall.  One is serving mail, one is a database, one is a web server, and the last is a DNS server.  You want all of these servers to share your public IP address, and resolve to names like:</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">1.    database.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">2.    mail.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">3.    www.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">4.    fullyqualifiedns.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">Another case is when you have several different types of services that you would rather host on the same port rather than fowarding all types of different ports through your firewall/router.  For example, you have a Tomcat web container for your JSP pages, IIS for your ASP pages, and Apache for your PHP pages.  I realize that there are plugins to get IIS to serve all of these documents, but how much fun is that?  Also, I've learned that Apache HTTP is the best PHP webserver on any platform.</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">Note: if you are running IIS, you WILL have all kinds of other problems when attempting to install a reverse proxy... especially IIS6.  You may have to disable Windows' socket pooling.</span><a style="font-size: 12.16px; line-height: 15.808px;" href="http://support.microsoft.com/kb/813368" target="_blank">http://support.microsoft.com/kb/813368</a><span style="font-size: 12.16px; line-height: 15.808px;"> and </span><a style="font-size: 12.16px; line-height: 15.808px;" href="http://support.microsoft.com/kb/238131" target="_blank">http://support.microsoft.com/kb/238131</a><span style="font-size: 12.16px; line-height: 15.808px;"> </span><br style="font-size: 12.16px; line-height: 15.808px;" /><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">A reverse proxy will make this possible.  You can have one public IP address and several(multiple) internal IP addresses(hosts) and have them all available on the internet. {Forgive the redundancy of the previous sentence... I needed to use some words that would make this page easy to find in a search engine as most people looking for this solution would not know to type "reverse proxy."} The solution I have played with is Apache's HTTP server which can be configured as a reverse proxy. </span></p> <p><span style="font-size: 12.16px; line-height: 15.808px;">Why do you need a reverse proxy? </span><br style="font-size: 12.16px; line-height: 15.808px;" /><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">In a normal case, you may have one public IP address, and 4 servers behind your firewall.  One is serving mail, one is a database, one is a web server, and the last is a DNS server.  You want all of these servers to share your public IP address, and resolve to names like:</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">1.    database.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">2.    mail.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">3.    www.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">4.    fullyqualifiedns.yourdomain.com</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">Another case is when you have several different types of services that you would rather host on the same port rather than fowarding all types of different ports through your firewall/router.  For example, you have a Tomcat web container for your JSP pages, IIS for your ASP pages, and Apache for your PHP pages.  I realize that there are plugins to get IIS to serve all of these documents, but how much fun is that?  Also, I've learned that Apache HTTP is the best PHP webserver on any platform.</span><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">Note: if you are running IIS, you WILL have all kinds of other problems when attempting to install a reverse proxy... especially IIS6.  You may have to disable Windows' socket pooling.</span><a style="font-size: 12.16px; line-height: 15.808px;" href="http://support.microsoft.com/kb/813368" target="_blank">http://support.microsoft.com/kb/813368</a><span style="font-size: 12.16px; line-height: 15.808px;"> and </span><a style="font-size: 12.16px; line-height: 15.808px;" href="http://support.microsoft.com/kb/238131" target="_blank">http://support.microsoft.com/kb/238131</a><span style="font-size: 12.16px; line-height: 15.808px;"> </span><br style="font-size: 12.16px; line-height: 15.808px;" /><br style="font-size: 12.16px; line-height: 15.808px;" /><span style="font-size: 12.16px; line-height: 15.808px;">A reverse proxy will make this possible.  You can have one public IP address and several(multiple) internal IP addresses(hosts) and have them all available on the internet. {Forgive the redundancy of the previous sentence... I needed to use some words that would make this page easy to find in a search engine as most people looking for this solution would not know to type "reverse proxy."} The solution I have played with is Apache's HTTP server which can be configured as a reverse proxy. </span></p> Magic DVD Ripper – Execute Error 2016-09-02T03:58:49+00:00 2016-09-02T03:58:49+00:00 https://www.isaacray.com/index.php/hacks/magic-dvd-ripper-execute-error Super User <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">For Magic DVD Ripper, when you have gotten a confirmation that your registration code has been accepted, sometimes the application will stop working and ask you for the code repeatedly.  If you do not have a valid copy of MDR, do not attempt this.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">To reset the application after a full reinstall, delete the following key in your registry:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="background: none 0% 0% repeat scroll #cccccc;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ALP\option</span></span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">You will usually see this error: "Register Code is not correct! We strongly recommend you copy/paste it."</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">For Windows XP x64:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="background: none 0% 0% repeat scroll silver;">HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ALP\option</span></span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">This fix applies (at least) to v5.2.1.</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">For Magic DVD Ripper, when you have gotten a confirmation that your registration code has been accepted, sometimes the application will stop working and ask you for the code repeatedly.  If you do not have a valid copy of MDR, do not attempt this.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">To reset the application after a full reinstall, delete the following key in your registry:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="background: none 0% 0% repeat scroll #cccccc;">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ALP\option</span></span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">You will usually see this error: "Register Code is not correct! We strongly recommend you copy/paste it."</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">For Windows XP x64:</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="background: none 0% 0% repeat scroll silver;">HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ALP\option</span></span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">This fix applies (at least) to v5.2.1.</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p> Creating Video for Sansa Fuze 2016-09-02T03:58:39+00:00 2016-09-02T03:58:39+00:00 https://www.isaacray.com/index.php/hacks/creating-video-for-sansa-fuze Super User <p style="font-size: 12.16px; line-height: 15.808px;">Since the Sansa Media Converter does not like batch commands for larger media libraries, and because the files are rather large, I've created a listing of the video parameters that you need to setup in Avidemux to create videos that will play on the Fuze.</p> <h2 style="line-height: 15.808px;">Video</h2> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Codec 4CC: DX50</li> <li>Image Size: 224 x 176</li> <li>Aspect Ratio: 1:1</li> <li>Frame Rate: 20.000</li> <li>Global Motion Compensation: No</li> <li>Packed Bitstream: No</li> <li>Quarter Pixel: No</li> </ol> <h2 style="line-height: 15.808px;">Audio</h2> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Codec: MP3</li> <li>Chanels: Stereo</li> <li>Bitrate: 16000 Bps / 128 kbps</li> <li>Variable Bitrate: No</li> <li>Frequency: 44100 Hz</li> </ol> <p style="font-size: 12.16px; line-height: 15.808px;"><a href="https://www.isaacray.com/old/images/files/sfgc.user.js">link</a></p> <p style="font-size: 12.16px; line-height: 15.808px;">Since the Sansa Media Converter does not like batch commands for larger media libraries, and because the files are rather large, I've created a listing of the video parameters that you need to setup in Avidemux to create videos that will play on the Fuze.</p> <h2 style="line-height: 15.808px;">Video</h2> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Codec 4CC: DX50</li> <li>Image Size: 224 x 176</li> <li>Aspect Ratio: 1:1</li> <li>Frame Rate: 20.000</li> <li>Global Motion Compensation: No</li> <li>Packed Bitstream: No</li> <li>Quarter Pixel: No</li> </ol> <h2 style="line-height: 15.808px;">Audio</h2> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Codec: MP3</li> <li>Chanels: Stereo</li> <li>Bitrate: 16000 Bps / 128 kbps</li> <li>Variable Bitrate: No</li> <li>Frequency: 44100 Hz</li> </ol> <p style="font-size: 12.16px; line-height: 15.808px;"><a href="https://www.isaacray.com/old/images/files/sfgc.user.js">link</a></p> ffmpeg Cheat Sheet 2016-09-02T03:58:09+00:00 2016-09-02T03:58:09+00:00 https://www.isaacray.com/index.php/hacks/ffmpeg-cheat-sheet Super User <h1 style="line-height: 15.808px;">Input Devices</h1> <h2 style="line-height: 15.808px;">List dshow input devices</h2> <p style="font-size: 12.16px; line-height: 15.808px;">ffmpeg -list_devices true -f dshow -i dummy</p> <h2 style="line-height: 15.808px;">Capture from an input device and output to a file that splits every five minutes</h2> <p style="font-size: 12.16px; line-height: 15.808px;">ffmpeg -f dshow -i audio="Microphone (2- High Definition " -map 0 -codec:a libmp3lame -f segment -segment_time 300 out%4d.mp3</p> <h1 style="line-height: 15.808px;">Input Devices</h1> <h2 style="line-height: 15.808px;">List dshow input devices</h2> <p style="font-size: 12.16px; line-height: 15.808px;">ffmpeg -list_devices true -f dshow -i dummy</p> <h2 style="line-height: 15.808px;">Capture from an input device and output to a file that splits every five minutes</h2> <p style="font-size: 12.16px; line-height: 15.808px;">ffmpeg -f dshow -i audio="Microphone (2- High Definition " -map 0 -codec:a libmp3lame -f segment -segment_time 300 out%4d.mp3</p> GM Infotainment Video Conversion 2016-09-02T03:57:17+00:00 2016-09-02T03:57:17+00:00 https://www.isaacray.com/index.php/hacks/gm-infotainment-video-conversion Super User <p style="font-size: 12.16px; line-height: 15.808px;">I have a 2011 GM Vehicle with an in-dash Infotainment system that plays AVI/DivX files.  Unfortunately, most of my AVI files do not play correctly on the system, or not at all.  I get errors like "File format not supported," or the resolution would be miss matched, or even the sound would be horrible.</p> <p style="font-size: 12.16px; line-height: 15.808px;">My goal is to create a batch file that utilizes open-source projects to re-encode my movies to a consistent sound and video format that will work in the vehicle.</p> <p style="font-size: 12.16px; line-height: 15.808px;"> </p> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Analize input video <ol> <li>Need to know the width, height</li> <li>Maybe" how many audio streams (to preserve more than 2 channels, each channel will have to be split into it's own wav file, normalized, then recombined)</li> <li>Maybe: detect for English stream, discard others.</li> <li>Maybe: detect sub titles and discard or keep</li> </ol> </li> <li>Rip the audio streams from it</li> <li>Edit the audio streams <ol> <li>Signal level compression/expansion of the audio streams</li> <li>Signal level normalization of the audio streams</li> </ol> </li> <li>Re-encode the video and recombine with the audio <ol> <li>The DivX codec will work with MPEG4 but I'm looking for a way to use H.264</li> <li>Force FourCC to be DX50</li> <li>Force the resolution to be 720x480 (use 720x432 to fill the entire screen) even though the screen is 800x480</li> <li>Force the G.O.P. to 15 (group of pictures is the number of frames before a keyframe)</li> <li>Force 0 B-Frames (while H.264 takes full advantage of B-Frames, this particular DivX player does not).  What is a B-Frame? A B-Frame is a file-size optimization mechanism for H.264 (and other codecs) that only stores the bitmap changes from a previous frame as apposed to storing the entire frame.  When areas of a video remain constant for several seconds, this can save a considerable amount of space. The DivX profile of the player is supposed to be "Home Theater" which should support 1 B-Frame, but I have not had much success using FFMPEG+MPEG4.  I will keep investigating with H.264. Edit: FFMPEG+MPEG4 has to run in a single thread to encode B-Frames.</li> <li><span style="line-height: 1.3em;">Reduce the video bit rate... since the screen is small and I would like to cram 8 full length movies onto a single 4GB DVD.  400KB/s is a good mix of quality and size.</span></li> </ol> </li> </ol> <div style="font-size: 12.16px; line-height: 15.808px;">This process would take a considerable amount of time for each video, so it would best exist inside a single batch file that can accept parameters.  To process multiple files, I'd just create another batch file that will go down the list, or possible use a command-line for loop to process every video in a particular directory.</div> <div style="font-size: 12.16px; line-height: 15.808px;">When burning, make sure to use ISO/Joliet format for the data DVD... I have had mixed/poor results with UDF discs of all versions.</div> <div style="font-size: 12.16px; line-height: 15.808px;">The projects that I am using will be Windows versions:</div> <div style="font-size: 12.16px; line-height: 15.808px;"> <ol> <li><a href="http://www.ffmpeg.org/">http://www.ffmpeg.org/</a> Download here: <a href="http://ffmpeg.zeranoe.com/builds/">http://ffmpeg.zeranoe.com/builds/</a></li> <li><a href="http://sox.sourceforge.net/Docs/Features">http://sox.sourceforge.net/</a> Download here: <a href="http://sourceforge.net/projects/sox/files/sox/">http://sourceforge.net/projects/sox/files/sox/</a></li> </ol> <div>Check Back Later for more updates.</div> <div><strong>Usage</strong>: filename.bat inputVideoFileName outputVideoFileName videoKBPS [ffmpeg pathToffmpeg] [sox pathToSox]</div> <div><strong>Example</strong>: filename.bat "StarTrek.mkv" "StarTrekForCar.avi" 300 ffmpeg c:\ffmpeg\bin\ffmpeg.exe sox c:\sox\sox.exe</div> <div style="border: 1px solid black; padding: 5px; background-color: #f0f0f0;">echo off <br /><br />REM These variables exist only within this file execution <br />setlocal <br /><br />REM Change to the batch file directory, where FFMPEG and SOX are located <br />cd %~dp0 <br /><br />set inputFileName=%1 <br />set outputFileName=%2 <br />set vbr=%3 <br />set width=0 <br />set height=0 <br />set duration=0 <br />set ffmpeg=ffmpeg.exe <br />set sox=sox.exe <br /><br />REM Test input parameters <br />IF %1.==. GOTO Usage <br />IF %2.==. GOTO Usage <br /><br />IF %3.==. GOTO Usage <br />echo %3| findstr /r "^[1-9][0-9]*$"&gt;nul <br />IF ERRORLEVEL 0 GOTO Parameter4 <br />echo Invalid Bitrate <br />goto Usage <br /><br />:Parameter4 <br />IF %4. == ffmpeg. GOTO UpdateFFMPEG4 <br />IF %4. == sox. GOTO UpdateSox4 <br />:Parameter6 <br />IF %6. == ffmpeg. GOTO UpdateFFMPEG6 <br />IF %6. == sox. GOTO UpdateSox6 <br /><br />:Continue <br /><br />if not exist "%ffmpeg%" ( <br />echo Can not find ffmpeg binary: %ffmpeg% <br />goto Usage <br />) <br /><br />if not exist "%sox%" ( <br />echo Can not find Sox binary: %sox% <br />goto Usage <br />) <br /><br />if not exist "%inputFileName%" ( <br />echo Can not find input file: %inputFileName% <br />goto Usage <br />) <br /><br />REM this is the command to print the file information <br />set info=ffprobe -v quiet -show_format -show_streams -of default %inputFileName% <br /><br />REM get the input video width <br />for /f "delims=" %%a in ('%info% ^| findstr "width"') do @set width=%%a <br />set width=%width:~6% <br /><br />REM get the input video height <br />for /f "delims=" %%a in ('%info% ^| findstr "height"') do @set height=%%a <br />set height=%height:~7% <br /><br />REM get the input video duration <br />for /f "delims=" %%a in ('%info% ^| findstr "duration"') do @set duration=%%a <br />set duration=%duration:~9% <br /><br />echo Input Video Dimensions: %width%x%height% <br />echo Input Video Duration : %duration% <br /><br />set audioFileOriginal=temp1.%outputFileName%.wav <br />set audioFileFinal=temp2.%outputFileName%.wav <br />del %outputFileName% &gt; NUL <br />del %audioFileOriginal% &gt; NUL <br />set vid_opts=-vcodec mpeg4 -vb %vbr%k -acodec libmp3lame -filter:v scale=720:480 -vtag DX50 -f avi -ab 128k -g 15 -bf 1 -map 0:0 -map 1:0 <br />set com_opts=-ac 2 -threads 1 -y -r 30 <br /><br />REM - Get audio <br />%ffmpeg% -i %inputFileName% -vn %com_opts% %audioFileOriginal% <br /><br />REM process audio through sox. We want to reduce the <br />REM dynamic range with compand and normalize the volume <br />%sox% %audioFileOriginal% %audioFileFinal% compand 0.3,1 6:-70,-60,-20 -5 -90 0.2 norm <br /><br />REM todo <br />REM Calculate the scale for video encoding <br />REM create a chapter every 10 minutes <br /><br />REM Recombine video and audio <br />%ffmpeg% -i %inputFileName% -i %audioFileFinal% %vid_opts% %com_opts% %outputFileName% <br /><br />Goto CleanExit <br /><br />REM these are "functions <br />:Usage <br />echo <br />echo Usage: inputFileName outputFileName bitrate [ffmpeg location] [sox location] <br />echo [ffmpeg location] ie: ffmpeg "c:\ffmpeg\bin\ffmpeg.exe" <br />echo [sox location] ie: ffmpeg "c:\sox\sox.exe" <br />goto DirtyExit <br /><br />:UpdateFFMPEG4 <br />if %5.==. goto LocationErrorFFMPEG <br />set ffmpeg=%5 <br />goto Parameter6 <br /><br />:UpdateSox4 <br />if %5.==. goto LocationErrorSox <br />set sox=%5 <br />goto Parameter6 <br /><br />:UpdateFFMPEG6 <br />if %7.==. goto LocationErrorFFMPEG <br />set ffmpeg=%7 <br />goto Continue <br /><br />:UpdateSox6 <br />if %7.==. goto LocationErrorSox <br />set sox=%7 <br />goto Continue <br /><br />:LocationErrorFFMPEG <br />echo FFMPEG requires a path. <br />goto Usage <br /><br />:LocationErrorFFMPEG <br />echo Sox requires a path. <br />goto Usage <br /><br />REM Clean up temp files <br />:CleanExit <br />del %audioFileOriginal% &gt; NUL <br />del %audioFileFinal% &gt; NUL <br /><br />:DirtyExit</div> <p> </p> </div> <p style="font-size: 12.16px; line-height: 15.808px;">I have a 2011 GM Vehicle with an in-dash Infotainment system that plays AVI/DivX files.  Unfortunately, most of my AVI files do not play correctly on the system, or not at all.  I get errors like "File format not supported," or the resolution would be miss matched, or even the sound would be horrible.</p> <p style="font-size: 12.16px; line-height: 15.808px;">My goal is to create a batch file that utilizes open-source projects to re-encode my movies to a consistent sound and video format that will work in the vehicle.</p> <p style="font-size: 12.16px; line-height: 15.808px;"> </p> <ol style="font-size: 12.16px; line-height: 15.808px;"> <li>Analize input video <ol> <li>Need to know the width, height</li> <li>Maybe" how many audio streams (to preserve more than 2 channels, each channel will have to be split into it's own wav file, normalized, then recombined)</li> <li>Maybe: detect for English stream, discard others.</li> <li>Maybe: detect sub titles and discard or keep</li> </ol> </li> <li>Rip the audio streams from it</li> <li>Edit the audio streams <ol> <li>Signal level compression/expansion of the audio streams</li> <li>Signal level normalization of the audio streams</li> </ol> </li> <li>Re-encode the video and recombine with the audio <ol> <li>The DivX codec will work with MPEG4 but I'm looking for a way to use H.264</li> <li>Force FourCC to be DX50</li> <li>Force the resolution to be 720x480 (use 720x432 to fill the entire screen) even though the screen is 800x480</li> <li>Force the G.O.P. to 15 (group of pictures is the number of frames before a keyframe)</li> <li>Force 0 B-Frames (while H.264 takes full advantage of B-Frames, this particular DivX player does not).  What is a B-Frame? A B-Frame is a file-size optimization mechanism for H.264 (and other codecs) that only stores the bitmap changes from a previous frame as apposed to storing the entire frame.  When areas of a video remain constant for several seconds, this can save a considerable amount of space. The DivX profile of the player is supposed to be "Home Theater" which should support 1 B-Frame, but I have not had much success using FFMPEG+MPEG4.  I will keep investigating with H.264. Edit: FFMPEG+MPEG4 has to run in a single thread to encode B-Frames.</li> <li><span style="line-height: 1.3em;">Reduce the video bit rate... since the screen is small and I would like to cram 8 full length movies onto a single 4GB DVD.  400KB/s is a good mix of quality and size.</span></li> </ol> </li> </ol> <div style="font-size: 12.16px; line-height: 15.808px;">This process would take a considerable amount of time for each video, so it would best exist inside a single batch file that can accept parameters.  To process multiple files, I'd just create another batch file that will go down the list, or possible use a command-line for loop to process every video in a particular directory.</div> <div style="font-size: 12.16px; line-height: 15.808px;">When burning, make sure to use ISO/Joliet format for the data DVD... I have had mixed/poor results with UDF discs of all versions.</div> <div style="font-size: 12.16px; line-height: 15.808px;">The projects that I am using will be Windows versions:</div> <div style="font-size: 12.16px; line-height: 15.808px;"> <ol> <li><a href="http://www.ffmpeg.org/">http://www.ffmpeg.org/</a> Download here: <a href="http://ffmpeg.zeranoe.com/builds/">http://ffmpeg.zeranoe.com/builds/</a></li> <li><a href="http://sox.sourceforge.net/Docs/Features">http://sox.sourceforge.net/</a> Download here: <a href="http://sourceforge.net/projects/sox/files/sox/">http://sourceforge.net/projects/sox/files/sox/</a></li> </ol> <div>Check Back Later for more updates.</div> <div><strong>Usage</strong>: filename.bat inputVideoFileName outputVideoFileName videoKBPS [ffmpeg pathToffmpeg] [sox pathToSox]</div> <div><strong>Example</strong>: filename.bat "StarTrek.mkv" "StarTrekForCar.avi" 300 ffmpeg c:\ffmpeg\bin\ffmpeg.exe sox c:\sox\sox.exe</div> <div style="border: 1px solid black; padding: 5px; background-color: #f0f0f0;">echo off <br /><br />REM These variables exist only within this file execution <br />setlocal <br /><br />REM Change to the batch file directory, where FFMPEG and SOX are located <br />cd %~dp0 <br /><br />set inputFileName=%1 <br />set outputFileName=%2 <br />set vbr=%3 <br />set width=0 <br />set height=0 <br />set duration=0 <br />set ffmpeg=ffmpeg.exe <br />set sox=sox.exe <br /><br />REM Test input parameters <br />IF %1.==. GOTO Usage <br />IF %2.==. GOTO Usage <br /><br />IF %3.==. GOTO Usage <br />echo %3| findstr /r "^[1-9][0-9]*$"&gt;nul <br />IF ERRORLEVEL 0 GOTO Parameter4 <br />echo Invalid Bitrate <br />goto Usage <br /><br />:Parameter4 <br />IF %4. == ffmpeg. GOTO UpdateFFMPEG4 <br />IF %4. == sox. GOTO UpdateSox4 <br />:Parameter6 <br />IF %6. == ffmpeg. GOTO UpdateFFMPEG6 <br />IF %6. == sox. GOTO UpdateSox6 <br /><br />:Continue <br /><br />if not exist "%ffmpeg%" ( <br />echo Can not find ffmpeg binary: %ffmpeg% <br />goto Usage <br />) <br /><br />if not exist "%sox%" ( <br />echo Can not find Sox binary: %sox% <br />goto Usage <br />) <br /><br />if not exist "%inputFileName%" ( <br />echo Can not find input file: %inputFileName% <br />goto Usage <br />) <br /><br />REM this is the command to print the file information <br />set info=ffprobe -v quiet -show_format -show_streams -of default %inputFileName% <br /><br />REM get the input video width <br />for /f "delims=" %%a in ('%info% ^| findstr "width"') do @set width=%%a <br />set width=%width:~6% <br /><br />REM get the input video height <br />for /f "delims=" %%a in ('%info% ^| findstr "height"') do @set height=%%a <br />set height=%height:~7% <br /><br />REM get the input video duration <br />for /f "delims=" %%a in ('%info% ^| findstr "duration"') do @set duration=%%a <br />set duration=%duration:~9% <br /><br />echo Input Video Dimensions: %width%x%height% <br />echo Input Video Duration : %duration% <br /><br />set audioFileOriginal=temp1.%outputFileName%.wav <br />set audioFileFinal=temp2.%outputFileName%.wav <br />del %outputFileName% &gt; NUL <br />del %audioFileOriginal% &gt; NUL <br />set vid_opts=-vcodec mpeg4 -vb %vbr%k -acodec libmp3lame -filter:v scale=720:480 -vtag DX50 -f avi -ab 128k -g 15 -bf 1 -map 0:0 -map 1:0 <br />set com_opts=-ac 2 -threads 1 -y -r 30 <br /><br />REM - Get audio <br />%ffmpeg% -i %inputFileName% -vn %com_opts% %audioFileOriginal% <br /><br />REM process audio through sox. We want to reduce the <br />REM dynamic range with compand and normalize the volume <br />%sox% %audioFileOriginal% %audioFileFinal% compand 0.3,1 6:-70,-60,-20 -5 -90 0.2 norm <br /><br />REM todo <br />REM Calculate the scale for video encoding <br />REM create a chapter every 10 minutes <br /><br />REM Recombine video and audio <br />%ffmpeg% -i %inputFileName% -i %audioFileFinal% %vid_opts% %com_opts% %outputFileName% <br /><br />Goto CleanExit <br /><br />REM these are "functions <br />:Usage <br />echo <br />echo Usage: inputFileName outputFileName bitrate [ffmpeg location] [sox location] <br />echo [ffmpeg location] ie: ffmpeg "c:\ffmpeg\bin\ffmpeg.exe" <br />echo [sox location] ie: ffmpeg "c:\sox\sox.exe" <br />goto DirtyExit <br /><br />:UpdateFFMPEG4 <br />if %5.==. goto LocationErrorFFMPEG <br />set ffmpeg=%5 <br />goto Parameter6 <br /><br />:UpdateSox4 <br />if %5.==. goto LocationErrorSox <br />set sox=%5 <br />goto Parameter6 <br /><br />:UpdateFFMPEG6 <br />if %7.==. goto LocationErrorFFMPEG <br />set ffmpeg=%7 <br />goto Continue <br /><br />:UpdateSox6 <br />if %7.==. goto LocationErrorSox <br />set sox=%7 <br />goto Continue <br /><br />:LocationErrorFFMPEG <br />echo FFMPEG requires a path. <br />goto Usage <br /><br />:LocationErrorFFMPEG <br />echo Sox requires a path. <br />goto Usage <br /><br />REM Clean up temp files <br />:CleanExit <br />del %audioFileOriginal% &gt; NUL <br />del %audioFileFinal% &gt; NUL <br /><br />:DirtyExit</div> <p> </p> </div> Reinitialize Mysql System Tables on Windows 2016-09-02T03:57:01+00:00 2016-09-02T03:57:01+00:00 https://www.isaacray.com/index.php/hacks/7-reinitialize-mysql-system-tables-on-windows Super User <p style="font-size: 12.16px; line-height: 15.808px;">Sometimes I like to just delete everything in MySQL and start over.  This is easy in Linux when you have the packaged script "mysql_install_db.pl" but we need to do it in Windows too.</p> <p style="font-size: 12.16px; line-height: 15.808px;"><span style="line-height: 1.3em;">After you delete everything in the \data directory, go to the command prompt, from your MySQL \bin directory:</span></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqld --skip-grant-tables</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">Then open a new command prompt in the \bin directory and connect to your instance:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;create database mysql;</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;use mysql;</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;\. ..\share\mysql_system_tables.sql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;\. ..\share\mysql_system_tables_data.sql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;exit</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">Now, shutdown your server daemon:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqladmin shutdown</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">You should be able to restart the daemon:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqld</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">and login as root to begin configuring your permissions:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysql -uroot</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">Sometimes I like to just delete everything in MySQL and start over.  This is easy in Linux when you have the packaged script "mysql_install_db.pl" but we need to do it in Windows too.</p> <p style="font-size: 12.16px; line-height: 15.808px;"><span style="line-height: 1.3em;">After you delete everything in the \data directory, go to the command prompt, from your MySQL \bin directory:</span></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqld --skip-grant-tables</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">Then open a new command prompt in the \bin directory and connect to your instance:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;create database mysql;</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;use mysql;</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;\. ..\share\mysql_system_tables.sql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;\. ..\share\mysql_system_tables_data.sql</strong></p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 60px;"><strong>&gt;exit</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">Now, shutdown your server daemon:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqladmin shutdown</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">You should be able to restart the daemon:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysqld</strong></p> <p style="font-size: 12.16px; line-height: 15.808px;">and login as root to begin configuring your permissions:</p> <p style="font-size: 12.16px; line-height: 15.808px; padding-left: 30px;"><strong>mysql -uroot</strong></p> Netbeans on Linux 2016-09-02T03:56:13+00:00 2016-09-02T03:56:13+00:00 https://www.isaacray.com/index.php/hacks/netbeans-on-linux Super User <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">If Netbeans or Java Studio Creator 2 (JSC) don't have any display elementes after installing in Linux, be sure to make this setting in the /etc/netbeans.conf or /etc/creator.conf file before you go crazy.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">add "-J-Dawt.toolkit=sun.awt.motif.MToolkit" to the netbeans_default_options</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">netbeans_default_options="-J-Xms96m -J-Xmx384m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -J-Xverify:none -J-Dnetbeans.javacore.background_scanning=true -J-Dsunappsrvint.home=/home/isaac/sun/Creator2_1/SunAppServer8 -J-Dawt.toolkit=sun.awt.motif.MToolkit"</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">If Netbeans or Java Studio Creator 2 (JSC) don't have any display elementes after installing in Linux, be sure to make this setting in the /etc/netbeans.conf or /etc/creator.conf file before you go crazy.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">add "-J-Dawt.toolkit=sun.awt.motif.MToolkit" to the netbeans_default_options</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">netbeans_default_options="-J-Xms96m -J-Xmx384m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled -J-Xverify:none -J-Dnetbeans.javacore.background_scanning=true -J-Dsunappsrvint.home=/home/isaac/sun/Creator2_1/SunAppServer8 -J-Dawt.toolkit=sun.awt.motif.MToolkit"</span></p> Spelljammer Cheat 2016-09-02T03:56:00+00:00 2016-09-02T03:56:00+00:00 https://www.isaacray.com/index.php/hacks/spelljammer-cheat Super User <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">After starting a new game, save it, then open the .PTY file in a Hex editor.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Change the x000075 and x000076 offsets to "ff ff" for $16mil</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">After starting a new game, save it, then open the .PTY file in a Hex editor.</span></p> <p class="MsoNormal" style="font-size: 12.16px; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman', serif;">Change the x000075 and x000076 offsets to "ff ff" for $16mil</span></p> <p><span style="font-size: 12pt; font-family: 'Times New Roman', serif;"> </span></p>