Monday, July 14, 2014

7x7x7 Rubik's Cube Parity Case

This is the solution to the 7x7x7 Rubiks Cube Parity case

R  U2 
R  F2 
R  F2 
L  U2
L' U2 
R' U2 
R  U2 
R' U2 
R'

Yes, this is cryptic. I know. If you want more information, let me know.

Saturday, March 22, 2014

Install Oracle Java7 on Ubuntu

First, create a simple sh script for registering keys.
echo '#! /bin/sh' > regkey.sh
echo 'gpg --keyserver pgp.mit.edu --recv-keys $1' >> regkey.sh
echo 'gpg --export --armor $1 | sudo apt-key add -' >> regkey.sh
sudo chmod a+x regkey.sh
Now browse to the link below. Click on the Technical Details about the PPA link, and use the drop down box to find the links for your version:
https://launchpad.net/~webupd8team/+archive/java
I'm using Ubuntu 12.04, so mine are:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
Now append them to sources.list
echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' | sudo tee -a /etc/apt/sources.list
echo 'deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' | sudo tee -a /etc/apt/sources.list
Do an apt-get update:
sudo apt-get update
You should get an error message like:
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Grab the key from the end of the error message, and register it:
./regkey.sh C2518248EEA14886
You will see a response like the one below, grab that key and register it.
gpg: directory `/home/m/.gnupg' created
gpg: new configuration file `/home/m/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/m/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/m/.gnupg/secring.gpg' created
gpg: keyring `/home/m/.gnupg/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server pgp.mit.edu
gpg: /home/m/.gnupg/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
./regkey.sh EEA14886
Run the update again to make sure there are no more errors
sudo apt-get update
(This is optional!) Run an upgrade
sudo apt-get upgrade -y
Now you can run the Java installer:
sudo apt-get install oracle-java7-installer
# when prompted, agree to the conditions, congrats! You now have Oracle Java installed!

Droid Razr Maxx in Ubuntu

To get your Droid Razr Maxx to connect to an Ubuntu machine open the following files in a text editor
/etc/udev/rules.d/51-android.rules
/etc/udev/rules.d/52-mtp.rules
Then add the following line
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
Then restart the usb service
sudo service udev restart
On you droid go to Settings => Developer options and enable USB debugging.
Plug your phone in via USB cable, and it should work.

Friday, August 9, 2013

Building a Google Appengine Environment for Java

Why

As of this writing the Eclipse plugins, and the directions that Google offers for setting up an environment are broken.

Download and extract resources

First, start downloading all the packages and software you will need. I will be installing this on a Windows 7 64-bit machine, but I'm using the 32-bit packages to ensure compatibility. Feel free to try the 64-bit versions if you like. Now, begin downloading your packages.

Google Eclipse Plugin

Go to this page and get the latest plugin.
https://developers.google.com/eclipse/docs/install-from-zip
Note the version of Eclipse that is supported! As of this writing the latest supported version is 4.3 so I will be using version 4.3 of Eclipse.

Eclipse Java EE version

Go and grab the Eclipse IDE for Java EE Developers from the Eclipse download page. Make sure that the version you download matches the version of the Google Plugin above!
http://www.eclipse.org/downloads/

Java 7 JDK and JRE

Go get the latest Java 7 JDK and JRE. You will need both!
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Get the GWT SDK

Get the GWT SDK zip file, not the Plugin for Eclipse that is offered at the top of the page. As of this writing the plugin will not download through eclipse.
http://www.gwtproject.org/download.html

Get the SDK

Get the Appengine SDK for java. I would grab the latest version in 
https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Java 

Extract and install Packages

To make this guide a bit easier to follow I will be downloading all of these into one folder called c:\appenginedev. Within appenginedev there will be three sub-folders: tools, eclipse, and workspace. Go ahead and create them now, but do not put anything in them. We will begin that process now.

Extract the GWT and the SDK

Extract the contents of appengine-java-sdk and move it into the tools folder. Do the same with the gwt that you downloaded. When complete you should have two folders within tools. Mine are called appengine-java-sdk-1.8.3 and  gwt-2.5.1. Within each of these folders is a bunch of files and folders.

Install Java 7 JDK and JRE

Run the install s for the Java 7 JDK and the JRE. Note the installation directory for the JDK. Mine is C:\Program Files (x86)\Java\jdk1.7.0_25.

Extract Eclipse

Extract eclipse into the Eclipse folder that you created. (Easy Huh?)

Configure Eclipse

This is the tricky part!

Modify eclipse.ini

  1. Open eclipse\eclipse.ini in a text editor.
  2. Find the line that starts with openfile
  3. Add the below lines just under openfile.
-vm
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\javaw.exe
Note the first part of the path should point to the location of your JDK!
Your eclipse.ini should now look something like:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
Now save eclipse.ini, and start Eclipse!

Select Workspace

Eclipse will ask you to select a workspace, put it where ever you like, but I put mine in c:\appenginedev\workspace.

Install the Google plugins

  1. In eclipse go to Help -> Install New Software...
  2. Click on Add...
  3. Click on Archive...
  4. Browse to c:\appenginedev\com.google.gdt.eclipse.suite.4.3.update.site_3.3.0.zip
  5. Click Open
  6. Click Ok
  7. Select Google Plugin for Eclipse (required)
  8. Select GWT Designer for GPE (recommenned)
  9. Click Next
  10. Click Next
  11. Accept the both Licenses
  12. Click Finish
  13. If prompted about unsigned content click Ok
  14. When asked to restart Eclipse clock Yes
  15. When it's back up, go to Window -> Preferences
  16. In the list go to Google -> App Engine
  17. Click Add...
  18. Click Browse...
  19. Browse to c:\appenginedev\tools\appengine-java-sdk-1.8.3
  20. Click Ok
  21. Click Ok
  22. Click on Google -> Web Toolkit in the list
  23. Click Add...
  24. Click Browse...
  25. Browse to c:\appenginedev\tools\gwt-2.5.1
  26. Click Ok
  27. Click Ok
  28. Click Ok

Done!

From this point on Google's documentation does nicely, so I will point you there. Enjoy!
https://developers.google.com/appengine/docs/java/

Thursday, June 27, 2013

Ubuntu 12.04 Light Installation

Here's the stuff I do to my Ubuntu 12.04 install to get it running the way I want. I have a few goals.


  1. I'm running old hardware, so I need to thin out Unity
    1. I'm not a fan of Unity2D so I focus on thinning out Unity
  2. I'm a developer, I need my dev tools.
  3. I don't listen to music, and watch video.


So here's the things I'm currently doing to get this thing running.

1) Install some basic utils, and chrome... it seems to be faster than firefox. Java is also good to have.
sudo apt-get install chromium-browser preload gconf-editor compizconfig-settings-manager gimp openjdk-6-jdk 
2) Install some developer stuff
sudo apt-get install build-essential git git-cola wireshark meld
3) Fix the max/min/close buttons
gconf-editor
Change apps->metacity->general->button_layout to
:minimize,close
 4) Start up CompizConfig Settings Manager
ccsm
Find the General section, click on OpenGL. Change the Texture Filter drop down to Fast.
Turn off everything except Window Decoration under the Effects section.

5) Remove unneeded lenses from Unity
sudo apt-get autoremove unity-lens-video unity-lens-music

Wednesday, June 15, 2011

Installing Bugzilla 4 on Ubuntu 11.04

Step 1, install the build environ.
sudo apt-get install libyaml-perl build-essential

Step 2, follow the directions at this blog.
http://vibhurishi.blogspot.com/2009/05/howto-install-bugzilla-on-ubuntu-9.html

Wednesday, June 1, 2011

Share Ubuntu 7.04 folders with Windows

http://www.go2linux.org/how-to-install-samba-on-linux-with-swat


This guide to install samba server on Ubuntu, will help you share files from your Ubuntu Feisty with the windows machines on your network.

This way maybe you will be able to use Ubuntu at your office, hope you can.

First install samba

sudo apt-get install samba


With this you will have samba installed on your system, now you need to edit the configuration file which is located at:

/etc/samba/smb.conf
Here I will put a simple minimal configuration to allow share files from your Linux server.

[global]
workgroup = MSHOME
netbios name = UBUNTU_SERVER
security = SHARE
auth methods = guest
domain master = No
wins support = Yes

[share1]
comment = mi home
path = /home/ggarron
read only = No
guest ok = Yes
--or--
[global]
security = user
map to guest = bad user
guest account = nobody
workgroup = MSHOME

#these two only work together...
#for wins you must have a static IP address
netbios name = Ubuntu_Server
wins support = yes

[share1]
path = /home/me
comment = Stuff
read only = no
guest only = yes
guest ok = yes
Ok, the [global] section lets you configure all global parameters, which in this case are:

  • workgroup; Lets you specify the windows workgroup
  • netbios name; Lets you specify the name with your Linux PC will be seen by windows PCs
  • security; specifies the level of security, default is user, but if the users on the windows PCs are not the same as the ones on the Linux PC, you better use share instead
  • auth methods; Possible options include guest (anonymous access), sam (lookups in local list of accounts based on netbios name or domain name), winbind (relay authentication requests for remote users through winbindd), ntdomain (pre-winbindd method of authentication for remote domain users; deprecated in favour of winbind method), trustdomain (authenticate trusted users by contacting the remote DC directly from smbd; deprecated in favour of winbind method)
  • domain master; Lets you configure your PC as a domain master or not, in this case we prefer not, as our goal is only to share files
  • wins support; If you want or not to have wins enabled or not
Now comes the shares section, the string you put between the [] will be how windows will sees the share, in this case share1

  • path; You put here the path you may want to share
  • read only; yes or no, depending if you want to permit other users to write on this directories.
  • guest ok; It is a boolean field, and will permit or not guest users to access this resource
Until here you are able to share files from your Linux PC to your Windows PCs.

Update for Vista:

You will need samba 3.0.22 in order to see shares of Linux on Vista, and to be able to mount the Vista\\''s shares on Linux you will maybe need to do it manually using the mount command.

mount -t smbfs -o username=[username] password=[secret] //ip_address/share /mountpoint