Explanation: pipe “.dump” to sqlite and use that output (the dump itself) to fill the new.db database.
]]>After this is done you can do:
git push -f
It says some scary things like:
# Your branch and 'origin/v3' have diverged, # and have 75 and 75 different commits each, respectively.
But you can Ignore those.
]]>A more complete example:
$adapter = Mage::getSingleton('core/resource')->getConnection('core_write');
$adapter->getProfiler()->setEnabled(true); //enable profiler
// Do database stuff
$number = 10;
$profiles = $adapter->getProfiler()->getQueryProfiles();
$profiles = array_slice($profiles, count($profiles)-$number, $number);
foreach ($profiles as $profile) {
$query = $profile->getQuery(); //print last executed query
foreach ($profile->getQueryParams() as $k => $v) {
$query = $query = str_replace($k, "'{$v}'", $query);
$query = preg_replace('/\?/', $v, $query);
}
var_dump($query);
}
]]>git add -u
This only adds already commited files to a new commit. And leaves files not in the git repository alone.
]]>loaded 937 snippets >>> import distutils Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named distutils
This is how I solved it:
Edited ~/.local/share/applications/sublime.desktop
Especially this line:
Exec="/home/leon/Software/bin/sublime" %U
/home/leon/Software/bin/sublime contains this:
#!/bin/bash cd /usr/lib/python2.7 /home/leon/Software/SublimeText2/sublime_text
Then I installed some excellent plugins:
]]>So I purged them with the help of this blog.
I compiled evolution with the help of a Makefile that I downloaded.
I had to add the “maverick” distro and install some additional packages such as:
I removed the evolution-exchange plugin.
The master branch of gweather required gtk3 so I changed that to: gnome-2.30 (or something)
I had to apply a patch to solve a build error.
Bottom of this post: http://www.mail-archive.com/[email protected]/msg03863.html
I really, really don’t want to work with it ever again and I regret that I chose ZF for this particular project just because of the db layer.
]]>./pear upgrade --force magento-core/Mage_All_Latest]]>
There’s also a wiki about this new feature from Ubuntu. I thought about creating a plugin for weechat that uses this library. Especially because the notify-plugins is useless if you’re away and somebody mentions you on irc. Libindicate would be perfect for this. First have to find out how the behaviour of the applet would be.
[update]
I asked my question on the libindicate launchpad so I’m very curious about the answer(s).
[/update]
![]()
For Ruby I use netbeans. I would also like to use it for php but it doesn’t allow to quicly open a file via ftp/scp or whatever. And it can sometimes be sloooooowwww. I’ve seen netbeans used on a Windows platform and there it is much faster.
When I right-click on a project in netbeans for the first time, it takes 5 seconds (not lying!) to render the popup-menu. Come onm take forever!
And because I was now developing with Python I decided to try a new editor. Something more hardcore and lighter. Something nerdy
So ofcourse I only have two decent options: Vim & Emacs.
I already had try them with Ruby. But I found good Ruby (& Rails) support rather lacking by both of them. I believe that the python comminity is more hardcore and therefore are using more arcane editors
And maybe because they aren’t afraid to hack away in another language than their own (lisp, vimscript).
I think I have been comparing the two editors for nearly two weeks now. I have spent hours and hours comparing, trying and browsing for blog posts about the two. At the end, I really didn’t know which one to choose. I really suck at deciding something
So I made a little list of what I find to be strong points of each editor:
VIM:
EMACS:
And now I have chosen to be the editor with which I am going to work is…… (drum roll please) …….:
Gedit!
No, it’s (g)Vim
And while writing this article I was looking for a WordPress/blog plugin for Vim and Emacs. At a glance it looked like the wordpress plugin for Emacs was a little bit better. So already I was doubting my decision… So it could be that I switch editor in the next few months
But I’m first going to really use gvim to see if it fits with my workflow and is really useable for me.
As cherry on the pie, a nice screenshot of my gvim in action:
[update]
I’ve installed Netneans 6.8m2 and it feels a lot faster than 6.7 but python completion is as bad as in 6.7.
[/update]
[update2]
Found out about Vim’s netrw. So Emacs no longer got “Directory browser/editor” as a strong point.
[/update2]
The new Pmpd project (looking for a better name) can be found on github. The hardest part so far is having to restructure the sources. Python is not a difficult language to master at all but I’m very picky on how everything fits together. My ruby project felt right on that part. But the python equivelant has some things I just don’t like enough up to now.
]]>So hereby I present to you: a fixed Phoogle files which is hacked decent.
]]>One of them is that they want to save a field in the database that contains a unique identification number for the secondhand cars they sell. But this number is set-up in a way that is unique to BMW’s. So actually, I didn’t want to add this column to the database, ’cause that will mess up my clean database tables.
But then I came up with the idea to add functionality to the website where users (dealers in this case) can add custom columns to their cars / profiles.
Instead of creating this functionality from scratch, I first wanted to know if there are any plugins that have this functionality already. I found these three:
I haven’t decided (yet) which is best.
And if you want to roll your own, here’s a nice article about choosing the best structure for dynamic fields.
I realize that the story above is written in truly horrible English. But I really didn’t have the energy to make something nice of it…
]]>sudo aptitude install ant openjdk-6-jdk cd ~/src svn co http://svn.codehaus.org/jruby/trunk/jruby/ cd jruby ant bin/jruby --version]]>
It shows all of my github projects. I directly turned it into a plugin for you to enjoy. You can download and read the documentation in the wordpress plugin directory.
]]>But, I have to finish a project this week and merb/datamapper is not just stable yet, has less documentation, less plugins, less helpers and less features.
For example, the “has and belongs to many” association in datamapper isn’t fully implemented (look a the tests). There are some nice backend generators for Rails. And if you have to finish a project in too little time, it’s a quick decision.
I know, I could also make/fix this stuff for merb and datamapper myself and I would love to. But there just isn’t enough time! Aaarghhh…
]]>capify .
And used this deploy.rb
Then to setup the current, releases, etc. directories:
cap deploy:setup
Then, when I tried to login via ssh with shared key: nothing!
After some searching I found out that capistrano messed up the permissions on the .ssh directory
To fix it:
chmod 755 $HOME chmod 755 $HOME/.ssh chmod 644 $HOME/.ssh/authorized_keys]]>
Especially Sifter looks really nice! But… it isn’t open source. So too bad. I went with Redmine: open source, ruby on rails and already a nice feature set!
A nice overview of bug/issue tracking systems can be found on wikipedia.
]]>I’m a real sucker for nice message boxes. If you are too: this is a must-read.
![]()
sudo apt-get update sudo apt-get build-dep vpnc sudo apt-get install libssl-dev mkdir ~/src/vpnc -p cd ~/src/vpnc apt-get source vpnc cd vpnc-* dpkg-buildpackage sudo dpkg -i ../vpnc*.deb
Et voila: vpnc with openssl!
]]>And while I was doing that I also decided to install guessnet from Intrepid. So I don’t have to compile guessnet anymore.
It involves two steps:
Create /etc/apt/sources.list.d/intrepid.list and copy the following code into it:
deb http://nl.archive.ubuntu.com/ubuntu/ intrepid main restricted multiverse deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://nl.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted multiverse deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://nl.archive.ubuntu.com/ubuntu/ intrepid universe deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid universe deb http://nl.archive.ubuntu.com/ubuntu/ intrepid-updates universe deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. ## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://nl.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse # deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. This software is not part of Ubuntu, but is ## offered by Canonical and the respective vendors as a service to Ubuntu ## users. deb http://archive.canonical.com/ubuntu intrepid partner # deb-src http://archive.canonical.com/ubuntu intrepid partner deb http://security.ubuntu.com/ubuntu intrepid-security main restricted multiverse deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted deb http://security.ubuntu.com/ubuntu intrepid-security universe deb-src http://security.ubuntu.com/ubuntu intrepid-security universe
If /etc/apt/preferences does not exist, touch it!
Then copy this code into it:
Package: * Pin: release v=8.10 Pin-Priority: -1 Package: ruby Pin: release v=8.10 Pin-Priority: 500 Package: ruby1.8 Pin: release v=8.10 Pin-Priority: 500 Package: libruby Pin: release v=8.10 Pin-Priority: 500 Package: libruby1.8 Pin: release v=8.10 Pin-Priority: 500 Package: rdoc Pin: release v=8.10 Pin-Priority: 500 Package: rdoc1.8 Pin: release v=8.10 Pin-Priority: 500 Package: ri Pin: release v=8.10 Pin-Priority: 500 Package: ri1.8 Pin: release v=8.10 Pin-Priority: 500 Package: irb Pin: release v=8.10 Pin-Priority: 500 Package: irb1.8 Pin: release v=8.10 Pin-Priority: 500 Package: libopenssl-ruby Pin: release v=8.10 Pin-Priority: 500 Package: libreadline-ruby Pin: release v=8.10 Pin-Priority: 500 Package: libreadline-ruby1.8 Pin: release v=8.10 Pin-Priority: 500 Package: ruby-dev Pin: release v=8.10 Pin-Priority: 500 Package: ruby1.8-dev Pin: release v=8.10 Pin-Priority: 500 Package: guessnet Pin: release v=8.10 Pin-Priority: 501
That’s all! “Aptitude update” & “aptitude install ruby guessnet” and you are good to go.
I tried using the “Package” keyword with wildcards, but that’s a no-go