Getting Involved in the Open Source Community

These are my notes for my presentation at the April 9th, 2013 Suncoast Linux Users Group Meeting.

What is the Open Source Community?

The open source community are the people who use, develop, fix and lead open source projects. People is the important part of this description because they are why people stay involved in a project. Without people there would just be static unchanging code.

 

My Experience

  • Gentoo Linux Installer project for a summer
  • Random Bug Fixes
  • Random Github projects
  • Lots of code for work
  • Recent Adventure into Libreoffice

 

Finding a project

Locating a project is all about what your interests are. In general though unless you are getting paid to work on the project, I would start with an open source product that you actively use. Otherwise your level of interest may fade quickly after the initial sprint of development you do. (I am extremely guilty of doing just that).

 

What Size of Project are you Comfortable With?

Finding a project is similar to choosing a college or university. Different sized projects will feel similar to those environments.

  • Large Established Project?
    • Will have dedicated people to help you get started. Extensive documentation will exist and will probably be up to date.
    • It will not be possible for all the members of the project to know each other. As a result more formalized processes will grow up to organize the members.
  • Extremely Small Project?
    • Typically will live on Github or another code hosting site.
    • There will be an extremely small number of active developers, often one or two.
    • Tends to be accepting of any help or interest in the project.

     

How do you want to get involved?

  • Do you code? (Possibly Hardest)
  • Are you able to check for bugs?
    • Check the bug trackers and reproduce bugs
  • Can you write documentation?
    • Editing documentation is easy if you have a good command of English
  • Can you help people who have questions? (Easiest to Start)
    • Hangout in the IRC channels or forums
    • Join the SLUG one while you are at it.

I’m going to assume for the rest of this talk that you have some interest in coding.

Libreoffice Process

  • Walk-through of getting started.

Android 4.2 on HTC One X

AT&T finally pushed out the Jelly Bean update for the HTC One X phone. I have to say, it is night and day better than 4.1 and well worth the wait. Overall the phone just feels faster, IPV6 works and they made the keyboard easier to use. The only downside I have seen is additional crapware that AT&T put into the phone. One the plus side their browser bar can actually be disabled!

Netcat for those without NetCat

Here is a perl one liner I found here: http://www.ajs.com/ajswiki/Perl_one-liners

This starts up a socket server that allows for easy firewall testing if you don’t have netcat installed.

perl -MIO::Socket::INET -e ‘$s=IO::Socket::INET->new(LocalPort=>5000,
Proto=>”tcp”,
ReuseAddr=>1,
Listen=>5) or die “socket: $!”;
while($in=$s->accept()){
$in->print(“Hi\n”);print while <$in>;undef $in
}’

Simple Pdf Merging

I just finished a PDF Merger Application for those who don’t have access to a command line. Check out the link on the right. Let me know if you want features!

Removing Wine Bottle Labels

Since our wedding is at a winery, it makes perfect sense to use wine bottles as part of our centerpieces. However we wanted to use custom labels instead of the winery’s so we had to remove their labels. I looked around the Internet for suggestions on how to do this and found this Youtube video: http://www.youtube.com/watch?v=zWVQImPY2Cc. In it they suggested soaking the label off with oxy clean and water in a bath. I tried it and it was an absolute disaster. Yes sometimes it would remove the label cleanly, but more often the label would disintegrate while leaving the glue on. Also oxy clean is a nasty skin irritant so your hands will burn like crazy. With a little more search I found the following technique to be faster, cleaner and less painful.

Required Supplies

  • Goo Gone Spray Gel - Other adhesive removers may work, this was just the cheapest. Also the spray bottle made life so much easier. One bottle can do about 50 wine bottles
  • Large Kitchen Sink

Instructions

  1. Spraying the bottle.

    Spray the label with a generous coating of Goo Gone.

  2. Let the bottles sit.

    I tend to do 8 at a time. Let the bottles sit for 30min while the Goo Gone works.

  3. The bottle is ready

    You know the bottle is ready when you can see a discolored line around the back of the label. Also you can easily peel up an edge of the label in one whole piece.

  4. Run Water and Peel

    Now the bottle is ready, run a gentle stream of water over it, grab a corner and start peeling. The label should come off in one continuous piece.

  5. Label Off

    Once you are done peeling you should have the complete label off. Use a soapy sponge to clean the bottle and you are done!

Set Current Oracle Schema

