check out my new blog at gmarik.info/blog

Thursday, April 02, 2009

moved to gmarik.info

This blog will stay but won't be updated.

I've moved to gmarik.info

Update your bookmarks! :)

 check out my new blog at gmarik.info/blog

Friday, January 02, 2009

Code snippets - gists

If you collaborate and share code snippets you may like gist.sh

Description:

Bash script for getting/posting code snippets (gists) to/from http://gist.github.com


Usage

* Getting gist.sh:

$ curl http://github.com/gmarik/gist.sh/raw/master/gist.sh > gist.sh && chmod 755 gist.sh && sudo mv gist.sh /usr/local/bin/

* Posting to GitHub:

$ cat file | gist.sh

or

$ gist.sh < fileĀ·

* Getting from GitHub:

$ gist.sh 1234

Labels: , , , , , , ,

 check out my new blog at gmarik.info/blog

Monday, December 22, 2008

Moved to log.gmarik.info

Since now this blog is accessible at log.gmarik.info !

Log:

  1. registered a domain with google apps
  2. Disabled both Sites and Start Page services using google apps Service settings (to avoid nasty Another blog is already hosted at this address error)
  3. used www.gmarik.info as domain name for custom domain name (advanced mode in blogger.com blog's Settings/Publishing )


Nice!

PS: access google apps domain managing dashboard at www.google.com/a/your_domain_name

Labels: , ,

 check out my new blog at gmarik.info/blog

Tuesday, November 25, 2008

Linux howto: Enable Java runtime in Firefox

You need to
1) have jre installed
2) Edit > Preferences / [ Content ] tab: [ ] Enable Java checkbox checked
3)
$ cd /path/to/firefox/plugins
$ ln -s /path/to/java/jre/plugin/i386/ns7/libjavaplugin_oji.so ./
4) test

source

PS:
running .jnlp apps:
$ $JAVA_HOME/bin/javaws ./app.jnlp

Labels: , , , ,

 check out my new blog at gmarik.info/blog

Monday, November 10, 2008

Ubuntu: sysv-rc-conf - missing admin tool

I'm coming from RedHat school.
After switching to Ubuntu I missed chkconfig tool for managing services.

But Ubuntu provides same managing interface with sysv-rc-conf instead.

$sudo apt-get install sysv-rc-conf

Nice!

Labels: , ,

 check out my new blog at gmarik.info/blog

Wednesday, October 29, 2008

Peoplenet on Ubuntu Linux

I've got CCU-550(3G/UMTS) modem.
I've never installed modems on Linux before so I just hoped that newest distros have right tools to do that.

I wanted to start using it quickly therefore began with NetworkManager's PointToPoint connection option. But it didn't want to work...

Then I looked at pppd stcripts. But it didn't work for me either...

At that point I didn't have internet access so the only option i could progress with was reading man pages for wvdial.

Interesting what man page says about wvdial - PPP dialer with built-in intelligence.
And it turned out to be true :)

So i launched
$man 5 wvdial.conf


copied sample configuration to /etc/wvdial.conf and modified to look like:
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init = ATZ
Phone = #777
Username = 80921111111@people.net.ua
Password = 111111


To get the proper Modem location i did:
$dmesg |grep tty
[ 164.384650] cdc_acm 2-1:1.0: ttyACM0: USB ACM device


Then launching:
$wvdial


I got it working:

$ ifconfig |\grep -A 1 ppp
ppp0 Link encap:Point-to-Point Protocol
inet addr:my.ip.addr.ess P-t-P:pp.ip.addr.ess Mask:255.255.255.255


Wow! Nice! :)

Labels: , , , , , , ,

 check out my new blog at gmarik.info/blog

Saturday, October 25, 2008

using rake with sudo

I was installing datamapper gems like:
gmarik@gm:master\dm-more.git$ sudo rake install
sudo: rake: command not found

sudo restricts environment settins:
$ sudo env|\grep PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin

As you can see rake path is not included:
$ which rake
/usr/local/lib/ruby/gems/bin/rake

You can edit sudo PATH to include /usr/local/lib/ruby/gems/bin.
=== UPDATED AT 2008.12.04 =====
or run rake with PATH set like:
sudo env PATH=$PATH rake

===============================
Bu i just symlinked rake:
$sudo ln -s `which rake` /usr/local/bin/

Now it works:
$ sudo rake --version
rake, version 0.8.3

Labels: , ,