1. Restarting Percona MySQL does not work: how to fix

    $ sudo cat /etc/mysql/debian.cnf

    # Automatically generated for Debian scripts. DO NOT TOUCH!
    host     = localhost
    user     = debian-sys-maint
    password = qwer1234
    socket   = /var/run/mysqld/mysqld.sock
    host     = localhost
    user     = debian-sys-maint
    password = qwer1234
    socket   = /var/run/mysqld/mysqld.sock
    basedir  = /usr

    >  SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('qwer1234');
    >  QUIT


    6 months ago  /  0 notes

  2. For linux users: man with colors

    It marks a before and an after: http://nion.modprobe.de/blog/archives/569-colored-manpages.html

    8 months ago  /  0 notes

  3. Reinstalling your Linux without having to remember all the packages

    On old system:

    dpkg —get-selections > installed-software

    On new system:

    dpkg —set-selections < installed-software dselect

    Done! Get a beer.

    9 months ago  /  0 notes

  4. Regular expressions are so sexy!

    How to turn this:

    'url' => 'http://www.crackle.com.mx',
    'strRef' => 'http://www.crackle.com.mx/',
    'strAdServer' => $this->strAdServer,
    'fFreewheelLive' => '0',
    'strSubtitleServer' => 'http://images-es-az.crackle.com',
    'fFWClassify' => "1",
    'id' => "219",
    'name' => $this->playerName,
    'fAutoPlay' => "1",
    'fEnableClickOnVideo' => "0",
    'strAdPattern' => "av",
    'fShowWatermark' => "0",
    'fShowSDPlaybackOnly' => "0",
    'fShowShare' => "0",
    'fShowInfo' => "1",
    'fShowPublish' => "1",
    'fShowBuyItNow' => "0",
    'fShowFlagButton' => "0",
    'fShowFullScreen' => "1",
    'fShowVolume' => "1",
    'fShowScrubber' => "1",
    'fEnableSeek' => "1",
    'fEnablePostrollCountdown' => "1",
    'fAllowInternal' => "1",
    'strRtmpCdnUrl' => "cp151802.edgefcs.net/ondemand/crackle",
    'strWideVineHost' => "media-wv-es-am.crackle.com",
    'strAdSite' => "cr.crack",
    'partner_id' => "20",
    'nScrubberForgiveness' => "30",
    'strCdnImageServer' => "http://images-es-az.crackle.com",
    'strCdnMediaImageServer' => "http://images-es-am.crackle.com"

    into this:

    'url' => $this->url,
    'strRef' => $this->strRef,
    'strAdServer' => $this->strAdServer,
    'fFreewheelLive' => $this->fFreewheelLive,
    'strSubtitleServer' => $this->strSubtitleServer,
    'fFWClassify' => $this->fFWClassify,
    'id' => $this->id,
    'name' => $this->name,
    'fAutoPlay' => $this->fAutoPlay,
    'fEnableClickOnVideo' => $this->fEnableClickOnVideo,
    'strAdPattern' => $this->strAdPattern,
    'fShowWatermark' => $this->fShowWatermark,
    'fShowSDPlaybackOnly' => $this->fShowSDPlaybackOnly,
    'fShowShare' => $this->fShowShare,
    'fShowInfo' => $this->fShowInfo,
    'fShowPublish' => $this->fShowPublish,
    'fShowBuyItNow' => $this->fShowBuyItNow,
    'fShowFlagButton' => $this->fShowFlagButton,
    'fShowFullScreen' => $this->fShowFullScreen,
    'fShowVolume' => $this->fShowVolume,
    'fShowScrubber' => $this->fShowScrubber,
    'fEnableSeek' => $this->fEnableSeek,
    'fEnablePostrollCountdown' => $this->fEnablePostrollCountdown,
    'fAllowInternal' => $this->fAllowInternal,
    'strRtmpCdnUrl' => $this->strRtmpCdnUrl,
    'strWideVineHost' => $this->strWideVineHost,
    'strAdSite' => $this->strAdSite,
    'partner_id' => $this->partner_id,
    'nScrubberForgiveness' => $this->nScrubberForgiveness,
    'strCdnImageServer' => $this->strCdnImageServer,
    'strCdnMediaImageServer' => $this->strCdnMediaImageServer

    search this: ‘([a-zA-Z_]*)’ => ([a-z\s\$”’:/.->-]*)
    replace by this: ‘$1’ => \$this->$1

    Love ‘em.

    10 months ago  /  0 notes

  5. So true.

    So true.

    (via shangabrielle)

    1 year ago  /  16,118 notes

  6. pollolivera:




    1 year ago  /  30 notes

  7. Ya quisieran las mias tener rayos

    Ya quisieran las mias tener rayos

    (Source: gabeeintheskywithdiamonds)

    1 year ago  /  9 notes

  8. Getting “Symbolic link not allowed or link target not accessible” while configuring Apache?

    Reconfiguring my dev environment, I decided to change the location of my local web server directories, from /var/www to ~/, so that I could just backup my Home folder, and I’d only need to set some symbolic links when restoring or reinstalling my OS.

    The problem arised when I did in fact move all to ~/, configured symbolic links, and I was still getting “Symbolic link not allowed or link target not accessible” in my Apache 2 logs.

    Long story short, I had to add execute permission to /home/lobo to www-data user. That allows the os to CD to /home/lobo/mysite. So:

    chown :www-data /home/lobo

    chmod g+x /home/lobo

    That did the trick!


    The fact is that you need permission to CD to the whole path. Doing sudo su www-data and cd’ing /home then /home/lobo throwed the error, then added the necessary permissions to “lobo” and finally inner folders so that Apache could work with them (755 to all directories and below works).

    1 year ago  /  0 notes

  9. byobu (screen) stopped working. Here’s how I solved it!

    My byobu was working ok until a couple of days.

    it closed the very second i started it, saying [screen is terminating].

    I had to remove it since it didn’t allow me to use my terminals.

    Steps to solve my situation:

    1. add to “/etc/fstab” this line: “none /dev/pts devpts defaults 0 0”
    2. reboot
    3. open byobu (or screen)
    4. a page that made me press return or space to continue appeared. Apparently, this was stoping byobu from working.
    5. removed the line added in step 1
    6. reboot
    7. now we are working again, with byobu

    This page helped me to know which command to use: http://forum.slicehost.com/index.php?p=/discussion/2577/screen-no-more-ptys/p1

    The fact that a confirmation “screen” appeared after starting byobu, made me think of this halting byobu on the first time.

    1 year ago  /  0 notes

  10. Running “good citizen” Yii Console Commands

    When you run a website, that has commands running using cron, you should run your commands as the same user as your website (ex: apache, www-data).

    Here’s a simple how-to:

    1. give access to www-data to execute yiic
    2. run yiic through /etc/crontab, not via “root“‘s crontab (the one you configure running crontab -e). This /etc/crontab has a new column for the username, so you can run commands via www-data

    my /etc/crontab says:

    */1 * * * * www-data /bin/scripts/sendMail.sh> /dev/null

    Of course, you have to give access to www-data  to run sendMail.sh

    1 year ago  /  0 notes