How to set Python’s default version?

Changing the default python version system-wide would break some applications that depend on python2.

You can alias the commands in most shells, Mac OS X uses bash by default. If you also do, put this into your ~/.bash_profile:

alias python='python3'

python command now refers to python3. If you want the original python (that refers to python2), you can escape the alias i.e. doing \python will launch python2 leaving the alias untouched)

If you launch interpreters more often (I do), better is to:

alias 2='python2'
alias 3='python3'

Open a new shell session and these aliases will be available. If you want it to be effective in current session then you’ll have to source it:

source ~/.bash_profile

Tip for executable right way:

#!/usr/bin/env python

use:

#!/usr/bin/env python3

the system will use python3 for running python executables.

How to denied go back to Splash screen

Just simple Manifest.xml parameter do denied go back to splash screen or just kick from history for back android button.
To denied back button to previous activity you need to add this string to Manifest Activity.
android:noHistory="true"
Activity must be like that:

 

Cannot set LC_CTYPE to default locale: Solution!

Sometimes while I setup new server I have following errors:

And I have simple solution to fix this issue!
Continue reading “Cannot set LC_CTYPE to default locale: Solution!”

Get current path with Automator

Just little AppleScript to get current working path with Automator.

P.S. I wrote another note about it. But this note is better and more compact.

fluidPaginator jQuery Plugin

I’ve been looking for a nice paginator for one of my projects and found nothing intresting.
And yes I know about Paginator 3000, but I would like something new, in the end, I found Slider Pagination Concept by Mary Lou from tympanus, it was beautiful, but I do not want to include the jquery ui for one paginator, and I decided to do something similar, but simpler.
Continue reading “fluidPaginator jQuery Plugin”