AAaaah. That JAVA_HOME environment again.
When I was student (and those days, knows nothing about environment variables), setting JAVA_HOME (and CLASSPATH) environment is, to say the lest, difficult and confusing.
Anyway, it's actually very simple idea. Every machines has their own java environment and by default, it is usually installed in /usr/bin/java
Run the following to test:
$> which java
/usr/bin/java
Now, we don't usually want this default installation because it's old , etc.
Say, you already installed a new JDK and it's located here: /opt/jdk_1.6/
And you want to use those executables. This is how you do it:
1. Login to your Bash (I'm talking about Unix/Linux here. So Windows user... there's a way to do it through GUI not covered here)
2. Open your .bash_profile
$> vi .bash_profile (you can use any editor you want)
3. add the following command:
JAVA_HOME=/opt/jdk_1.6
Comment: This sets the environment variable "JAVA_HOME" to be that path)
PATH=${JAVA_HOME}/bin:$PATH
Comment: Add the "bin" executable that points to the new "java" executable and other more executables to the new one, into the existing PATH)
IMPORTANT:: Put your $JAVA_HOME/bin at the front so that the console search the new path first to find the executable. Otherwise, if it found in the /usr/bin/, it'll take that one and you'll get the old /usr/bin/java )
export $PATH
Comment: Add the new path as the path
OK, that's it.
Once you finish that, source it to get the new changes:
$>source .bash_profile
$> which java
/opt/jdk_1.6/bin/java
TADAAA. It should point to the new location of our freshly installed Java directory in /opt/jdk_1.6
A place to breathe
Friday, December 7, 2012
Tuesday, November 27, 2012
Auto-logging to remote server using private / public key pair on Windows
Often times, we're lazy to key in the username and password everytime we want to log in to remote servers.
The usual scenario is like this:
You're from Windows machine, and your work is on Unix/Linux server somewhere in other parts of the world. You download PuTTY, and you want to remote login. You download WinSCP, you want to securely transfer files.
After a while, you get tired of typing the username and password. What do you do?
As the laziness of programmers always drives the world forward - here it is: Appointing an "agent" to log it in for us.
How does this work?
1. Download PuTTYgen (search on Google)
2. Generate Public/Private key pair, put in paraphrase (usually your password)
3. Save your public and private key (*.ppk) somewhere safe in your computer.
4. Copy the "public key" on the PuTTYgen into a notepad.
5. Remote login to your server, create ".ssh" directory, and copy the "publickey" into a file called "authorized_keys" . Save the key into the ".ssh" directory in your home directory.
6. Download Pageant (go search on Google)
7. Run Pageant - now it runs and resides in your taskbar.
8. Right click, and Add Key. Browse into your private key you just created in step 2.
9. Create new session (or just run from command prompt:
C:>pageant.exe -c/putty.exe )
10. Put your details - username, password, and private key. Save session.
Now when you right click pageant, (the little icon with hat), it will prompt your username and when that matches, will auto login right away.
10. You can also repeat the step for WinSCP, and store the session. When you click on the stored session, WinSCP will auto-login for you.
Save 15 minutes in your life daily, and go get vacation with time saved!
The usual scenario is like this:
You're from Windows machine, and your work is on Unix/Linux server somewhere in other parts of the world. You download PuTTY, and you want to remote login. You download WinSCP, you want to securely transfer files.
After a while, you get tired of typing the username and password. What do you do?
As the laziness of programmers always drives the world forward - here it is: Appointing an "agent" to log it in for us.
How does this work?
1. Download PuTTYgen (search on Google)
2. Generate Public/Private key pair, put in paraphrase (usually your password)
3. Save your public and private key (*.ppk) somewhere safe in your computer.
4. Copy the "public key" on the PuTTYgen into a notepad.
5. Remote login to your server, create ".ssh" directory, and copy the "publickey" into a file called "authorized_keys" . Save the key into the ".ssh" directory in your home directory.
6. Download Pageant (go search on Google)
7. Run Pageant - now it runs and resides in your taskbar.
8. Right click, and Add Key. Browse into your private key you just created in step 2.
9. Create new session (or just run from command prompt:
C:>pageant.exe -c
10. Put your details - username, password, and private key. Save session.
Now when you right click pageant, (the little icon with hat), it will prompt your username and when that matches, will auto login right away.
10. You can also repeat the step for WinSCP, and store the session. When you click on the stored session, WinSCP will auto-login for you.
Save 15 minutes in your life daily, and go get vacation with time saved!
Wednesday, August 29, 2012
Why entrepreneurship ?
There is few motivation to start your own company. Most people are motivated by money. Actually, when I started Nusantara Software, I also thought a little bit about money. But my thinking is that, the money can be used to create more tools and technologies so that we can make other people life easier, and have more fun.
So, the "money" part is just a tool for you to sustain the stuff you're working on. Actually, entrepreneurship need not be thought, although i think there's no harm in trying to teach it to students. Entrepreneurship is more like starting something out yourself, and persistently believe that what you're doing is good yourself, and good for the people.
We started our game called "Capflick" out of our desire to trying out iPhone app coolness. We then work on "Sweets Rain", and then, we got a job to release "Ninja vs UFO", and then, on and on.
It started with a simple idea of having fun, and now, we have work to do, and we meet cool friends.
So, while money is one of the motivating factor out of starting up a company, it's not really the main thing.
The X-factor of starting out the company, I think, is the thrill to try something new, something outside of your life routine, and your day job scope. Something fun.
Some people took a big chance by quitting the company and etc, but I really don't think it's necessary. I prefer to start small, make friends, make profits, and have fun along the way.
That's why I'm in this entrepreneurship work.
So, the "money" part is just a tool for you to sustain the stuff you're working on. Actually, entrepreneurship need not be thought, although i think there's no harm in trying to teach it to students. Entrepreneurship is more like starting something out yourself, and persistently believe that what you're doing is good yourself, and good for the people.
We started our game called "Capflick" out of our desire to trying out iPhone app coolness. We then work on "Sweets Rain", and then, we got a job to release "Ninja vs UFO", and then, on and on.
It started with a simple idea of having fun, and now, we have work to do, and we meet cool friends.
So, while money is one of the motivating factor out of starting up a company, it's not really the main thing.
The X-factor of starting out the company, I think, is the thrill to try something new, something outside of your life routine, and your day job scope. Something fun.
Some people took a big chance by quitting the company and etc, but I really don't think it's necessary. I prefer to start small, make friends, make profits, and have fun along the way.
That's why I'm in this entrepreneurship work.
Monday, August 27, 2012
Publishing Apps on iTunes Appstore
Yes, it's still hard to upload something on App store, you feel like you have to be a little wizard.
It's even harder when there's updates on iOS or XCode. Anyway.
Before you even try to publish on iTunes Appstore, you need to get yourself familiar with the following lingo:
1. iTunes developer portal - https://developer.apple.com
2. iTunes Connect - https://itunesconnect.com
3. XCode - Schema, Archive feature
4. Keychain access.
Actually, i don't know why is it so hard to publish apps on appstore, but anyway, if you want to get rough idea without long walkthru, here it is:
1. Create your private/public keypair
KeyChain Access ->Certificate Assistant -> Request a Certificate from Certificate Authority -> Save it to disk
2. Upload your Certificate on to developer portal
Go to Developer portal: here https://developer.apple.com/ios/manage/overview/index.action
Certificate (Left bar) -> Distribution tab -> request certificate
Choose File (the one you saved on step 1) -> Submit
3. Associate certificate with provisioning profile
Provisioning (Left bar) -> Name your provisioning -> Associate your AppId -> Save
4. Download both your certicate, and provisioning profile. Click those downloaded files.
5. Create your appstore distribution build configuration
Project -> Info -> Configurations -> Click "+" sign, and duplicate "Release". Rename the configuration to "Appstore".
6. Create your appstore schema
Product->edit schema -> Click "+" sign and create another schema, call it "-Appstore"
7. Archive the "Appstore" build
Product->Manage Schema -> Edit (left bottom) -> Build Configuration = Appstore
8. Sign your code with the profile (it should say "Valid profile" )
Project -> Build setting -> iPhone Distribution -> your profile
9. Archive the project
- Set the target device to iOS device (that's OK without any device).
- Product -> Archive
- On success, click "Validate".
- On success, click "Distrubute"
done.
Why so many steps? Don't ask me. Ask Apple.
It's even harder when there's updates on iOS or XCode. Anyway.
Before you even try to publish on iTunes Appstore, you need to get yourself familiar with the following lingo:
1. iTunes developer portal - https://developer.apple.com
2. iTunes Connect - https://itunesconnect.com
3. XCode - Schema, Archive feature
4. Keychain access.
Actually, i don't know why is it so hard to publish apps on appstore, but anyway, if you want to get rough idea without long walkthru, here it is:
1. Create your private/public keypair
KeyChain Access ->Certificate Assistant -> Request a Certificate from Certificate Authority -> Save it to disk
2. Upload your Certificate on to developer portal
Go to Developer portal: here https://developer.apple.com/ios/manage/overview/index.action
Certificate (Left bar) -> Distribution tab -> request certificate
Choose File (the one you saved on step 1) -> Submit
3. Associate certificate with provisioning profile
Provisioning (Left bar) -> Name your provisioning -> Associate your AppId -> Save
4. Download both your certicate, and provisioning profile. Click those downloaded files.
5. Create your appstore distribution build configuration
Project -> Info -> Configurations -> Click "+" sign, and duplicate "Release". Rename the configuration to "Appstore".
6. Create your appstore schema
Product->edit schema -> Click "+" sign and create another schema, call it "
7. Archive the "Appstore" build
Product->Manage Schema -> Edit (left bottom) -> Build Configuration = Appstore
8. Sign your code with the profile (it should say "Valid profile" )
Project -> Build setting -> iPhone Distribution -> your profile
9. Archive the project
- Set the target device to iOS device (that's OK without any device).
- Product -> Archive
- On success, click "Validate".
- On success, click "Distrubute"
done.
Why so many steps? Don't ask me. Ask Apple.
Sunday, August 5, 2012
All the little things
Wow, it's been a while since I was blogging here.
Well, there are so much stuff happening but unrecorded here in my life. But, let's see. Hmm. Change work, getting married, etc.
Anyway, I won't discuss much about those. I just want to discuss about my current work and some ideas, musings (sometimes quite political, but that's fine if you can't take it). First, I'm currently working at Openet. It's a telco software vendor. The work is kind of relax and flexible which is why I'm still here.
Second, after work, I work at Nusantara Software. It's the company that me and my ReCom buddy Lukman started. We started as a "web" company. because, well, it's our first project and we just want to code for fun together.
Third, we got bored because our "flagship product" - an e-learning software, didn't really take off because we apparently coding it for fun and have no idea how to build business around it. So it's still in our repository collecting dust. So we decided to release games on iPhone. We have released a few games throughout 2011-2012. I will write intensively the whole entire process on how it all became, it's kind of interesting on how completely random idea get us into projects that we learn so much till now.
Fourth, I'm no longer in Penang and now based in KL. Penang is good if you're interested in hardware. But I'm not into hardware (i thought i did) that much. At least for now. That's why the company we started mentioned specifically about "Software". I like Software. I just found it cool to be associated with the industry. I thank those people who started the industry to make us looks cool and non-conformist. Somehow, I feel like a musician who doesn't know how to play musics when dealing with software stuff. Maybe there's a relation to it.
Anyway, I won't discuss much about those. I just want to discuss about my current work and some ideas, musings (sometimes quite political, but that's fine if you can't take it). First, I'm currently working at Openet. It's a telco software vendor. The work is kind of relax and flexible which is why I'm still here.
Second, after work, I work at Nusantara Software. It's the company that me and my ReCom buddy Lukman started. We started as a "web" company. because, well, it's our first project and we just want to code for fun together.
Third, we got bored because our "flagship product" - an e-learning software, didn't really take off because we apparently coding it for fun and have no idea how to build business around it. So it's still in our repository collecting dust. So we decided to release games on iPhone. We have released a few games throughout 2011-2012. I will write intensively the whole entire process on how it all became, it's kind of interesting on how completely random idea get us into projects that we learn so much till now.
Fourth, I'm no longer in Penang and now based in KL. Penang is good if you're interested in hardware. But I'm not into hardware (i thought i did) that much. At least for now. That's why the company we started mentioned specifically about "Software". I like Software. I just found it cool to be associated with the industry. I thank those people who started the industry to make us looks cool and non-conformist. Somehow, I feel like a musician who doesn't know how to play musics when dealing with software stuff. Maybe there's a relation to it.
Subscribe to:
Posts (Atom)
About Me
- syamsulhasran
- I'm currently a software engineer. My specific interest is games and networking. I'm running software company called Nusantara Software.