Nice backgrounds

January 23rd, 2011 costis

http://nardoxic.deviantart.com/art/Classic-Wood-132248439

Mac, Unix, Vista

November 12th, 2010 costis

macvsunixvsvista_thumb

MYSQL Create User and Assign Privileges

October 31st, 2010 costis

GRANT ALL ON mydb.* to ‘myuser’@'myhost’ identified by ‘mypassword’;

Πως καταλαβαίνουμε το φρέσκο ψάρι

October 17th, 2010 costis
  • “Νωπό” ψάρι είναι το φρεσκότατο
  • “Φρέσκο” λέγετα αυτο που είναι είναι μέχρι και 5 ημέρων
  • Οταν το ζουλάμε θα πρέπει το δέρμα να επανέρχεται (νεκρική ακαμψία)
  • Οταν χαιδεύουμε τα βρόγχια με το δάχκτυλο, δε πρέπει να μυρίζει ψαρίλα αλλά ιώδιο. Το ψάρι δε μυρίζει ψαρίλα!
  • Οταν χαιδεύουμε την σάρκα με την παλάμη μας θα πρέπει να αισθανόμαστε μια γλύτσα.

Βοδινή Ουρά κοκκινιστή

October 17th, 2010 costis
  • Τσιγαρίζουμε την βοδινή ουρά σε ελαιόλαδο
  • Ριχνουμε ψιλοκομμέ κρεμύδι
  • Ρίχνουμε ντομάτα τριμμένη + κονκασέ + 1 κουταλιά πελτέ ντομάτας
  • Ριχνουμε 1 ποτηράκι κόκκινο κρασί
  • Ρίχνουμε μισό πορτοκάλι κομμένο στα δύο (ώπα πατέντα)
  • 2 κλαράκια κανέλλα
  • Μπούκοβο
  • Αλατι
  • Ολιγον τι νερό
  • … και τα βράζουμε για 2-2.5 ώρες

    Enable MySQL query log file

    September 26th, 2010 costis

    Add the following to my.cnf (linux) or my.ini (win). By default, under windows my.ini is at MySQL’s installation dir

    general_log=1
    general_log_file=c:\mysql.log

    general_log=1
    general_log_file=c:\mysql.log (or wherever you want)

    My Vim quick refcard

    September 10th, 2010 costis

    Color Scheme: Wombat

    Search Replace whole file with confirm
    :%s/search/replace/gc

    Ctags for drupal
    ctags –langmap=php:.engine.inc.module.theme.php –php-kinds=cdfi –languages=php –recurse
    and read this: http://stackoverflow.com/questions/563616/vimctags-tips-and-tricks

    Line Wrap
    :set wrap, :set nowrap

    Buffers
    list them with :ls, switch by number with :b1, b2 etc
    remove document from buffer list with: bdelete 1, or bdelete foo.txt

    Jumplist (navigation)
    go back with Ctrl-O or Ctrl-T if you used a tag, go forward with Ctrl-I
    set a mark with m[letter] and go there with ‘[letter], eg ma,  ’a
    go to last edited position with ‘.

    CD to current file’s directory
    :cd %:h

    Install minbufExplorer plugin and NERDTree:

    http://www.vim.org/scripts/script.php?script_id=159

    Move current line to screen position:
    zz = center
    zt = top
    zb = bottom

    Copy/Paste
    yy = yank current line
    y$ = yank to end of line
    y’x = yank from current line to mark x
    “ayy = yank current line to buffer “a”
    “ap = paste contents of buffer “a”
    p = paste to right or cursor
    P=paste to left of cursor

    Basic Movement

    <C-F> Move the cursor forward by a screenful of text
    <C-B> Move the cursor backward by a screenful of text
    G Move the cursor to the end of the file
    numG Move the cursor line num. (For instance, 10G moves to line 10.)
    gg Move the cursor to the beginning of the file
    H Move the cursor to the top of the screen.
    M Move the cursor to the middle of the screen.
    L Move the cursor to the bottom of the screen.
    * Read the string under the cursor and go to the next place it appears. (For instance, if your cursor was somewhere on the word “bob,” the cursor would move to the next occurance of “bob” in your file.)
    # Same as above, except it moves the cursor to the previousoccurance.
    /text Starting from the cursor, find the next occurance of the stringtext and go to it. You will need to press Enter to execute the search. To re-execute your last search, type n (for next occurance).
    ?text Same as /, but searches in the opposite direction.
    ma Make a bookmark named a at the current cursor position. A bookmark can be named any lowercase letter. You can’t see the bookmark, but it’s there!
    `a Go to bookmark a. Important: that’s a backtick, not a single quote. The backtick is located to the left of the 1 on most keyboards.
    `. Go to the line that you last edited. This is very useful! If you need to scroll through the file to look something up, you can go back to where you were without bookmarking it by using the `.command.

    Flow chart for project decision making

    August 2nd, 2010 costis

    Flow chart for project decision making

    At last a fix for Ubuntu and VMWare keyboard issues

    April 16th, 2010 costis

    This guy saved us: http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html

    Also, use this http://tipstank.com/2010/05/23/solve-eclipse-black-pop-up-code-assist-box-in-ubuntu-10-4-lucid/ if you have issues with Ubuntu 10.x dark color tooltips and eclipse.

    Eclipse dark color theme (that works for me)

    April 10th, 2010 costis

    http://blog.prabir.me/post/Dark-Eclipse-Theme.aspx