Punk Because we are

25Apr/090

The official pySM (python server managem…

The official pySM (python server management) website is finally online an can be visited at http://www.pysm.be

I finally managed to finalize the webserver as an beta version and am currently working on a template system for the frontend.

The current template can also be seen on the pySM website.

I know, this was a short post, just to keep you all informed, but I promise i'll be back soon with more.

With kind regards,
Tim

11Apr/092

Archlinux: ATI Mobility Radeon X1400 and Xorg

It was a pain in the ass to get my ATI Mobility Radeon X1400 up and running on my archlinux laptop with the latest versions of Xorg, but I managed to get there in three easy steps. (in the end)

1. Download and install the propetiery driver (ATI Catalyst) matching your ATI card (AMD Support Search)

  • Go to your download folder in terminal
  • chmod +x ati-driver-installer-........
  • ./ati-driver-installer-
  • Don't forget to do all this as root!

2. run hwd -xa, this is actually an archlinux only command for as far I know. But for those not running archlinux I'll add my xorg.conf file later on.

3. run aticonfig --initial

    All you have to do now is restart X.
    You can check with fglrxinfo if your installation was a success.

    [tim@Haven ~]$ fglrxinfo
    display: :0.0 screen: 0
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: ATI Mobility Radeon X1400
    OpenGL version string: 2.1.8543 Release

    My xorg.conf

    # Auto-generated by Archie mkxcfg
    # Auto-generated by Archie mkxcfg

    Section "ServerLayout"

    # PS/2 Mouse not detected
    # Serial Mouse not detected
    Identifier "Xorg Configured"
    Screen 0 "aticonfig-Screen[0]-0" 0 0
    InputDevice "Keyboard0" "CoreKeyboard"
    InputDevice "Logitech MX510" "CorePointer"
    EndSection

    Section "Files"

    # Additional fonts: Locale, Gimp, TTF...
    # FontPath "/usr/share/lib/X11/fonts/latin2/75dpi"
    # FontPath "/usr/share/lib/X11/fonts/latin2/100dpi"
    # True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc:unscaled"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/100dpi"
    FontPath "/usr/share/fonts/PEX"
    FontPath "/usr/share/fonts/cyrillic"
    FontPath "/usr/share/fonts/Type1"
    FontPath "/usr/share/fonts/ttf/western"
    FontPath "/usr/share/fonts/ttf/decoratives"
    FontPath "/usr/share/fonts/truetype"
    FontPath "/usr/share/fonts/truetype/openoffice"
    FontPath "/usr/share/fonts/truetype/ttf-bitstream-vera"
    FontPath "/usr/share/fonts/latex-ttf-fonts"
    FontPath "/usr/share/fonts/defoma/CID"
    FontPath "/usr/share/fonts/defoma/TrueType"
    EndSection

    Section "Module"
    Load "ddc" # ddc probing of monitor
    Load "dbe"
    Load "dri"
    Load "extmod"
    Load "glx"
    Load "bitmap" # bitmap-fonts
    Load "type1"
    Load "freetype"
    Load "record"
    # Load "synaptics"
    EndSection

    Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    Option "AutoAddDevices" "False"
    EndSection

    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "keyboard"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "be"
    Option "XkbVariant" ""
    EndSection

    Section "InputDevice"
    Identifier "Serial Mouse"
    Driver "mouse"
    Option "Protocol" "Microsoft"
    Option "Device" "/dev/ttyS0"
    Option "Emulate3Buttons" "true"
    Option "Emulate3Timeout" "70"
    Option "SendCoreEvents" "true"
    EndSection

    Section "InputDevice"
    Identifier "PS/2 Mouse"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "ZAxisMapping" "4 5"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons" "true"
    Option "Emulate3Timeout" "70"
    Option "SendCoreEvents" "true"
    EndSection

    Section "InputDevice"
    Identifier "Logitech MX510"
    Driver "mouse"
    Option "Device" "/dev/input/mice" # (cat /proc/bus/input/devices)
    Option "Name" "Logitech MX510"
    Option "ZAxisMApping" "4 5"
    Option "Protocol" "ExplorerPS/2"
    Option "Buttons" "7"
    Option "ZAxisMapping" "6 7"
    Option "Emulate3Buttons" "no"
    EndSection

    Section "Monitor"
    Identifier "aticonfig-Monitor[0]-0"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"
    EndSection

    Section "Device"
    Identifier "aticonfig-Device[0]-0"
    Driver "fglrx"
    BusID "PCI:1:0:0"
    EndSection

    Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device "aticonfig-Device[0]-0"
    Monitor "aticonfig-Monitor[0]-0"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection

    Section "Screen"
    Identifier "Default Screen"
    Device "Intel Corporation 82852/855GM Integrated Graphics Device"
    Monitor "Generic Monitor"
    Defaultdepth 24
    SubSection "Display"
    Depth 24
    Virtual 2304 1792
    Modes "1280x1024@75" "1024x768@60"
    EndSubSection
    EndSection

    Section "DRI"
    Mode 0666
    EndSection

    Cheers,
    Tim

    11Apr/090

    Mogrify: Batch resizing pictures in linux

    We all came across this problem at least once in our lifetime. You have a whole bunch pictures but you can't find the time to resize all of them one by one. Wel linux has an easy (and lite) way to do all off this in notime, all you need is Mogrify. Imagemagick Mogrify is an easy to use, ligte, command prompt tool and capable of editting most of the image types. If you want to force-resize all your .jpg images  ignoring the images width-height ratio to  100x100 all you have to do is

    mogrify -resize 100×100! *.jpg

    If you want to resize all your .jpg images respecting the width-height ratio to an width of 640 px all you have to is

    mogrify -resize 640 *.jpg

    Note: Make sure you are executing this in the right folder. otherwise you'll have to adjust the path of *.jpg.

    mogrify -resize 640 /home/<user>/images/myOhSoCoolAlbum/*.jpg

    Cheers, Tim

    11Apr/090

    pySM frontend

    I know, I know...

    It has been a long time since I've posted an update here but hey, no one is perfect :D
    Altough I had no time to post, I did have the time to program a little more on pySM.

    The progress I've made in these few days is magnificent. I've managed to write a simple config interface and totally excited by the fact how easy it is to implement this "shizzle" with python, the fact I've made a configparser package makes it really easy for me to implement an config xml based configparser.

    Jeej for python...

    Yesterday I've also finished an basic webserver with basic functions. this way I can easy determine what page the user requires and reply with the right page, I still have some work remaining on this part. Also, I still have to make the webserver modular so it can be easily used in other projects.

    For now, I'm still wondering what I'll use as template manager or maybe write my own for easy webpage generation based on the server info. I'm also trying to find an easy way to load modules dynamically.

    Anyhow, Lot's of progress has been made but we aren't there yet...

    Cheers,
    Tim

    1Apr/090

    Z-index van AS3

    Ongelooflijk vervelend, een movieclip komt onder een massief vlak te staan.

    Door setChildIndex kunnen we de volgorde van een movieclip bepalen.

    setChildIndex(this.movieclip, 0);

    Hier staat this.movieclip voor het aan te passen movieclip en staat de 0 voor de hoogte.

    Happy flashing...

    Filed under: Flash No Comments
    1Apr/090

    Flash Embedded in HTML

    This I found at http://www.w3schools.com. This might come in quite handy some day

    Flash Embedded in HTML

    After creating a Flash movie you choose File > Save As from the top menu to save your movie. Save the file as "Somefilename.fla".

    To embed the Flash movie you just made into an HTML page, you should go back to your Flash program and do the following steps:

    Step 1
    Choose File > Open. Open a Flash movie you have created.

    Step 2
    Choose File > Export Movie.

    Step 3
    Name the file "somefilename.swf". Choose the location where the file is to be stored (in your Web folder). Click OK.

    Step 4
    Open the HTML page where you want to insert your Flash movie. Insert this code:<object width="550" height="400">
    <param name="movie" value="somefilename.swf">
    <embed src="somefilename.swf" width="550" height="400">
    </embed>
    </object>

    Note: This is the minimum code you need to embed a Flash movie in a browser. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.

    Note: In the code above there is both an <embed> tag and an <object> tag. This is because the <object> tag is recognized by Internet Explorer, and Netscape recognizes the <embed> tag and ignores the <object> tag.

    Step 5
    Type in the address of the HTML file in your browser and look at your first Flash movie.
    Let the Flash Program do the Work

    The code above is the absolute minimum code to embed Flash movies in HTML pages. It is not recommended to use the minimum code. There should be a few more attributes added:
    classid is an attribute to the <object> tag. It tells Internet Explorer to load the ActiveX plug-in if it is not installed
    pluginspage is an attribute to the <embed> tag. It displays a link to the Shockwave download page if Netscape does not have it

    The Flash program can add these attributes for you:

    Step 1
    Choose File > Publish. Flash will now create the <object>, <param>, and <embed> tags for you. It will also create the classid and pluginspage attributes.

    Step 2
    Open the HTML document that Flash created, view the HTML source and copy the code into your HTML page where you want your Flash movie.

    Step 3
    Be sure that you have the "somefilename.swf" in your Web folder.

    Step 4
    Type in the address of the HTML file in your browser and look at your first Flash movie.

    Tagged as: , No Comments
    28Mar/090

    AS3: Seekbar

    Last time I had to make en seekbar for a movie player and I stumble on some problems with showing the movie progress.

    In this case I named the seekbar seeker and to change the progress you have to change the seeker.progress_mc.width. But after changing the width I was unable to use the click event to change to a future point in the movie.

    This is how I fixed this:
    In order to keep it clickable i've openend the seekbar movieclip and added an movieclip wich I made transparent and gave it a size of 1px by 1px and named it overLay.

    Then I added this piece of actionscript in the seekbar movieclip. this way I  was able to put the event on the overlay.

    overLay.width = progress_mc.width;
    overLay.height = progress_mc.height;
    overLay.x = progress_mc.x;
    overLay.y = progress_mc.y;

    When this little modification was over I've finished the seekbar with this code (to make it clickable)


    seeker.overLay.addEventListener(MouseEvent.MOUSE_UP, seekerEventDragStop);

    function seekerEventDragStop(event:Event):void {
    drag = false;
    seeker.progress_mc.width = seeker.mouseX;
    }

    I hope It helped you out a little...

    Filed under: Flash No Comments
    22Feb/090

    Helpdesk at fom

    Last weekend I've spent my time as an help-desk employee in wieze for an lan-party (Frag-O-Matic). During a chat session on irc I was unexpectedly surprised with a good laugh. Here's how it went (in case you are wondering, I'm Lapino) :

    15:42 Tokke • kan er iemand prive het ip geven van "u know what"
    15:42 tourist • hehe
    15:42 Doetje • van mijn blocktrix server?
    15:42 @Lapino • tertrinet?
    15:43 @FoM|Musti • wat is tertrinet,
    15:43 @FoM|Musti • ?
    15:43 Tokke • lol
    15:44 • Maron [FoM_Mustek@172.16.2.192] has quit IRC
    15:44 • Maron [FoM_Mustek@172.16.2.192] has joined #fom
    15:44 • Maron [FoM_Mustek@172.16.2.192] has left #fom
    15:44 tourist • lol
    15:44 @FoM|Musti • ik krijg da voorvoegsel nie weg
    15:44 Tokke • people ip plz
    15:45 • tourist [tourist@172.16.64.33] has quit IRC
    15:45 @Lapino • 127.0.0.1
    15:45 Tokke • connection refused
    15:45 @FoM|Musti • rofl

    Tagged as: , , No Comments
    19Feb/090

    pySM

    pySM is an open source project by me, Mathias and Michel. We've managed to link the development to our school project, thereby increasing the chances of actually finishing the project to an excellent product.

    More about pySM

    pySM is short for python Server Management. Meaningless to say, we're building the project on python code.

    We'll try to make an easy and up-to-date tool to manage your personal (or professional - later) server in a plesk-like way. We will try to make a modular system for basic (and simple) support. The main goal for us is to develop a stable and good backbone so the community (yes, you guys!) can help us by adding extra modules for the services you'd like to see supported.

    pySM goals

    • Easy to maintain
    • Modular
    • Free and Open Source
    • At least similar functionality as plesk (And better!)
    • File based configuration (vs the database way)

    These are the goals as we're looking at it right now. They _will_ change in the future, certainly with your help.

    So, we'll see you at first release date,
    Tim.

    19Feb/090

    Welcome

    Hereby I declare Punk.be for opened.

    *Lot's of cheering*

    I was in Vegas last week. I was at the roulette table, having a lengthy
    argument about what I considered an Odd number.
                    -- Steven Wright

    What I'm Doing...

    Posting tweet...