So today I finished up my Instagram wrapper. Instagram has become very popular over the last year or so but it still doesnt have a proper api wrapper for php. So I made one of my own that fits right in to Zend Framework since thats my framework of choice. You can ofcourse use this with other frameworks or standalone. It depends on a few components off Zend Framework though.
I had a problem where i needed to enable the js api when embedding vimeo in wordpress using oembed. Turns out that you can override the existing providers by adding a line like this in your `functions.php`
WordPress caches oembed results so you might need to resave your content before you see any changes.
Its probably common knowledge that you can do this, but I didn’t know that you could. This is a great way to trigger a function at the beginning of a `setInterval`. As you might know `setInterval` triggers after the given millisecond. So what this does it that it triggers it self at the beginning and returns it self as a function to `setInterval`.
Getting over a breakup is never easy. Specially when your life isnt
exactly what you’ve hoped for. That’s pretty much the situation I was
in. Burned out at work and nothing to look forward to. It’s hard to see
the great things in life in such situations.
A month ago I started my new job at [Duckling](http://duckling.dk)&[Sonne](http://sonne.dk), the sister company for [M2Film](http://m2film.dk). The start was hard since i wasnt really my self. But I found a pretty good rhythm and stuck with it. Got up two hours before work started. Took a long bath and tried to comedown and collect my thoughts. Then a good 30 minutes meditating and blanking out my mind. Then a bit of tvshows while eating breakfest. It takes a about 20 minutes for me to bike to work, and then our great coffee guy Sam makes an amazing strong coffee.
The new job has been amazing. All the guys at work have been so sweet
helpful. We have played a bunch of Street Fighter 4 and been drinking a
lot of beers after work. I never knew how important it was to have a
culture at work that supported getting away from the screen. Not just
that but having an overhead is a big stress release. Nobody looking over
your neck and checking every little detail you do. This is a big
motivator especially for me. And also just the fact that the company is
stable. Not be involved or knowing things about the economics in the
company makes you feel more safe.
People are happy here. No need to feel that you have to up your game all
the time. It’s a very relaxed place.
I might be a bit late to the ack game but holy shit its amazing. I had a huge app i needed to search for a class and make a quick edition every where. `grep -R` is great but then a friend told me to use ack and better yet `vim.ack`. I quickly grapped the plugin and installed it. Then ran `:Ack myclass` and boom a list of the files i needed to edit. Grep the plugin here
Ack also comes in a cli tool and can be installed with `brew install ack`
I had a problem with a server without any space left on the drive, but still had to dump a database. So what i did was pipe the output of `mysqldump` to gzip and then send it over ssh to another server.
`mysqldump` outputs clear text so lets send that to gzip. We need to tell gzip to output the result to stdout so we can pipe it to ssh. We can do this by adding the -c option. Last we need to send it over ssh. You can pipe it over ssh by simply doing `ssh user@host ‘cat > ~/dump.sql.gz’