To set the current Oracle schema that objects/queries will executed against, run the following code:
ALTER SESSION SET CURRENT_SCHEMA=FOO;

Lorem Ipsum Sighting – Chipotle Bag

I was getting ready to throw out a bag from Chipotle when I looked closer as saw that someone seemed have forgotten to fill in all of the text before they sent it to the printer. I’m sure they have printed millions of these, and it would be horrible to have missed placeholder text after paying all that money.

For anyone who doesn’t know Lorem Ipsum is a set of placeholder text commonly used in graphic mockups when you want to demo a font/design without people getting caught up in what the words say. The double edged sword is that since its so innocuous, it can also get overlooked if people are not paying very close attention.

Memory Intensive Secure Hashing – Sample Code

This is an example of how to do the secure hashing for use in Spring Security. However that git repo is only availible over IPV6. For those who do not have access to that, I have reproduced the file below:

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;

import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.security.authentication.encoding.PasswordEncoder;

public class SHA512PasswordEncoder implements PasswordEncoder {
        protected Logger log = LoggerFactory.getLogger(this.getClass());
        private final int iterations = 200000;
        private final String algorithum = "HmacSHA512";

        @Override
        public String encodePassword(String rawPassword, Object salt)
                        throws DataAccessException {
                StringBuilder password = new StringBuilder("1$" + iterations + "$");
                
                try {
                        KeyGenerator keygen = KeyGenerator.getInstance(algorithum);
                        keygen.init(512);
                        SecretKey hmac_key = keygen.generateKey();
                        
                        password.append(Base64.encodeBase64URLSafeString(hmac_key.getEncoded()));
                        password.append("$");
                        
                        password.append(this.calculateHash(hmac_key, iterations, rawPassword));
                } catch (NoSuchAlgorithmException e) {
                        throw new InvalidDataAccessApiUsageException("Could not use hmac512", e);
                } catch (InvalidKeyException e) {
                        throw new InvalidDataAccessApiUsageException("Bad hmac512 key", e);
                }
                return password.toString();
        }

        @Override
        public boolean isPasswordValid(String encPass, String rawPass, Object salt)
                        throws DataAccessException {
                log.info("Checking hash " + encPass + " to Pass " + rawPass);
                String[] hash_parts = encPass.split("\\$");
                if(!hash_parts[0].equals("1")){
                        log.error("Bad hash version! " + hash_parts[0]);
                        return false;
                }
                
                int valid_iter = Integer.parseInt(hash_parts[1]);
                SecretKey hmac_key = new SecretKeySpec(Base64.decodeBase64(hash_parts[2]), algorithum);
                
                try {
                        String calcPass = this.calculateHash(hmac_key, valid_iter, rawPass);
                        
                        if(calcPass.equals(hash_parts[3])){
                                return true;
                        } else {
                                log.error("Hash " + hash_parts[3] + " does not match, calculated " + calcPass);
                                return false;
                        }
                } catch (Exception e) {
                        log.error("Could not run validators.", e);
                        return false;
                }
        }

        private String calculateHash(SecretKey key, int iterations, String password) throws InvalidKeyException, NoSuchAlgorithmException{
                ArrayList hmacs = new ArrayList(iterations);
                
                byte[] output = new byte[64];
                Mac hasher = Mac.getInstance(algorithum);
                for(int i = 0; i= 0; i--){
                        hasher.update(hmacs.get(i));
                }
                return Base64.encodeBase64URLSafeString(hasher.doFinal());
        }
}

Phishing Scam Calls

I have been getting calls from an automated voice system with a spoofed caller id number ’223-2′. When I pick up i claims to be from the National Credit Union Administration and says that my pin has been compromised. It next asked for my card number so I could reset my pin. Duh, complete scam! However all my attempts to find out who really called me so I can report them to the police have been frustrated:

  1. 800notes only supports full phone numbers
  2. Google shows a million search results.
  3. Finally my phone bill claims that I got an incoming call from myself the one time I picked up. The other calls I ignored don’t even register.

So I’ve opened a case with my phone provider and written this blog post in the hopes others will be warned.

Site Down Overnight

Unfortunately I ran into one of the major problems with hosting your own servers last night. Around 2am the power went out for six hours and as a result this site had to come down. I think it could have lasted through the night if I had tried, but my battery backups beep like crazy and I can’t sleep as a result. Next time I have to replace them, I need to find ones that I can say “Duh there is no power, now shut up and keep the internet working!”.