Disable Superfetch. Start > Run > services.msc - then right click on Superfetch and stop the service. Double click on Superfetch, and chnage the "Startup type" to "Disabled".
Change what is indexed for search. Go to "Control Panel", and search for "Indexing options". Don't search in Outlook or any other directory, except for the "Start Menu".
In Task Scheduler, disable defrag and "RACTask".
Thursday, September 4, 2014
Friday, August 29, 2014
How to avoid yum from automatically running via PackageKit on Fedora
Run this:
sudo /usr/bin/gpk-prefs
Then choose the "Never" option.
Thursday, August 28, 2014
How to change the screensaver lock timeout in Fedora 20 and Gnome
Run this on the command line (in Terminal):
gsettings set org.gnome.desktop.session idle-delay 3600
Change 3600 to anything else you want. The units are in seconds.
gsettings set org.gnome.desktop.session idle-delay 3600
Change 3600 to anything else you want. The units are in seconds.
Thursday, August 21, 2014
Tuesday, August 19, 2014
How to fix HDMI problem on Dell XPS 14 (2012 or 2013 version)
My HDMI port stopped working on both Fedora 19 and Windows 7 on my Dell XPS 14 laptop, which I purchased in 2013. You may also have this problem with the Dell XPS 12 laptop. Unfortunately, the solution to fix it was replace the motherboard, which Dell was able to do for no charge since my system had 1 week of warranty left. If you don't have a warranty, you might be in an unfortunate situation.
I had been using the HDMI port for almost a year with no problems on both Linux and Windows. When I started using the Display Port with the HDMI port to drive two external monitors, that worked for about a week, and then the HDMI port stopped working. The Dell tech support person on the phone said that they do not recommend that I use both the HDMI and Display Port at the same time on the Dell XPS 14 model, because there is not enough power to drive both (for this particular laptop model).
Here is another guy who had a different Dell model with the same issue, and he also replaced the motherboards: http://www.experts-exchange.com/Hardware/Displays_Monitors/Q_28337978.html
I had been using the HDMI port for almost a year with no problems on both Linux and Windows. When I started using the Display Port with the HDMI port to drive two external monitors, that worked for about a week, and then the HDMI port stopped working. The Dell tech support person on the phone said that they do not recommend that I use both the HDMI and Display Port at the same time on the Dell XPS 14 model, because there is not enough power to drive both (for this particular laptop model).
Here is another guy who had a different Dell model with the same issue, and he also replaced the motherboards: http://www.experts-exchange.com/Hardware/Displays_Monitors/Q_28337978.html
Sunday, August 17, 2014
How to hide keyboard when losing Text Field focus in iOS/iPhone/iPad programming in Objective C when using a UIScrollView
If you are making an iOS/iPhone/iPad app, and you are trying to hide the keyboard when clicking outside the UITextField, you can do this:
1) Make sure that your UITextField has an IBOutlet in the ViewController.h file. If you need to set this up, open the "Assistant editor", click on the storyboard, make sure that the ViewController.h file is in the other window, and Ctrl-drag the UITextField down to the ViewController.h file.
2) Make sure that the Scroll View has a delegate connected to the View Controller. If you need to set this up, click on the Scroll View, open the "Connections inspector", and drag the circle next to the delegate to the View Controller in the "View Controller Scene" menu
3) In your ViewController.m file, add in a function that looks like this:
1) Make sure that your UITextField has an IBOutlet in the ViewController.h file. If you need to set this up, open the "Assistant editor", click on the storyboard, make sure that the ViewController.h file is in the other window, and Ctrl-drag the UITextField down to the ViewController.h file.
2) Make sure that the Scroll View has a delegate connected to the View Controller. If you need to set this up, click on the Scroll View, open the "Connections inspector", and drag the circle next to the delegate to the View Controller in the "View Controller Scene" menu
3) In your ViewController.m file, add in a function that looks like this:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[_myTextField endEditing:YES];
}
4) Instead of _myTextField, use whatever name you used in step 1 above.
Tuesday, August 12, 2014
Download a password protected webpage with Objective C for iOS/iPhone/iPad
1) Go to http://allseeing-i.com/ASIHTTPRequest and download the latest version (the .tar tarball file)
2) In Xcode, in your project, click on the file folder icon, which is the top left button, so that you can see all the .h and .m files in your project.
3) Open the .tar file in Finder, and drag-and-drop the Classes/ASI* files to Xcode, on the left hand side, in the same directory that the rest of your .h and .m files are. NOTE: Don't copy the files manually through the command line (Terminal) nor outside of Xcode.
4) If you are creating an iPhone app, drag-and-drop the External/Reachability/Reachability* files to Xcode, on the left hand side, in that same directory.
5) Go to http://allseeing-i.com/ASIHTTPRequest/Setup-instructions and follow the step 2 directions, which is setting up the Build Phases.
6) If you are using ARC, then you need to disable ARC for the ASI* and Reachability* files. Click on your main project on the left hand side, then choose "Build Phases", and expand the "Compile Sources" section. For all of the ASI* and Reachability.m files, add in the following flag for "Compiler Flags": -fno-objc-arc (Also see http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project)
7) At the top of your .m file where you want to download the webpage, paste the following line:
#import "ASIHTTPRequest.h"
8) In that same .m file, download the file by doing this:
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:nsurl];
[request setUsername:@"enterUsernameHere"];
[request setPassword:@"enterPasswordHere"];
if (!error) {
NSString *response = [request responseString];
NSLog(response);
}
NSString* url = @"http://www.google.com";
NSURL *nsurl = [NSURL URLWithString:url];ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:nsurl];
[request setUsername:@"enterUsernameHere"];
[request setPassword:@"enterPasswordHere"];
[request startSynchronous];
NSError *error = [request error];if (!error) {
NSString *response = [request responseString];
NSLog(response);
}
That's it!
Labels:
apache,
authentication,
httpd,
iOS,
iPad,
iPhone,
Objective C
Monday, August 11, 2014
Solving "Error initializing QueryElevationComponent." with Solr
You may be getting the following error message when trying to start up Solr:
ERROR - 2014-08-11 16:49:49.554; org.apache.solr.core.CoreContainer; Unable to create core: collection1
org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:251)
at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:651)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:851)
... 10 more
ERROR - 2014-08-11 16:49:49.554; org.apache.solr.core.CoreContainer; Unable to create core: collection1
org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:251)
at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:651)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:851)
... 10 more
If you're getting this error, you may have changed your primary index from a string to an int.
To fix this, edit your example/solr/collection1/conf/elevate.xml file, and change it to the following:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- ... -->
<elevate>
<query text="foo bar">
<!--
<doc id="1" />
<doc id="2" />
<doc id="3" />
-->
</query>
<query text="ipod">
<!-- <doc id="MA147LL/A" />
<doc id="IW-02" exclude="true" />
-->
</query>
</elevate>
Specifically, comment out the <doc ... /> tags.
Sunday, August 10, 2014
How to retrieve a Text Field value in iOS/iPad/iPhone programming in Xcode
1) Drag the Text Field onto your storyboard
2) On the top right side of the screen, you'll see a button that looks like a tux with a bow tie. It is labeled "Show the Assistant Editor". Click on that button
3) You should see the storyboard side-by-side to a text window showing code. Make sure that the .h is showing, such as ViewController.h - you can switch the file by clicking on "Automatic".
4) Scroll the text edit window down to the end, right before "@end".
5) Hold down control, and drag the Text Field to the ViewController.h text edit windows, and drop it right before the "@end". Type in any name for the Text Field, such as textEntryField.
6) In the callback function (not necessarily a callback function for the Text Field) in the ViewController.m file, you can retrieve the value of the Text Field through "_textEntryField.text". For example:
2) On the top right side of the screen, you'll see a button that looks like a tux with a bow tie. It is labeled "Show the Assistant Editor". Click on that button
3) You should see the storyboard side-by-side to a text window showing code. Make sure that the .h is showing, such as ViewController.h - you can switch the file by clicking on "Automatic".
4) Scroll the text edit window down to the end, right before "@end".
5) Hold down control, and drag the Text Field to the ViewController.h text edit windows, and drop it right before the "@end". Type in any name for the Text Field, such as textEntryField.
6) In the callback function (not necessarily a callback function for the Text Field) in the ViewController.m file, you can retrieve the value of the Text Field through "_textEntryField.text". For example:
NSString* entryText = _textEntryField.text;
NSLog(@"The text in the Text Field is: %@", entryText);
Create callback to respond to button click in iOS with Xcode
1) Click on the storyboard that has the Button that you want to respond to.
2) Near the top right corner, you'll see a button that looks like a tux with a bow tie, entitled "Show the Assistant Editor". Click on that.
3) Make sure that the .m file is showing (e.g. ViewController.m)
4) Hold down control and drag the button from the storyboard down to the text editor which will create a new function. Type in a name for the function, such as "buttonTapped".
5) Click "Connect".
6) Now, fill in the callback function.
2) Near the top right corner, you'll see a button that looks like a tux with a bow tie, entitled "Show the Assistant Editor". Click on that.
3) Make sure that the .m file is showing (e.g. ViewController.m)
4) Hold down control and drag the button from the storyboard down to the text editor which will create a new function. Type in a name for the function, such as "buttonTapped".
5) Click "Connect".
6) Now, fill in the callback function.
How to access a webpage/URL in Android using Apache .htaccess/.htpasswd password authentication
You can't download a webpage in the main thread. You have to create an asynchronous task. Here's how to do that:
Create a class called RetrieveFeedTask (change the hilighted text):
class RetrieveFeedTask extends AsyncTask<String, Void, Long> {
private Exception exception;
@SuppressLint("NewApi") protected Long doInBackground(String urlParam) {
try
{
DefaultHttpClient client = new DefaultHttpClient();
client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials("username", "password"));
HttpGet request = new HttpGet(urlParam);
HttpResponse response = client.execute(request);
HttpEntity entity = response.getEntity();
InputStream inputStream = entity.getContent();
StringWriter writer = new StringWriter();
String encoding = StandardCharsets.UTF_8.name();
IOUtils.copy(inputStream, writer, encoding);
StringBuffer sb = writer.getBuffer();
String finalstring = sb.toString();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (Exception e)
{
e.printStackTrace();
}
return new Long(0L);
}
@Override
protected Long doInBackground(String... arg0) {
return this.doInBackground(arg0[0]);
}
}
In your activity file, open the url like this:
String url = "http://www.myPasswordProtectedWebServer.com";
new RetrieveFeedTask().execute(url);
In your AndroidManfiest.xml file, be sure to add the following:
<uses-permission android:name="android.permission.INTERNET"/>
Solution derived from http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception
Create a class called RetrieveFeedTask (change the hilighted text):
class RetrieveFeedTask extends AsyncTask<String, Void, Long> {
private Exception exception;
@SuppressLint("NewApi") protected Long doInBackground(String urlParam) {
try
{
DefaultHttpClient client = new DefaultHttpClient();
client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials("username", "password"));
HttpGet request = new HttpGet(urlParam);
HttpResponse response = client.execute(request);
HttpEntity entity = response.getEntity();
InputStream inputStream = entity.getContent();
StringWriter writer = new StringWriter();
String encoding = StandardCharsets.UTF_8.name();
IOUtils.copy(inputStream, writer, encoding);
StringBuffer sb = writer.getBuffer();
String finalstring = sb.toString();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (Exception e)
{
e.printStackTrace();
}
return new Long(0L);
}
@Override
protected Long doInBackground(String... arg0) {
return this.doInBackground(arg0[0]);
}
}
In your activity file, open the url like this:
String url = "http://www.myPasswordProtectedWebServer.com";
new RetrieveFeedTask().execute(url);
In your AndroidManfiest.xml file, be sure to add the following:
<uses-permission android:name="android.permission.INTERNET"/>
Solution derived from http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception
Monday, August 4, 2014
Installing iOS 5.1 simulator on XCode 5.1
After upgrading to XCode 5.1, the iOS 5.1 simulator has been removed. You can restore it by using this procedure:
http://stackoverflow.com/questions/22479215/install-ios-5-simulator-to-xcode-5-1
http://stackoverflow.com/questions/22479215/install-ios-5-simulator-to-xcode-5-1
Sunday, August 3, 2014
How to get the scroll view working in an iOS iPad/iPhone app
It's not straight forward, but it's not too bad to set up. Here's a good tutorial about how to do it, which will only take 9 minutes (plus or minus) of your life:
https://www.youtube.com/watch?v=-lt1o_k9jUw
https://www.youtube.com/watch?v=-lt1o_k9jUw
How to get a Picker working in Xcode for an iOS iPad/iPhone app
If you drag and drop a Picker onto the Storyboard, the picker won't show. You have to connect it up to a data source. Here's how to do that:
http://www.techotopia.com/index.php/An_iOS_7_UIPickerView_Example#The_PickerViewController.h_File
http://www.techotopia.com/index.php/An_iOS_7_UIPickerView_Example#The_PickerViewController.h_File
Friday, July 11, 2014
How to download and install an old version of Google Chrome on Windows 7
1) Uninstall Chrome
2) Go to: http://www.oldversion.com/windows/download/google-chrome-22-0-1229-0
3) Install Chrome 22
4) Once chrome is installed, enter about:plugins in the location bar
5) Search for "Google Update" and click on disable
2) Go to: http://www.oldversion.com/windows/download/google-chrome-22-0-1229-0
3) Install Chrome 22
4) Once chrome is installed, enter about:plugins in the location bar
5) Search for "Google Update" and click on disable
Wednesday, July 9, 2014
Fixing Google Chrome on Windows with EMET
Sometime during the spring and summer of 2014, Google Chrome was conflicting with Windows EMET. Sometimes, Chrome wouldn't display Flash pages, sometimes you'd get the "He's Dead Jim" message, sometimes you'd get the "Woah Google Chrome has crashed" message, and other times, Chrome would start but you'd just get blank white pages, even with the settings page. The Chromium developers fixed it, but as of July 9, 2014, the stable and beta versions of Chrome are still broken. Here's a simple fix: install Google Chrome Canary, which is a more cutting edge version, which is working fine for me.
Thursday, May 29, 2014
How to get public_html in users directories working with Fedora 20 and Apache httpd
This is how to get the public_html directory working in users directories.
Edit the file /etc/httpd/conf.d/userdir.conf
Uncomment the UserDir line, and change it to:
UserDir enabled
Save the file and restart apache
sudo /sbin/service httpd restart
mkdir ~/public_html
chmod 755 ~
chmod 755 ~/public_html
Create a file called ~/public_html/index.html and put something in it.
Edit the file /etc/httpd/conf.d/userdir.conf
Uncomment the UserDir line, and change it to:
UserDir enabled
Save the file and restart apache
sudo /sbin/service httpd restart
mkdir ~/public_html
chmod 755 ~
chmod 755 ~/public_html
Create a file called ~/public_html/index.html and put something in it.
Wednesday, April 30, 2014
How do I turn off the firewall in Fedora?
sudo /sbin/service firewalld stop
sudo /sbin/chkconfig --level 345 firewalld off
sudo /sbin/chkconfig --level 345 firewalld off
What to do if restarting apache httpd fails when trying build an OSM tile server
If you are using Fedora to create an Open Street Map tile server, when you restart apache, you might be getting this error:
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
When running systemctl status httpd.service, if the error looks like this:
Apr 29 23:23:22 hostname.com systemd[1]: Starting The Apache HTTP Server...
Apr 29 23:23:22 hostname.com httpd[6326]: AH00526: Syntax error on line 88 of /etc/httpd/conf/httpd.conf:
Apr 29 23:23:22 hostname.com httpd[6326]: Invalid command 'LoadTileConfigFile', perhaps misspelled or defined by a module not included i...guration
Make the following changes:
- Rename the /etc/httpd/conf.d/mod_tile file to /etc/httpd/conf.d/mod_tile.conf
- Change the contents of that file to the following:
LoadModule tile_module /usr/lib/httpd/modules/mod_tile.so
Thursday, January 30, 2014
Solve Windows 7 hanging upon boot when loading classpnp.sys
If your Windows 7 installation hangs upon boot with the Starting Windows icon, even with safe mode, here's what might fix it. If the booting process stalls a bit on classpnp.sys in safe mode, try rebooting, going into the BIOS, and either resetting the BIOS to the factory default settings, or changing the HDD type to something different. Then reboot either in Safe mode or normal mode, and hopefully you'll get the login screen.
Tuesday, December 24, 2013
How to view the source after a webpage has been loaded with AJAX
- Use Chrome.
- Bring up the developer tools by right clicking anywhere on the page, and selecting "Inspect Element.
- Click on the "Elements" tab
- Right click on the <html...> tag, and select "Copy as HTML"
- Paste the clipboard into your favorite text editor.
Tuesday, December 17, 2013
How to save an encrypted iPhone voice mail as an mp3 on Windows
My daughter left me her voice mail today. She had her mom's phone on the way home, called me, and cried for 72.78 seconds. I had to save this voice mail, so this is how I did it:
- Backup your iphone using iTunes
- Download Backuptrans itunes Backup Extractor: http://www.backuptrans.com/itunes-backup-extractor.html
- This will allow you to retrieve up to 3 voice mails
- To convert the .amr file to .mp3, use http://audio.online-convert.com/convert-to-mp3
Thursday, November 21, 2013
How to get gzip working for Jetty 8 and Solr
If you're getting the following error message in the solr.log file:
java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.GzipFilter
Try doing the following:
Edit /opt/solr/solr-webapp/webapp/WEB-INF/web.xml and put the following in it:
java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.GzipFilter
Try doing the following:
Edit /opt/solr/solr-webapp/webapp/WEB-INF/web.xml and put the following in it:
<web-app ... >
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
<init-param>
<param-name>mimeTypes</param-name>
<param-value>text/html,text/plain,text/xml,application/xhtml+xml,application/xml,text/css,application/javascript,image/svg+xml,application/json,application/xml; charset=UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
If you don't have a jetty-servlets*.jar file, then download it from http://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets and put it in /opt/solr/lib
Restart jetty:
sudo /sbin/service jetty restart
If solr doesn't start up, check the /opt/solr/logs/solr.log file.
Tuesday, November 19, 2013
How do I show PHP errors on a webpage?
In your /etc/php.ini file, add the following:
error_reporting(E_ALL);
ini_set('display_errors', 'on');
error_reporting(E_ALL);
ini_set('display_errors', 'on');
Friday, November 8, 2013
How to require password authentication for Apache Solr 4 and Jetty
Some of the documentation in the Solr wiki is outdated, so here's what worked for me. In the following files, you can change the highlighted fields.
Edit /opt/solr/etc/jetty.xml and add the following:
<Configure>
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
...
</Configure>
Edit /opt/solr/solr-webapp/webapp/WEB-INF/web.xml and add the following:
<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>Solr authenticated application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>core1-role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Test Realm</realm-name>
</login-config>
...
</web-app>
The above is all in one line. No line break. Make sure you put the comma before the "core1-role".
Edit /opt/solr/etc/jetty.xml and add the following:
<Configure>
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
<Set name="refreshInterval">0</Set>
</New>
</Arg>
</Call>
...
</Configure>
Edit /opt/solr/solr-webapp/webapp/WEB-INF/web.xml and add the following:
<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>Solr authenticated application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>core1-role</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Test Realm</realm-name>
</login-config>
</web-app>
Create a file in /opt/solr/etc/realm.properties and put the following in it:
admin: yourPasswordHere,core1-role
You can change "admin" to whatever username you want.
For the password, you can either use the literal password, or use an OBF/MD5/CRYPT hash. To create a hash, you can do the following:
cd /opt/solr
java -cp /lib/jetty-util-8.1.10.v20130312.jar org.eclipse.jetty.util.security.Password admin yourPasswordHere
The above utility will print out the hash to the screen, and you can chose either the OBF, MD5, or CRYPT line. Make sure that you copy the entire line, including the "OBF:..." part. Copy this line to the /opt/solr/etc/realm.properties file; the result will look something like this:
admin: OBF:1x1v1xmk1w9b1pyh1oq31uum1xtv1zej1zer1xtn1uvk1or71pw51w8f1xmq1x0r
,core1-role
The above is all in one line. No line break. Make sure you put the comma before the "core1-role".
After you've changed everything, restart the solr server. If you're using Fedora, do this:
sudo /sbin/service jetty.sh restart
Then open up your web browser to http://localhost:8983/solr/#/collection1/query and the web browser should ask you for a password. Enter admin for the user name and yourPasswordHere for the password.
Hint: if you get an error on the Solr admin webpage, you can check the log for warning messages. The log file is here: /opt/solr/logs/solr.log
More info:
Monday, November 4, 2013
Ruby, yaml, and gem in Fedora Linux
If you're trying to use gem to install something, and you're getting the following error message:
It seems your ruby installation is missing psych (for YAML output)....
You could try to install libyaml like this:
yum install libyaml
If that still doesn't work, it might be because the libyaml library is not new enough. If that's the case, install libyaml from source from here:
http://pyyaml.org/download/libyaml/
Then, uninstall ruby, and then re-install ruby. Hopefully you'll have success after that.
It seems your ruby installation is missing psych (for YAML output)....
You could try to install libyaml like this:
yum install libyaml
If that still doesn't work, it might be because the libyaml library is not new enough. If that's the case, install libyaml from source from here:
http://pyyaml.org/download/libyaml/
Then, uninstall ruby, and then re-install ruby. Hopefully you'll have success after that.
Friday, October 18, 2013
S&P 500 during certain presidencies
I don't pretend to claim a causal relationship, but since we're at an all time high, I felt like looking up the facts:
Clinton: +210.69% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=19930118,20010119;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Bush 43: -38.60% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=20010119,20090120;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Obama: +108.32% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=20090120,20131018;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
To be fair, Reagan and Bush 41: +234.88% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=19810119,19930120;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Clinton: +210.69% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=19930118,20010119;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Bush 43: -38.60% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=20010119,20090120;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Obama: +108.32% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=20090120,20131018;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
To be fair, Reagan and Bush 41: +234.88% http://finance.yahoo.com/echarts?s=%5EGSPC+Interactive#symbol=%5Egspc;range=19810119,19930120;compare=;indicator=volume;charttype=area;crosshair=on;ohlcvalues=0;logscale=off;source=undefined;
Thursday, October 17, 2013
Resolve "Can't right click on message in Outlook 2003" issue
For a long time, I haven't been able to right click on an email in Outlook 2003 (e.g. to flag it). This is how to resolve it:
1) Exit Outlook and other Office apps
2) Go to C:\users\username\AppData\Local\Microsoft\FORMS
3) Delete the FRMCACHE.DAT file
4) Restart Outlook
1) Exit Outlook and other Office apps
2) Go to C:\users\username\AppData\Local\Microsoft\FORMS
3) Delete the FRMCACHE.DAT file
4) Restart Outlook
Wednesday, September 25, 2013
How to Convert MS Access Database to MySQL
MySQL Workbench (versions 5 and 6) contain a Migration Toolkit to convert external databases to MySQL, but Microsoft Access isn't an option. However, it used to be an option in the predecessor tool: MySQL GUI Tools. Fortunately, you can download an archived installer for MySQL GUI Tools here:
http://dev.mysql.com/downloads/gui-tools/5.0.html
With that, if you install MySQL GUI Tools (and install a 32-bit version of the Java JRE 6), if you start the MySQL Migration Toolkit, there is an option to convert from an Microsoft Access database. I chose all of the default settings (except I asked for .sql scripts to be saved), and it converted fine.
http://dev.mysql.com/downloads/gui-tools/5.0.html
With that, if you install MySQL GUI Tools (and install a 32-bit version of the Java JRE 6), if you start the MySQL Migration Toolkit, there is an option to convert from an Microsoft Access database. I chose all of the default settings (except I asked for .sql scripts to be saved), and it converted fine.
Thursday, September 12, 2013
How to change the default OS in grub on Fedora 16, Fedora 17, Fedora 18, and Fedora 19
See https://ask.fedoraproject.org/question/8885/how-can-i-change-default-operating-system-in-start-up-boot-menu/
Essentially, you will want to change the /etc/default/grub file and then perform the following:
grub2-mkconfig -o /boot/grub2/grub.cfg
Essentially, you will want to change the /etc/default/grub file and then perform the following:
grub2-mkconfig -o /boot/grub2/grub.cfg
Tuesday, September 10, 2013
Why can't I click on the confirm box when encrypting a partition in the Fedora 18 or Fedora 19 installer (anaconda)?
If you are having trouble clicking or switching to the "confirm" box when typing in your passcode/password in the Fedora 18 or Fedora 19 installer, here's what you can do:
- Ensure that your passcode is strong enough. Make sure that the red stop sign disappears.
- Press "Tab" on the keyboard to switch to the "confirm" box.
That's it.
Saturday, August 24, 2013
How to log every query in MySQL on Fedora
In /etc/my.cnf, in the [mysqld] section, add the following 2 lines:
Then:
sudo su
touch /var/log/mysql.log
chown mysql:mysql /var/log/mysql.log
general_log=1
general_log_file=/var/log/mysql.log
Then:
sudo su
touch /var/log/mysql.log
chown mysql:mysql /var/log/mysql.log
Restart mysqld:
sudo /sbin/service mysqld restart
Note that the "log" variable in my.cnf is now deprecated, and doesn't log files in Fedora 14.
Friday, August 23, 2013
How to Install MongoDB on Fedora
If you are using the instructions at http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/ they say to create a file called /etc/yum.repos.d/10gen.repo - but if you try that, you may be getting the following error when trying to start the mongod service.
It turns out that mongodb is built into fedora (via yum), so you don't need to add the 10gen.repo file. Here's how to install mongodb on Fedora:
1) Uninstall mongodb:
yum erase mongodb
yum erase mongo-10gen
2) Remove the 10gen.repo file
rm /etc/yum.repos.d/10gen.repo
3) Install mongodb via default yum
yum install mongodb mongodb-server
4) Start monogodb service
/sbin/service mongod start
It turns out that mongodb is built into fedora (via yum), so you don't need to add the 10gen.repo file. Here's how to install mongodb on Fedora:
1) Uninstall mongodb:
yum erase mongodb
yum erase mongo-10gen
2) Remove the 10gen.repo file
rm /etc/yum.repos.d/10gen.repo
3) Install mongodb via default yum
yum install mongodb mongodb-server
4) Start monogodb service
/sbin/service mongod start
Tuesday, August 20, 2013
NoSQL Comparison
Good overview of NoSQL databases: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
Friday, August 16, 2013
Why won't MySQL Workbench let me add a Foreign Key relationship?
You might be unable to check the desired foreign column box in MySQL Workbench.
If you are trying to add the foreign key on the command line, then you may also be getting "a can't create table 150 alter table" and Error Code 1005 error.
Make sure that you have the table and column names correct.
Also make sure that the two columns are EXACTLY the same type. Check for int(10) vs int(11) and int(10) vs int (10) unsigned. They have to be EXACTLY the same type. MySQL Workbench may not show or let you change int(10) to int(10) unsigned, but you can check the exact column type using "show create table", and you can change it on the command line like this:
ALTER TABLE TableName CHANGE columnName columnName int(10) unsigned DEFAULT NULL
After this, you should be able to check the desired box in MySQL Workbench.
Also, make sure that both tables are using InnoDB
Also see: http://stackoverflow.com/questions/9018584/error-code-1005-cant-create-table-errno-150
If you are trying to add the foreign key on the command line, then you may also be getting "a can't create table 150 alter table" and Error Code 1005 error.
Make sure that you have the table and column names correct.
Also make sure that the two columns are EXACTLY the same type. Check for int(10) vs int(11) and int(10) vs int (10) unsigned. They have to be EXACTLY the same type. MySQL Workbench may not show or let you change int(10) to int(10) unsigned, but you can check the exact column type using "show create table", and you can change it on the command line like this:
ALTER TABLE TableName CHANGE columnName columnName int(10) unsigned DEFAULT NULL
After this, you should be able to check the desired box in MySQL Workbench.
Also, make sure that both tables are using InnoDB
Also see: http://stackoverflow.com/questions/9018584/error-code-1005-cant-create-table-errno-150
Monday, August 12, 2013
How to recover found.000 folder that is locked
On Windows 7, if chkdsk recovers a found.000 folder, and you can't access it, and if changing ownership to you doesn't work, try this simple trick:
Copy the folder to another area.
Then try to access the copy of that folder.
For some reason, it works for me.
Copy the folder to another area.
Then try to access the copy of that folder.
For some reason, it works for me.
Friday, July 26, 2013
How to disable Java Updater Tray Icon in Windows
If you ask Java to disable the tray icon, sometimes it won't respect your wishes. The issue is that the Administrator needs to disable it. This what you do:
1) Start the command prompt as the Administrator
2) cd \Program Files\Java\jre6\bin
3) javacpl
4) Go to the Advanced Tab
5) Expand Miscellaneous
6) Uncheck the Place Java icon in system tracy
7) Right click the Java icon, and click on Cancel
8) Under Advanced | JRE Auto-Download, switch it to Never Auto-Download
1) Start the command prompt as the Administrator
2) cd \Program Files\Java\jre6\bin
3) javacpl
4) Go to the Advanced Tab
5) Expand Miscellaneous
6) Uncheck the Place Java icon in system tracy
7) Right click the Java icon, and click on Cancel
8) Under Advanced | JRE Auto-Download, switch it to Never Auto-Download
Thursday, July 4, 2013
Why does Windows 7 reboot itself every 2 minutes?
I ran into this issue: I had installed the 320.49-desktop-win8-win7-winvista-64bit-english-whql.exe NVidia GeForce driver. This forced me to install some type of .NET 4 (extra?) runtime environment. The next time I booted my computer, Windows 7 would automatically reboot itself after about 2-3 minutes. If I were in safe mode, it didn't reboot. This is how I solved it:
You can also try reading the logs in the Event Viewer for some hints.
Similar symptom, different solution: http://social.technet.microsoft.com/Forums/windows/en-US/d7379f4d-9337-4800-9c8b-582fd0c439a7/windows-7-pro-keep-restarting-on-itself-will-not-last-longer-than-2-minutes-but-safemode-works
Ditto: http://www.tomshardware.com/answers/id-1672386/computer-rebooting-pretty-stumped.html
- Booted Windows 7 in safe mode (press F8 when booting)
- Installed an old NVidia driver, such as 314.07-desktop-win8-win7-winvista-64bit-english-whql.exe
- Reboot Windows in normal mode
- Now you have to be real quick before your machine reboots: uninstall the .NET 4 runtime environment that had just been installed. The uninstaller will ask you to reboot your machine. Reboot it into normal mode.
- If all goes well, your system will be back to normal!
You can also try reading the logs in the Event Viewer for some hints.
Similar symptom, different solution: http://social.technet.microsoft.com/Forums/windows/en-US/d7379f4d-9337-4800-9c8b-582fd0c439a7/windows-7-pro-keep-restarting-on-itself-will-not-last-longer-than-2-minutes-but-safemode-works
Ditto: http://www.tomshardware.com/answers/id-1672386/computer-rebooting-pretty-stumped.html
Wednesday, July 3, 2013
How to get viewvc working with Apache httpd and Fedora and subversion (svn)
- Get subversion working with httpd first. (See http://muddyazian.blogspot.com/2013/05/how-to-start-subversion-repository-over.html)
- yum install viewvc viewvc-httpd
- Edit /etc/viewvc/viewvc.conf and modify the svn_roots and root_parents options.
- Edit /etc/httpd/conf/httpd.conf and add in the following:
<Directory /usr/lib/python2.7/site-packages/viewvc/bin/mod_python>
Order allow,deny
Allow from all
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Directory>
<Directory /usr/share/viewvc/templates/docroot>
Order allow,deny
Allow from all
</Directory>
Alias /viewvc-static "/usr/share/viewvc/templates/docroot/images"
...
ScriptAlias /viewvc /usr/lib/python2.7/site-packages/viewvc/bin/cgi/viewvc.cgi
ScriptAlias /query /usr/lib/python2.7/site-packages/viewvc/bin/cgi/query.cgi
- Restart the web server: /sbin/service httpd restart
- Go to http://localhost/viewvc
- If you haven't already done so, create the /etc/svn-auth-users file:
htpasswd -cm /etc/svn-auth-users firstUsername
New password:
Re-type new password:
Adding password for user firstUsername
/usr/lib/python2.7/site-packages/viewvc/bin/standalone.py -r /path/to/svn/repository/location
Then in firefox, go to http://localhost:49152/viewvc
Wednesday, May 29, 2013
Change Font Size of Tabs in Eclipse Juno on Fedora
Edit ECLIPSE_HOME/plugins/org.eclipse.platform_4.2.2.v201302041200/css/e4_default_gtk.css
Change the following
.MPartStack {
font-size: 6;
Change the following
.MPartStack {
font-size: 6;
How to set up a email mailer post commit script with subversion on Fedora.
From http://stackoverflow.com/questions/501692/easiest-best-way-to-set-up-svn-commit-emails, the easiest way is to use the existing .py mailer script.
_____________
On Fedora 15, do the following:
yum install subversion-python
_____________
In your subversion repository:
cd hooks
cp post-commit post-commit.tmpl
Change
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
to
/usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV" /etc/mailer.conf
_____________
After that, do the following to setup the mailer.conf file:
cp /usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/tests/mailer.conf /etc/mailer.conf
Edit the mailer.conf and:
uncomment mail_command = /usr/sbin/sendmail
_____________
On Fedora 15, do the following:
yum install subversion-python
_____________
In your subversion repository:
cd hooks
cp post-commit post-commit.tmpl
Change
mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
to
/usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV" /etc/mailer.conf
After that, do the following to setup the mailer.conf file:
cp /usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/tests/mailer.conf /etc/mailer.conf
Edit the mailer.conf and:
uncomment mail_command = /usr/sbin/sendmail
add in commit_subject_prefix
add in propchange_subject_prefix
add in lock_subject_prefix
add in unlock_subject_prefix
Add in from_addr
Add in to_addr
_____________
Test it out by committing a test revision.
Test it out by committing a test revision.
Tuesday, May 21, 2013
Using Unity over proxy with Windows 7
1) Go to Control Panel\All Control Panel Items\System and Go to "Advanced system settings".
2) Under the Advanced Tab, go to Environment Variables, and add two variables: HTTP_proxy and HTTPS_proxy. Set it to your proxy, such as http://myproxy.domain.com:80 and restart Unity.
3) If you get certificate errors, you can manually activate, using the steps found here: http://answers.unity3d.com/questions/358967/peer-certificate-cannot-be-authenticated-with-know.html
Also from http://blog.gfx47.com/2011/03/08/unity3d-httphttps-proxy-problem-solved-o/
2) Under the Advanced Tab, go to Environment Variables, and add two variables: HTTP_proxy and HTTPS_proxy. Set it to your proxy, such as http://myproxy.domain.com:80 and restart Unity.
3) If you get certificate errors, you can manually activate, using the steps found here: http://answers.unity3d.com/questions/358967/peer-certificate-cannot-be-authenticated-with-know.html
Also from http://blog.gfx47.com/2011/03/08/unity3d-httphttps-proxy-problem-solved-o/
Thursday, May 16, 2013
How to start a subversion repository over http using apache on Fedora or RHEL Linux
This is a great tutorial about how to do it really easily:
http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/
http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/
Monday, May 13, 2013
Tuesday, April 9, 2013
Create a tracking branch off of a remote branch in git
git branch --track branchName origin/branchName
git checkout branchName
git checkout branchName
Wednesday, March 27, 2013
Resolve "Agent admitted failure to sign using the key."
You might be getting the following error message, perhaps when either using ssh or git:
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Solve this by this simple fix:
ssh-add
What may have happened, is that you changed your ssh key, and something got confused.
Thursday, February 14, 2013
How to format JSON on the command line
Also known as pretty print.
echo myFile.json | python -mjson.tool
echo myFile.json | python -mjson.tool
Tuesday, February 12, 2013
Why do I get SplFileInfo::getMTime()... errors in symfony2?
The error, in the browser, might look like this:
SplFileInfo::getMTime() [<a href='splfileinfo.getmtime'>splfileinfo.getmtime</a>]: stat failed for /var/www/html/Symfony/src/Srb/AnthonyBundle/Controller/.#DefaultController.php
If you are using emacs, make sure you save off all files. If you don't, you might have a # file around, and symfony gets confused.
Install symfony2 and doctrine using composer
1A) Download composer, which will download the composer.phar file which can be kept anywhere:
cd /path/to/composer/install/dir
curl -s https://getcomposer.org/installer | php
1B) Install symfony:
cd /path/to/composer/install/dir
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.1.x-dev
2) Check the configuration
Go to http://localhost/Symfony/web/config.php
3) Configure the database
Edit the /path/to/webroot/Symfony/app/config/parameters.yml file
4A) If you already have the database table created, make sure that the primary key is named id.
4B) If you already have the database table created, you can skip to creating an entity class:
php app/console doctrine:generate:entity --entity "MySpecificBundle:Things" --fields="id:int(11) price:float"
5) Edit the src/.../Controller/DefaultController.php file to do something interesting with the database table.
For example:
$row = $this->getDoctrine()
->getRepository('MySpecificBundle:Things')
->find($name);
if (!$row)
{
throw $this->createNotFoundException('No row found for id: '.$name);
}
$otherVariable = $row->getOtherVariable();
return array('name' => $otherVaraible);
6) Open your browser to http://localhost/Symfony/web/app_dev.php/hello/1 to view the row
7) To create a CRUD scaffold, perform the following command:
php app/console doctrine:generate:crud --entity="MySpecificBundle:Things"
Then open your browser to http://localhost/Symfony/web/app_dev.php/things
cd /path/to/composer/install/dir
curl -s https://getcomposer.org/installer | php
1B) Install symfony:
cd /path/to/composer/install/dir
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.1.x-dev
2) Check the configuration
Go to http://localhost/Symfony/web/config.php
3) Configure the database
Edit the /path/to/webroot/Symfony/app/config/parameters.yml file
4A) If you already have the database table created, make sure that the primary key is named id.
4B) If you already have the database table created, you can skip to creating an entity class:
php app/console doctrine:generate:entity --entity "MySpecificBundle:Things" --fields="id:int(11) price:float"
5) Edit the src/.../Controller/DefaultController.php file to do something interesting with the database table.
For example:
$row = $this->getDoctrine()
->getRepository('MySpecificBundle:Things')
->find($name);
if (!$row)
{
throw $this->createNotFoundException('No row found for id: '.$name);
}
$otherVariable = $row->getOtherVariable();
return array('name' => $otherVaraible);
6) Open your browser to http://localhost/Symfony/web/app_dev.php/hello/1 to view the row
7) To create a CRUD scaffold, perform the following command:
php app/console doctrine:generate:crud --entity="MySpecificBundle:Things"
Then open your browser to http://localhost/Symfony/web/app_dev.php/things
Labels:
application framework,
composer,
doctrine,
symfony,
web
Friday, February 8, 2013
Install Symfony2 and propel using composer
1A) Download composer, which will download the composer.phar file which can be kept anywhere:
cd /path/to/composer/install/dir
curl -s https://getcomposer.org/installer | php
1B) Install symfony:
cd /path/to/composer/install/dir
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.1.x-dev
_____________________
2) To optionally install propel:
2A) Configure composer.json file
cd /path/to/webroot/Symfony
Open /path/to/webroot/Symfony/composer.json in a text editor
Add in the following line:
"require": {
... ,
"propel/propel-bundle": "1.1.*"
},
2B) Download and install propel:
cd /path/to/webroot/Symfony
php /path/to/composer/install/dir/composer.phar update
After this step, you'll need to manually register the bundle in the AppKernel.php file. See the following page for how to do that: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration (Search for "The second step is to register this bundle in the
After that, you'll need to "configure the bundle": http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration Note: I had to comment out or delete the doctrine: block, otherwise symfony would get confused and thought I was using doctrine.
cd /path/to/composer/install/dir
curl -s https://getcomposer.org/installer | php
1B) Install symfony:
cd /path/to/composer/install/dir
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.1.x-dev
_____________________
2) To optionally install propel:
2A) Configure composer.json file
cd /path/to/webroot/Symfony
Open /path/to/webroot/Symfony/composer.json in a text editor
Add in the following line:
"require": {
... ,
"propel/propel-bundle": "1.1.*"
},
2B) Download and install propel:
cd /path/to/webroot/Symfony
php /path/to/composer/install/dir/composer.phar update
After this step, you'll need to manually register the bundle in the AppKernel.php file. See the following page for how to do that: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration (Search for "The second step is to register this bundle in the
AppKernel
class:") (Note that I had to add the first configuration on that page, even though I was using Composer")After that, you'll need to "configure the bundle": http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration Note: I had to comment out or delete the doctrine: block, otherwise symfony would get confused and thought I was using doctrine.
Labels:
composer,
propel,
symfony,
web application development
Wednesday, February 6, 2013
How to get HP Color LaserJet 2605dn to print color
I've had a problem getting my HP Color LaserJet 2605dn printer to print color on my Windows 7 64-bit machine, but it's working now. I had to use the Universal Print Driver (UPD), and in the Control Panel (Control Panel\All Control Panel Items\Devices and Printers), right click on the printer, go to Printer Properties > Device Settings > Device Type (way at the bottom), and change "Auto Detect" to "Color". You should now be able to print color.
Friday, November 16, 2012
How to Workaround Mac OS X Lion VNC Password Issue
You may be having trouble typing your username or password when VNC'ing to your Mac OS X Lion machine from a Windows machine. Try the following:
1) Type the password really slowly, around 1 character per second
2) If that doesn't work, you may have a process taking a lot of CPU cycles. If that's the case, ssh into your Mac OS X Lion machine, run "top", and see what process is taking a lot of CPU cycles. Kill the process. Then try to VNC in.
1) Type the password really slowly, around 1 character per second
2) If that doesn't work, you may have a process taking a lot of CPU cycles. If that's the case, ssh into your Mac OS X Lion machine, run "top", and see what process is taking a lot of CPU cycles. Kill the process. Then try to VNC in.
Monitor Network Traffic on iOS Simulator
1) Install WireShark: http://www.wireshark.org/download.html
2) Add Wireshark bin directory to your path. If you are using tcsh, edit your ~/.cshrc file and add in the following:
set path=(/Applications/Wireshark.app/Contents/Resources/bin $path)
2) Add Wireshark bin directory to your path. If you are using tcsh, edit your ~/.cshrc file and add in the following:
set path=(/Applications/Wireshark.app/Contents/Resources/bin $path)
3) In Terminal, run the following:
tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
4) Run the iOS Simulator, and browse to something. You'll see the HTTP connections made in Terminal.
Sunday, October 21, 2012
Global Viz of Google+ Users
I don't use Google+, but this is an interesting way to vizualize global data:
http://www.virante.org/blog/2012/08/29/google-plus-user-map-visualization/
http://www.virante.org/blog/2012/08/29/google-plus-user-map-visualization/
Tuesday, September 25, 2012
Getting Windows 7 NFS Client to Connect to a Fedora Linux NFS Server
1) On linux:
sudo /sbin/chkconfig --level 345 nfs-server on
sudo /sbin/service nfs-server start
system-config-nfs
When the GUI pops up, add in your directory that you'd like to share, and the IP addresses (e.g. your Windows 7 IP address) you'd like to share your directory with.
2) Still on linux, edit the /etc/exports file, and change the following line:
(rw,sync)
to
(rw,sync,all_squash,anonuid=12345,anongid=23456)
where 12345 is your linux uid and 23456 is your linux gid.
That will make files written to your nfs server from anonymous client be owned by the specified uid and gid.
3) On linux, perform a
/sbin/service nfs-server restart
You can also perform the following, to confirm the directories shared:
sudo /usr/sbin/exportfs
4) On Windows 7, go to Control Panel > Programs and Features > Turn Windows features on or off
Check all three checkboxes under Services for NFS. Optionally turn on Telnet Client if you'd like to test out your NFS connection over port 111 (telnet linuxServerHostname 111)
5) Windows-R (run) > \\linuxServerHostname\path\to\nfs\mountname
If all goes well, that will just magically work.
6) (Optional) To mount the nfs server to a Windows drive, you can perform the following on the command line:
mount \\linuxServerHostname\path\to\nfs\mountname z:
And to unmount, either:
umount -a
or
umount z:
Easy. Well... at least, not too bad.
sudo /sbin/chkconfig --level 345 nfs-server on
sudo /sbin/service nfs-server start
system-config-nfs
When the GUI pops up, add in your directory that you'd like to share, and the IP addresses (e.g. your Windows 7 IP address) you'd like to share your directory with.
2) Still on linux, edit the /etc/exports file, and change the following line:
(rw,sync)
to
(rw,sync,all_squash,anonuid=12345,anongid=23456)
where 12345 is your linux uid and 23456 is your linux gid.
That will make files written to your nfs server from anonymous client be owned by the specified uid and gid.
3) On linux, perform a
/sbin/service nfs-server restart
You can also perform the following, to confirm the directories shared:
sudo /usr/sbin/exportfs
4) On Windows 7, go to Control Panel > Programs and Features > Turn Windows features on or off
Check all three checkboxes under Services for NFS. Optionally turn on Telnet Client if you'd like to test out your NFS connection over port 111 (telnet linuxServerHostname 111)
5) Windows-R (run) > \\linuxServerHostname\path\to\nfs\mountname
If all goes well, that will just magically work.
6) (Optional) To mount the nfs server to a Windows drive, you can perform the following on the command line:
mount \\linuxServerHostname\path\to\nfs\mountname z:
And to unmount, either:
umount -a
or
umount z:
Easy. Well... at least, not too bad.
Labels:
fedora,
linux,
networking,
nfs,
tech support,
Windows 7
Friday, September 14, 2012
cannot find ... NXConstantString
Why do I get the following error (on Linux using GNUstep), when trying to compile an Objective C program?
... error: cannot find interface declaration for ‘NXConstantString’ ..
Answer:
Use the following flag when compiling everything (.o's, main, etc):
-fconstant-string-class=NSConstantString
... error: cannot find interface declaration for ‘NXConstantString’ ..
Answer:
Use the following flag when compiling everything (.o's, main, etc):
-fconstant-string-class=NSConstantString
Friday, September 7, 2012
New Window Manager Day
I
always get excited when I start using a new toothbrush or bar of soap,
and I call that day new toothbrush or new soap day. Well, today is new
window manager day. I've made the switch from gnome to xfce and I'm
really loving it. I'm copying what he did: http://digitizor.com/2011/08/ 04/ linus-torvalds-ditches-gnome-fo r-xfce/ (I also switched from KDE to Gnome at one point when KDE 4 came along)
Things that I've had to customize so far:
http://lgallardo.com/en/2009/09/02/bloquear-pantalla-en-xfce4/
Changed clock format to: %l:%M %p%n%A%n%x
Mapped the windows button to /usr/bin/xfce4-popup-applicationsmenu
Mapped Alt-v to Maximze veritcally
Mapped windows-l to /usr/bin/screensaver-command -lock
Friday, August 24, 2012
How to activate MATLAB 2008 or older on Fedora 15 or newer
The issue is that you have to have an eth0 although Fedora 15+ likes to tie it to something else. Take a look at:
http://www.mathworks.com/support/solutions/en/data/1-EUTG50/?solution=1-EUTG50
I had to change a lot of different things, and reboot in order to things to go into affect. The last thing I tried (which worked) was "Update the name in the /etc/sysconfig/network-scripts/ifcfg-* file"
http://www.mathworks.com/support/solutions/en/data/1-EUTG50/?solution=1-EUTG50
I had to change a lot of different things, and reboot in order to things to go into affect. The last thing I tried (which worked) was "Update the name in the /etc/sysconfig/network-scripts/ifcfg-* file"
Saturday, July 28, 2012
wuaueng.dllDllInstall+0x1a777 in Process Explorer
If you are running Windows XP, and your system is real slow due to services.exe, and you've used Process Explorer to see that the offending library is wuaueng.dll!DllInstall+0x1a777 - you can fix your system by installing the Microsoft FixIt here:
http://support.microsoft.com/kb/927891
http://support.microsoft.com/kb/927891
Wednesday, June 27, 2012
How to Customize "Send To" Menu Items in Windows 7
Press Windows-R
Type in: %APPDATA%\Microsoft\Windows\SendTo
Copy shortcuts of executables to this directory. For example, copy a shortcut of C:\Program Files (x86)\microsoft office\OFFICE11\WINWORD.EXE to this directory.
Type in: %APPDATA%\Microsoft\Windows\SendTo
Copy shortcuts of executables to this directory. For example, copy a shortcut of C:\Program Files (x86)\microsoft office\OFFICE11\WINWORD.EXE to this directory.
Tuesday, June 12, 2012
Change Title Bar Color in Gnome in Fedora 16
I find it annoying that the active window's title bar is colored gray, just like inactive windows. I never know for sure which window is active when I start typing on the keyboard. In gnome, you can change the active window's title bar's color like this:
yum install gnome-tweak-tool
gnome-tweak-tool
Theme >Window theme > Clearlooks Classic
Yes!
yum install gnome-tweak-tool
gnome-tweak-tool
Theme >Window theme > Clearlooks Classic
Yes!
Monday, June 11, 2012
How do I get bash to autocomplete the first time?
It seems like the default bash behavior is to not show anything if you press tab and there is more than one possibility for tab auto-completion. It's really annoying. You can force bash to show all the matching file by editing /etc/inputrc and adding in the following line:
set show-all-if-ambiguous on
set show-all-if-ambiguous on
Thursday, May 17, 2012
In Wt, how can I get a tooltip working for the whole text in a WCheckBox?
Create a WContainerWidget wrapper around the WCheckBox, and then assign the tooltip to that WContainerWidget wrapper. For some reason, if you assign the tooltip directly to the WCheckBox, only hovering the mouse over the square box will trigger the popup tooltip. Assigning the tooltip to the WContainerWidget wrapper will add a tooltip over the WCheckBox text.
Thursday, April 26, 2012
Wednesday, April 25, 2012
Fix "local unversioned, incoming add upon update" in subversion
After doing an svn update, if you run svn status and get a " > local unversioned, incoming add upon update" error, perform the following:
svn resolve --accept working <conflicting_dir>
svn revert <conflicting_dir>
svn status
Thanks, http://tomhennigan.blogspot.com/2012/01/resolve-tree-conflict-svn-local.html#!/2012/01/resolve-tree-conflict-svn-local.html
svn resolve --accept working <conflicting_dir>
svn revert <conflicting_dir>
svn status
Thanks, http://tomhennigan.blogspot.com/2012/01/resolve-tree-conflict-svn-local.html#!/2012/01/resolve-tree-conflict-svn-local.html
Wednesday, April 18, 2012
How to have a single quote (') in an alias in tcsh
Use the following four characters: '\''
Thanks http://hintsforums.macworld.com/archive/index.php/t-15829.html
Thanks http://hintsforums.macworld.com/archive/index.php/t-15829.html
Thursday, April 12, 2012
rsync with ssh and non-default identify file
rsync -rtzvL --progress -e "ssh -i /home/user/.ssh/alt/id_dsa" /path/to/local/dir username@remotemachine.host.com:/path/to/remote/dir
Tuesday, April 10, 2012
Profile slow mysql queries
Edit /etc/my.cnf
Add the following to [mysqld] section:
log-slow-queries
long_query_time = 1
sudo /sbin/service mysqld restart
Generate load.
There will be a slow query log in the mysql data dir. The mysql data dir can be found by performing the following query:
show variables like 'datadir';
Thanks, http://hackmysql.com/nontech
Add the following to [mysqld] section:
log-slow-queries
long_query_time = 1
sudo /sbin/service mysqld restart
Generate load.
There will be a slow query log in the mysql data dir. The mysql data dir can be found by performing the following query:
show variables like 'datadir';
Thanks, http://hackmysql.com/nontech
Log every query in mysql
Edit /etc/my.cnf
Add in the following line to the [mysqld] section:
log=/var/log/mysql_query.log
touch /var/log/mysql_query.log
chmod 644 /var/log/mysql_query.log
chown mysql:mysql /var/log/mysql_query.log
sudo /sbin/service mysqld restart
Add in the following line to the [mysqld] section:
log=/var/log/mysql_query.log
touch /var/log/mysql_query.log
chmod 644 /var/log/mysql_query.log
chown mysql:mysql /var/log/mysql_query.log
sudo /sbin/service mysqld restart
Friday, April 6, 2012
Getting a Qt app working with boost using cmake
The problem:
You're using cmake to compile a Qt app which also uses boost, and you get an compilation error message like this:
error: expected ‘:’ before ‘slots’
What might be going on:
Your CMakeLists.txt file might have something like this in it:
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
The previous line is there to allow your Qt app to cooperate with boost signals and slots. However, if you need to use Qt signals and slots, there is a workaround.
What you should do:
For Qt, use the following keywords instead:
Q_EMIT
Q_SIGNALS
Q_SLOTS
Easy enough!
Thanks, http://stackoverflow.com/questions/6399005/qt-xapian-library
You're using cmake to compile a Qt app which also uses boost, and you get an compilation error message like this:
error: expected ‘:’ before ‘slots’
What might be going on:
Your CMakeLists.txt file might have something like this in it:
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
The previous line is there to allow your Qt app to cooperate with boost signals and slots. However, if you need to use Qt signals and slots, there is a workaround.
What you should do:
For Qt, use the following keywords instead:
Q_EMIT
Q_SIGNALS
Q_SLOTS
Easy enough!
Thanks, http://stackoverflow.com/questions/6399005/qt-xapian-library
Thursday, April 5, 2012
Determine what yum installed
How to determine what yum installed on Fedora linux:
rpm -qi --filesbypkg package-name
For example
rpm -qi --filesbypkg qt-examples
Thanks http://stackoverflow.com/questions/8068516/how-do-i-find-out-w-yum-or-rpm-what-files-it-installed!
rpm -qi --filesbypkg package-name
For example
rpm -qi --filesbypkg qt-examples
Thanks http://stackoverflow.com/questions/8068516/how-do-i-find-out-w-yum-or-rpm-what-files-it-installed!
Wednesday, April 4, 2012
Compile Subversion with HTTPS support in Fedora Linux
Update: subversion has changed. See this post for updated instructions: http://muddyazian.blogspot.com/2014/10/compile-subversion-for-fedora-19.html
Get your source at http://subversion.apache.org/download/
sudo yum install neon neon-devel apr-devel apr apr-util apr-util-devel
./configure --with-ssl
make -j8
sudo make install
Get your source at http://subversion.apache.org/download/
sudo yum install neon neon-devel apr-devel apr apr-util apr-util-devel
./configure --with-ssl
make -j8
sudo make install
Tuesday, April 3, 2012
Profiling PHP Code
Time Profiling PHP Code: this is how to get your PHP code profiled with xdebug, Fedora and httpd. Concepts might stretch to other platforms.
1) Install xdebug
sudo yum install php-pecl-xdebug
2) Under /etc/php.ini Options, add in the following line:
zend_extension = /usr/lib64/php/modules/xdebug.so
3) In /etc/httpd/conf/httpd.conf, change the following:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
to this
<Directory />
Options FollowSymLinks
# AllowOverride None
AllowOverride All
</Directory>
4) Also put in the AllowOverride All command in the following place:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All
5) Perform the following permissions change:
sudo chmod -R 777 /var/lib/php/session
6) In the PHP code directory that you want to profile, create a .htaccess file and add in the following:
php_value xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /tmp
7) Restart httpd
sudo /sbin/service/httpd restart
8) You'll need kcachegrind to visualize the profiling output. Download and compile it.
8a) Get the source from here: http://kcachegrind.sourceforge.net/html/Download.html
8b) tar -zxvf kcachegrind-0.7.1.tgz
8c) sudo yum install kdebase-devel
8d) cd kcachegrind-0.7.1
8e) mkdir build
8f) cd build
8g) ccmake ..
8h) All the defaults are fine, but you can change the CMAKE_BUILD_TYPE to Debug
8i) make -j12
8j) sudo make install
9) Now, run your PHP script. The results are either in /tmp or /tmp/systemd-private-*/tmp and you can visualize them with the /usr/local/bin/kcachegrind cachegrind.out.1234.
If you run into problems, you might find hints in/var/log/httpd/error_log. Or, you can try to run your php script on the command line, e.g.:
$ php index.php
1) Install xdebug
sudo yum install php-pecl-xdebug
2) Under /etc/php.ini Options, add in the following line:
zend_extension = /usr/lib64/php/modules/xdebug.so
3) In /etc/httpd/conf/httpd.conf, change the following:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
to this
<Directory />
Options FollowSymLinks
# AllowOverride None
AllowOverride All
</Directory>
4) Also put in the AllowOverride All command in the following place:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
AllowOverride All
5) Perform the following permissions change:
sudo chmod -R 777 /var/lib/php/session
6) In the PHP code directory that you want to profile, create a .htaccess file and add in the following:
php_value xdebug.profiler_enable 1
php_value xdebug.profiler_output_dir /tmp
7) Restart httpd
sudo /sbin/service/httpd restart
8) You'll need kcachegrind to visualize the profiling output. Download and compile it.
8a) Get the source from here: http://kcachegrind.sourceforge.net/html/Download.html
8b) tar -zxvf kcachegrind-0.7.1.tgz
8c) sudo yum install kdebase-devel
8d) cd kcachegrind-0.7.1
8e) mkdir build
8f) cd build
8g) ccmake ..
8h) All the defaults are fine, but you can change the CMAKE_BUILD_TYPE to Debug
8i) make -j12
8j) sudo make install
9) Now, run your PHP script. The results are either in /tmp or /tmp/systemd-private-*/tmp and you can visualize them with the /usr/local/bin/kcachegrind cachegrind.out.1234.
If you run into problems, you might find hints in/var/log/httpd/error_log. Or, you can try to run your php script on the command line, e.g.:
$ php index.php
Wednesday, March 21, 2012
Maximize Window Vertically in Gnome
You can assign it to Alt-v. Go to Applications > System Tools > System Settings > Keyboard > Shortcuts > Windows > Maximize window vertically, and assign it to Alt-v
Thursday, February 23, 2012
Old Skool Gnome
Have a new Linux install, and hate the new Gnome? Try this.
http://www.dedoimedo.com/computers/gnome-3-fallback.html
http://www.dedoimedo.com/computers/gnome-3-fallback.html
Thursday, January 12, 2012
How do I get back the window frame in the Windows 7 Task Manager?
If you're missing the windows frame in Windows for the Task Manager, you can get it back by double clicking the very top part of the window. This will "restore" (vs. maximum or minimize) the window size.
Wednesday, August 24, 2011
Really not grouping tasks in Windows 7
Yes! Exactly what I need: http://rammichael.com/7-taskbar-tweaker
Description of the problem: http://www.sevenforums.com/customization/44184-taskbar-buttons-auto-order.html
Description of the problem: http://www.sevenforums.com/customization/44184-taskbar-buttons-auto-order.html
Wednesday, April 20, 2011
How to Compile VLC under Fedora 14 64-bit
You want to watch a video clip. In Fedora 14 64-bit. This is how you do that.
sudo yum install lua-devel fribidi-devel
Obtain the source tarballs for:
When configuring a52dec, use the following configure command:
Before configuring libmad, edit the configure script, and around line 19100, there is a line that says:
Remove that line before configuring. Thanks http://www.linuxquestions.org/questions/linux-software-2/getting-make-***-%5Ball%5D-error-2-during-make-command-for-libmad-0-15-1b-743580
sudo yum install lua-devel fribidi-devel
Obtain the source tarballs for:
- vlc
- libmad
- ffmpeg, and
- a52dec
./configure --enable-postproc --enable-gpl \
--enable-shared --disable-static
When configuring a52dec, use the following configure command:
env CFLAGS="-fPIC" CPPFLAGS="-fPIC" ./configure \
--enable-shared=yes --enable-static=no
Before configuring libmad, edit the configure script, and around line 19100, there is a line that says:
optimize=$optimize -fforce-mem
Remove that line before configuring. Thanks http://www.linuxquestions.org/questions/linux-software-2/getting-make-***-%5Ball%5D-error-2-during-make-command-for-libmad-0-15-1b-743580
fixmbr on Windows XP
My Windows XP computer broke this week when I was installing Turbo Tax 2010. It got stuck upon booting after the screen said “Verifying DMI Pool Data…”. After googling around for answers, I tried to reset the CMOS, upgrade the motherboard BIOS, but nothing worked.
The last thing I tried (by default, because I stopped trying once the problem was solved) was fixing the Master Boot Record or MBR. The Windows XP Recovery Console can fix this for you, when can be loaded by booting to a Windows XP installation CD. There is a built-in utility called fixmbr which will fix your MBR for you. See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_fixmbr.mspx for more information. Remember to enter “1″ when the Recovery Console asks you “When Windows installation would you like to log into”. You’ll also need to know the Administrator password.
The last thing I tried (by default, because I stopped trying once the problem was solved) was fixing the Master Boot Record or MBR. The Windows XP Recovery Console can fix this for you, when can be loaded by booting to a Windows XP installation CD. There is a built-in utility called fixmbr which will fix your MBR for you. See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/bootcons_fixmbr.mspx for more information. Remember to enter “1″ when the Recovery Console asks you “When Windows installation would you like to log into”. You’ll also need to know the Administrator password.
Compiling Firefox on Fedora 12 64-bit (x86_64)
Mozilla doesn’t distribute 64-bit binaries for Firefox. If you want a newer version of Firefox (i.e. >3.5) on Fedora 12 64-bit, you’ll have to compile it yourself. Here’s how to do that:
- Go to ftp://ftp.mozilla.org/pub/firefox/releases and download the source tarball for the version you want.
- tar -jxvf firefox-3.x.y.source.tar.bz2
- cd mozilla-i.j.k
- ./configure –enable-application=browser –disable-necko-wifi –enable-official-branding
- make -j4
- sudo make install
- You have to enable the “browser” when configuring
- You have to disable the necko-wifi option when configuring, on Fedora 12
- You have to enable the “official branding” in order for your browser to be called “Firefox” instead of “Namoroka”
Initializing static vector or list in C++
Here’s a typical way of initializing a static vector or list in C++.
http://efreedom.com/Question/1-780805/Populate-Static-Member-Container-CPlusPlus
http://efreedom.com/Question/1-780805/Populate-Static-Member-Container-CPlusPlus
Exclude subdirectory when creating tar ball archive
When using GNU tar (commonly found in Linux distributions) getting tar to exclude a subdirectory can have some tricky pitfalls. Perform the tar command like this:
Note the following:
tar -zcvf mytarball.tar.gz --exclude "/home/user/directoryToTar/subdirAToExclude" --exclude "/home/user/directoryToTar/subdirBToExclude" /home/user/directoryToTar
Note the following:
- The
--exclude
must become before the file list of things to tar - The directory to exclude must be surrounded by double quotes
- The directory to exclude must be a full system path (i.e. not a relative path, such as ./subDirAToExclude)
- The files to include must also be a full system path (i.e. not a relative path, such as ./directoryToTar)
How to Get Ctrl-Alt-Backspace Working in Fedora
Check the checkbox at System > Preferences > Keyboard > Layout > Options > Key sequence to kill the X server. Thanks http://www.ghacks.net/2010/09/20/get-back-ctrl-alt-backspace-in-fedora-and-ubuntu
Traversing California
Being from the San Francisco Bay Area, and various members of my family at some times living in Southern California, my family and I have made countless trips up and down the state. The default route is on I-5, the Golden State Freeway. While the 5 has it’s certain style of fun for a mini road trip in my opinion, many people cringe at the idea of 4 hours on a boring, straight, flat, crowded freeway with nothing to look at but cars, trucks, and cows. The common alternate routes (101, 99, and maybe even the 1) are generally known, but below are also some known and lesser known routes to get from the Bay Area to LA, or vice-versa:
Interstate 5 – This is the default route most people will think of, and it is the shortest route and often the fastest way to get where you’re going. Most Californians will already know what this trip is like, but sometimes I actually find this route entertaining, even if the freeway is packed and you have to do what my friends call hopscotching, or passing the majority of the cars in the right lane, or if the right-lane passers are still too slow, sometimes passing those cars ironically in the left lane. It’s sometimes relaxing to just sit back, lock in the cruise control, and pass cars and trucks in a systematic manner. Maybe because it allows me to pretend I’m a professional truck driver.
U.S. Route 101 – Believe it or not, I took a course called “The American Highway” in college, and one of the classroom discussions was about which route to take between Southern California and Northern California. The two debated choices was the default I-5 and the more scenic 101. Many people defended the 101, but interestingly, many recent reviews almost unanimously disregard the 101 as an option. The 101 is a nice scenic drive, going through Santa Barbara and through the central coast region. It’s definitely a longer drive both in distance and time, and may have some crowdedness at some points. I guess people don’t think the extra hours justifies the change in scenery.
CA Route 99 – Californians are also familiar with the 99, which splits off from the 5 right after (or before) the Grapevine, and parallels the 5 through the central valley. This route enters and exists nonstop city after city starting with Bakersfield all the way through Manteca and beyond. If you’ve ever driven down the entire length of E. 14th Street (aka International within Oakland), driving the 99 through the Central Valley reminds me of the E. 14th drive. You’re on it for the full distance, while the locals only merge on and off for a short distance to get where they’re going. After all, why would anyone drive the entire length? Up until recently, I remember this route being annoying with signals, traffic, and slowness. However, when I took this highway recently, there’s no more signal lights, must of the highway is 3 lanes in each direction, and the highway can actually have substantially less traffic than the 5, despite the 5 being the Interstate designed to bypass the route serving the many central valley cities. Since the 5 is only two lanes in each direction through the central valley, annoying people that think they can cruise in the passing lane can definitely ruin a road trip on the 5. On the 99, these annoying people still exist, and there’s plenty of people passing on the right, but since there’s an additional third lane, that makes it easy to pass the passers in the slow lane. For this reason, making the drive on the 99 might be more efficient, even despite the extra 30 mile routing over the 5. In addition, the tighter curves on the 99 add to to the funness factor. :)
CA Route 1 – Ahh, the Pacific Coast Highway, the Cabrillo Highway, whatever you want to call it. What’s in a name, when you have hundreds of miles of twisty turns and ocean views that people dream of. Definitely do this drive at least once in your life, and budget a good full day for this drive.
U.S. Route 395 - Okay, now that we’ve gotten the mostly-known routes out of the way, let’s cover the more obscure ways to get home from Southern California. The 395 splits off of the 15, but the 14 also merges into the 395, and this route will take you on the Eastern side of the Sierras, through some of the most scenic areas in California. You’ll feel like you’re on the backside of California (well, you are, literally), and you’ll thank yourself that you made this drive, avoiding the cars, trucks, traffic, and cows in the Central Valley. You can only do this drive during the summer, unless you want to drive all the way to CA Route 88 via Kirkwood. During the summer months, cut over to the Bay Area either through Yosemite and CA Route 120 (you might have to pay a $20 Yosemite entrance fee), or drive a little further north to CA Route 108, and be prepared for some awesome windy (and privately secluded) mountain roads, and even some lingering snow even in summer months, near the peak, almost at 10,000 feet elevation.
CA Routes 33, 198, and 25 - So, you’ve done the 5, 101, 99, 1, and even the 395. What else is left? Well, if for some reason you can’t or don’t want to drive on a freeway (or if you’re just looking for a new fresh route), and want to traverse California, you can take the 33, 198, and 25. The 33 starts out in Ojai (near Santa Barbara) and immediately climbs up over the the mountain range separating Northern and Southern California through some very twisty turns, great views, remoteness, and solidarity. The 33 will then drop you off at the base of the mountains, into the Central Valley. You’ll parallel the 5 on the West Side Highway (if you’ve ever wondered what Westside Connection was rapping about, this is it). The 33 is actually a pretty nice secluded highway with almost no traffic, but just as straight and flat as the 5. Unfortunately, the speed limit is 55, although I’d doubt the CHP regularly patrol this road. On the way, you’ll pass through Blackwells Corner, the last place that James Dean was seen alive before dying in a head-on collision a little further down the road on U.S. Route 466 (the same road that my dad literally grew up on). The 33 will actually continue up through the Central Valley, partially being cosigned with the 5, and eventually leading you to Tracy. However, if you want to continue completely on a byway to the Bay Area, take a left on CA Route 198 through yet another very windy and scenic highway, and take a right on CA Route 25, leading yourself through another scenic highway winding somewhere between the 101 and the 5, through alternating straightaways and curves. When you arrive, you’ll know that you’ve taken a route traversing California that few others even knew existed.
Interstate 5 – This is the default route most people will think of, and it is the shortest route and often the fastest way to get where you’re going. Most Californians will already know what this trip is like, but sometimes I actually find this route entertaining, even if the freeway is packed and you have to do what my friends call hopscotching, or passing the majority of the cars in the right lane, or if the right-lane passers are still too slow, sometimes passing those cars ironically in the left lane. It’s sometimes relaxing to just sit back, lock in the cruise control, and pass cars and trucks in a systematic manner. Maybe because it allows me to pretend I’m a professional truck driver.
U.S. Route 101 – Believe it or not, I took a course called “The American Highway” in college, and one of the classroom discussions was about which route to take between Southern California and Northern California. The two debated choices was the default I-5 and the more scenic 101. Many people defended the 101, but interestingly, many recent reviews almost unanimously disregard the 101 as an option. The 101 is a nice scenic drive, going through Santa Barbara and through the central coast region. It’s definitely a longer drive both in distance and time, and may have some crowdedness at some points. I guess people don’t think the extra hours justifies the change in scenery.
CA Route 99 – Californians are also familiar with the 99, which splits off from the 5 right after (or before) the Grapevine, and parallels the 5 through the central valley. This route enters and exists nonstop city after city starting with Bakersfield all the way through Manteca and beyond. If you’ve ever driven down the entire length of E. 14th Street (aka International within Oakland), driving the 99 through the Central Valley reminds me of the E. 14th drive. You’re on it for the full distance, while the locals only merge on and off for a short distance to get where they’re going. After all, why would anyone drive the entire length? Up until recently, I remember this route being annoying with signals, traffic, and slowness. However, when I took this highway recently, there’s no more signal lights, must of the highway is 3 lanes in each direction, and the highway can actually have substantially less traffic than the 5, despite the 5 being the Interstate designed to bypass the route serving the many central valley cities. Since the 5 is only two lanes in each direction through the central valley, annoying people that think they can cruise in the passing lane can definitely ruin a road trip on the 5. On the 99, these annoying people still exist, and there’s plenty of people passing on the right, but since there’s an additional third lane, that makes it easy to pass the passers in the slow lane. For this reason, making the drive on the 99 might be more efficient, even despite the extra 30 mile routing over the 5. In addition, the tighter curves on the 99 add to to the funness factor. :)
CA Route 1 – Ahh, the Pacific Coast Highway, the Cabrillo Highway, whatever you want to call it. What’s in a name, when you have hundreds of miles of twisty turns and ocean views that people dream of. Definitely do this drive at least once in your life, and budget a good full day for this drive.
U.S. Route 395 - Okay, now that we’ve gotten the mostly-known routes out of the way, let’s cover the more obscure ways to get home from Southern California. The 395 splits off of the 15, but the 14 also merges into the 395, and this route will take you on the Eastern side of the Sierras, through some of the most scenic areas in California. You’ll feel like you’re on the backside of California (well, you are, literally), and you’ll thank yourself that you made this drive, avoiding the cars, trucks, traffic, and cows in the Central Valley. You can only do this drive during the summer, unless you want to drive all the way to CA Route 88 via Kirkwood. During the summer months, cut over to the Bay Area either through Yosemite and CA Route 120 (you might have to pay a $20 Yosemite entrance fee), or drive a little further north to CA Route 108, and be prepared for some awesome windy (and privately secluded) mountain roads, and even some lingering snow even in summer months, near the peak, almost at 10,000 feet elevation.
CA Routes 33, 198, and 25 - So, you’ve done the 5, 101, 99, 1, and even the 395. What else is left? Well, if for some reason you can’t or don’t want to drive on a freeway (or if you’re just looking for a new fresh route), and want to traverse California, you can take the 33, 198, and 25. The 33 starts out in Ojai (near Santa Barbara) and immediately climbs up over the the mountain range separating Northern and Southern California through some very twisty turns, great views, remoteness, and solidarity. The 33 will then drop you off at the base of the mountains, into the Central Valley. You’ll parallel the 5 on the West Side Highway (if you’ve ever wondered what Westside Connection was rapping about, this is it). The 33 is actually a pretty nice secluded highway with almost no traffic, but just as straight and flat as the 5. Unfortunately, the speed limit is 55, although I’d doubt the CHP regularly patrol this road. On the way, you’ll pass through Blackwells Corner, the last place that James Dean was seen alive before dying in a head-on collision a little further down the road on U.S. Route 466 (the same road that my dad literally grew up on). The 33 will actually continue up through the Central Valley, partially being cosigned with the 5, and eventually leading you to Tracy. However, if you want to continue completely on a byway to the Bay Area, take a left on CA Route 198 through yet another very windy and scenic highway, and take a right on CA Route 25, leading yourself through another scenic highway winding somewhere between the 101 and the 5, through alternating straightaways and curves. When you arrive, you’ll know that you’ve taken a route traversing California that few others even knew existed.
Subscribe to:
Posts (Atom)