Archive

Personal

Well, it is always good to have a refreshing layout. I spent like 2 days to tweak my website layout. It’s really awesome. Useless widgets are removed and background changed. There is even a whole new typography. I love it so much!

nicholas-workshop

Recently I have been working a lot on migrating android projects to use gradle building system. Seriously it is much better than the old time. I can easily use libraries on maven repositories and customize my building process. I also no long need to create a desperate project for testing. Awesome!

it’s been a while since the last post. After coming to new york, I have been very busy on my study, personal projects and (of course) playing around. studying in new york university is harsh, but not as hard as i think. I met nice people, hanged out with my beloved new friends. I even found people having great interests in technologies and software development.

I am trying to work on instamusic as long as i have time. I also shared my project of javascript injector with my friend, and hoping to expand service and functions that it can have. I am grateful to see that there are still many people using my applications and sending emails to me. thank you very much and i will try my best to make something new.

with love, a photo in central park is nice.

peace.

DSC053452

shot

What’s happening

One day, when I opened up terminal as usual, it showed [Process completed] and just terminated. I could not type any thing, run any scripts and work on my project. Even worse, this made me unable to install programs into my computer because many installations need to run shell scripts. Okay, I searched over the internet and there was no solution for that. I even peaked many parts in the Mac OSX system to see if there were any mis-configuration, of course nothing helps. After all, I though if there is nothing wrong, it must be  something done with my /bin/bash. And after I upgraded my bash, my lovely terminal came back!

[expand title=”Let’s fix it” tag=”h5″ trigclass=”arrowright”]

Change shell’s default execution

The truth is, when you open terminal, it execute /bin/bash. As it is not working now, we need another environment for us to execute stuff. Open “Terminal->Preference”, and change “Shells open with” manually to “/bin/sh”.

Change What Shell Opens

Update /bin/bash

Now we are going to download the latest version of bash and replace the old one. Open up a new terminal and now you are able to execute commands. Copy and paste the following codes into the terminal, they will automatically handle everything for you.

	curl -LO ftp://ftp.cwru.edu/pub/bash/bash-4.2.tar.gz
	tar zxvf bash-4.2.tar.gz
	cd bash-4.2
	./configure && make && sudo make install
	chsh -s /usr/local/bin/bash {user_name}
	sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
	cd /bin
	sudo mv bash bash-old
	sudo ln -s /usr/local/bin/bash bash
	
Once done

Go to “Terminal->Preference” again and change :Shells open with: back to “Default login shell”. Enjoy!

[/expand]

[expand title=”Detailed explanations” tag=”h5″ trigclass=”arrowright”]

What I did?

Okay, I admit that I did something to the system sometimes ago. I was doing some experiments on “sandboxing” and played with “chroot jail” stuff before. That is, I need to create an environment with restricted support to the program I run. So I wrote a sandbox, configured it’s root to a ‘secure’ place (anywhere not the actual root), and copy essential executables to that new root. Well, so far I think I didn’t do anything harm to the system, but I might corrupt the /bin/bash when I copied it to the sandbox root.

Diagnosis

Shell will run the following files before letting user to do anything. Check everyone to see if there are any misconfigurations.

  • ~/.bash_profile (for /bin/bash)
  • ~/.profile (for /bin/sh)
  • /etc/profile (for /bin/sh)
  • /etc/bashrc (for /bin/bash)
  • (google for more)

To play with, add some echoes to see if they works. Btw, I love nano more than vi, so try out “sudo nano /etc/bashrc”.

Playing with Shell
Another thing

The code above updates your bash to version 4.2. To check if there is any new version, go to the ftp.
ftp://ftp.cwru.edu/pub/bash/

Reference

http://techscienceinterest.blogspot.com/2010/05/change-to-new-bash-shell-41-for-mac-os.html


[/expand]

Actually, this website was my portfolio webpage before becoming a wordpress. It is moved to here: nicholasworkshop.com/portfolio. Using wordpress, I put the old webpage aside and always forgot to transfer the information from it to the front page. Anyway, I hope this can remind me of the projects and webpages I created.

Hi there, its been a long time that InstaMusic haven’t been updated. Sorry for that because I had been so busy in working on a game project in my company. Anyway, I am quitting for the sake of pursuing a master degree. And finally I have time to implement what I thought up and designed!

An new application “InstaMusic Beta Channel” will show up in Android Play Store soon. This application aims to provide a cutting-edge version of InstaMusic. This app could be unstable, lots of force closes, however this helps me kill bugs in the program. For those who only wants a stable music playback, please download the original “InstaMusic”.

As a new version is coming out, I have created a feature list presenting the main improvements done or working on.

  1. Stability
    InstaMusic has been unstable for a long time. Music stops suddenly without telling. After a deep diagnosis, the core reason leading this bug is found, and a fix is patched! Music never stops now!
  2. Loading Speed
    Media loading speed has been a big concern for me while generating the music list. Long loading time affects user experience and might hinder other operations. Anyway, I have designed a new architecture specially for the list generation. This assured an optimised, low memory usage, synchronised and dynamic list generation.
  3. Jelly Bean Support (Working in Progress) 
    There are lots of new features and supports from platforms beginning from Android 4.0 such as notification controls and new theme styles. I am working on making use of those new features and to create a whole new user experience for users!
  4. Editable Playlists integrating with Favourite List (Working in Progress)
    In the next version of InstaMusic, Favorite List will be integrated into Playlist. The reason is… actually there is no reason to separate them lol.

Thank you for your supporting so far. Please comment below and tell me what you think on InstaMusic!

Today, I moved my nicholasworkshop.wordpress.com to my owned domain nicholasworkshop.com, integrated with my old portfolio website. Thanks to my subscribers, my blog has been having a steady viewing rate over time. However, all those traffics went to wordpress.com as the blog was hosted there. To redirect them back to my domain, I have been preparing the things needed for a long time.

As a record, I had my blog in BlogSpot and WordPress before, and now they are redirected to nicholasworkshop.

Anyways, it is finally here and thank you for checking out my blog!

%d bloggers like this: