kaj zna ruby::na::rails narediti za vas

  • sprogramira program v ruby ali objective-c
  • naredi kičasto spletišče namesto vas
  • svetuje pri razvoju in nameščanju Rails spletišč
  • sestavi namizno aplikacijo v Cocoa
  • izdela kičasto iPhone aplikacijo
  • razmišlja namesto vas, kadar rabite tehnološke možgane

lately

dan: 309, teden: 44 [04.11.08]

i have been doing lots of mac development lately. this summer i worked with cocoa core graphics and QTKit. i created some movie rendering software that can generate flashcard-like movies on the fly. but more lately, like now, i am finished developing an iPhone client application for koornk. well almost. there are many “pitfalls” if you are a slovenian iPhone developer. first, there is no slovenian iTunes Apple Store. it is kinda sad there is no way to sell slovenian apps. but it is good, because we have friends all over the world.

iphone development reality

dan: 303, teden: 43 [29.10.08]

i am currently developing an iphone client application for the social networking site called koornk.

working with xcode and apple tools in general makes me think, all this fancy stuff coming from apple is just a peace of fancy stuff.

we should have robust application development environments since ever, but I am just a slave, poor little freelancer, trying to keep up with all this fancy stuff.

I think programming in general needs to develop higher. I think we need to start thinking about the possibilites of programming our lives. with simple straight forward thinking. creating thoughts of beneficience for humanity and we could finally reach the stars we left behind billions of ages ago.

technology will unite the world, there is no doubt about it, but i think all this new age technology is just another blindfold for the masses.

how to install geoip_city gem on leopard

dan: 235, teden: 33 [22.08.08]

had some corners installing this gem on OSX 10.5.4.

first get geoip c API

then do this to install the api:

./configure
make
make check
make install

then install the gem like this:

install the GeoCity C library

tar xvfz GeoIP.tar.gz 
cd GeoIP
./configure
make && sudo make install

download the GeoLite City database

gzip -d GeoLiteCity.dat.gz

copy it into share:

/usr/local/share/GeoIP/GeoLiteCity.dat

install the geoip_city gem

sudo gem install geoip_city

if it fails, saying you have no GeoIP library installed… try this:

git clone git://github.com/ry/geoip-city.git 
cd geoip_city
export ARCHFLAGS="-arch i386" 
rake

don’t care for the failing tests but don’t forget to export the archflags and:

make install

this will install the C bindings in proper place

/usr/bin/install -c -m 0755 geoip_city.bundle /Library/Ruby/Site/1.8/universal-darwin9.0

now you can go and require ‘geoip_city’

čudežno launchctl mldonkey

dan: 083, teden: 11 [23.03.08]

naredil sem si fajl : /Library/LaunchDaemons/org.mldonkey.mlnet.plist

in vanj sem vtaknil nekaj takega… sedaj je prirejeno, če ti slučajno nucaš.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>org.mldonkey.mlnet</string>
    <key>Program</key>
    <string>/Users/tu_daj_svoj_username/tu_daj_pot_do_mlnet/mldonkey-distrib-2.9.3/mlnet</string>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>tu_daj_svoj_username</string>
    <key>WorkingDirectory</key>
    <string>/Users/tu_daj_svoj_username/.mldonkey/</string>
</dict>
</plist>
potem pa sem samo še izvedel ta ukazek

sudo launchctl load -w /Library/LaunchDaemons/org.mldonkey.mlnet.plist 

in zdaj se mi mlnet zaganja skoz. naj se davnlojdanje nadaljuje.

preden narediš multi site spletišče

dan: 082, teden: 11 [22.03.08]

hočeš narediti rails aplikacijo, ki bi bila sposobna obstajati na različnih domenah, ki si jih uporabniki sami zberejo. ali pa bi vsak uporabnik imel svojo subdomeno. recimo.

tedaj si je dobro pripraviti svoj lepi OS, da ti pomaga, za dober začetek, pri testiranju.

ker jaz ne bi za vsak testni primer delal zapiskov v /etc/hosts.

s takšnim zapiskom v /etc/hosts, bi lahko probaval samo 3 različne sajte na localhostu.

127.0.0.1 friend.fromhell.local
127.0.0.1 friend.justone.local
127.0.0.1 truper.fromhell.local

ne pa tudi tiste, ki bi si jih lahko kar sproti izmišljeval. recimo tulili.tulele.rails, potem pa recimo heh.eh.rails. hočem svobodo odločanja.

zato je mnogo bolje, če se pozanimam na google in naredim nekaj resnega. kot je na primer: local name server.

to sem naredil, potem sem naredil pa tole (na OSX Leopard):


kmak:~> $ sudo -s
bash-3.2# rndc-confgen > /etc/rndc.conf
bash-3.2# head -n5 /etc/rndc.conf |tail -n4 > /etc/rndc.key
bash-3.2# mate /etc/named.conf

na tem mestu sem v fajl named.conf pred “logging” zadegal tole:


zone "rails" IN {
    type master;
    file "rails.zone";
    allow-update { none; };
};

in to je zdaj naša zona. ali tisti string, ki je na koncu urlja. sedaj morem še povedat nekomu, da naj tole upošteva. v ta namen sem naredil še tole:


bash-3.2# cd /var/named/
bash-3.2# cp localhost.zone rails.zone
bash-3.2# mate rails.zone

v tem fajlu sem le preimenoval eno pojavitev niza localhost v niz rails. tam pri ORIGIN. potem pa dodal zadnjo vrstico.


$TTL    86400
$ORIGIN rails.
@            1D IN SOA    @ root (
                    42        ; serial (d. adams)
                    3H        ; refresh
                    15M        ; retry
                    1W        ; expiry
                    1D )        ; minimum

            1D IN NS    @
            1D IN A        127.0.0.1

* IN A 127.0.0.1

zadnja vrstica nazorno prikaže, da bodo vsi dostopi do domen z obliko subdomena.domena.rails, preusmerjeni na localhost. hehe.

dalje, priročno uporabim program, ki dela čudeže, a ima neizgovorljivo ime : launchctl.


bash-3.2# launchctl load -w /System/Library/LaunchDaemons/org.isc.named.plist
bash-3.2# exit

sedaj bo OSX vedno nalagal tole zadevo, tudi ko reštartam.

edino, in res zadnje, ostane, da za vsako TCP/IP povezavo dodaš DNS server z naslednjo IP

127.0.0.1

ja res.

to lahko narediš, če greš na črno japko, pa na System Preferences, pa na Network. in tam greš čez željene povezave in nastaviš pod DNS.

ta članek sem radostno povzel po setting up local name server on mac os x.

meni je delalo takoj. naj še tebi.