Working on Mac: 2nd week trial
Recently I've changed my employer, and got a new 13" Mac to work with.
Since my daily routines involving LAMP (MAMP?) development, it's been quite tricky to find proper repository to have all my handy tools on a different OS - Fedora Linux at home, OS X @ work.
The solution was found with certain tool set:
- Homebrew repository - better then MacPorts/Fink. Got all required tools there.
- iTerm2 - closest solution to Terminator app from Linux. Has similar configs.
- Vim - native OS X, plus some voodoo settings from my previos machine (alternatives available via brew)
- KeePassX - password management tool
- MySQL - via homebrew
- Git - best version control system eva! (required to run homebrew repository, since it's based on git)
- Perlbrew + Cpanm - lovely combination of CPAN repository and your local version of Perl in home directory without any upgrade issues.
Voila! Machine is ready to run.
Keep an eye on that one or “Best questions kids ask”
It's been lots of things said about kids, and that "why-question" period they all pass through. Reddit guys tried to sum it up in one threat.
This one just made my day:
I heard a 7 year-old ask if time was real or just something we measured with a clock.
Comment on that: Keep an eye on that one. He's the kind that breaks the universe.
Comment on that: Definitely. Haha. He will probably divide by 0 someday.
Never mess with kids, they can disarm you with their logical questions! And to enjoy the other questions, check the original source from Reddit.
Google Maps with Bootstrap CSS and toggle sidebars
For those who like dynamic content navigation, and fullscreen mode of map viewing, toggling sidebars might be quite useful.
The sample involves Bootstrap CSS framework, jQuery framework, and a bit of Google Maps v3.
<div class="container" id="content"> <div class="mapwrap" style="width:100%;height:100%"> <div id="map"></div> </div> <div class="sidebar" id="sidebar"> <ul>.....</ul> </div> <a href="#" title="Toggle Sidebar Menu"><i class="icon-shevron-right icon-white"></i></a> </div>
Here's an approximate HTML structure. And a bit of custom CSS:
#mapwrap{
float: left;
width: 100%;
height:100%;
margin-right: -280px;
}
#map{
margin:0; padding:0;
margin-right: 280px;
height:100%;
}
#content {
position:relative;
margin:0;padding:0;
float:left;
width:100%;
}
#sidebar {
margin:0;padding:0;
margin-top:2px;
float:right;
width: 276px;
height:80%;
}
And a tiny JavaScript method to toggle'em all:
$('a.toggles').click(function() {
$('a.toggles i').toggleClass('icon-chevron-right icon-chevron-left');
$('#sidebar').animate({
width: 'toggle'
}, 200, function(){
var m = get_your_map_object();
if( $('#sidebar').is(':visible') ) {
$('#map').css({'margin-right':'280px'});
} else {
$('#map').css({'margin-right':'0px'});
}
google.maps.event.trigger(m, 'resize'); //do not forget to trigger resizing otherwise map will remain unchanged
});
});
Twitter: tweet worth blogging about
Copyrights go to @markab:
Programmers don't burn out on hard work, they burn out on change-with-the-wind directives and not shipping
So darn true!
Perlbrew: safe upgrade of perl
Recently, I came up with a project, that was dicided to be implemented with Perl web-framework - Mojolicious.
The question raised straight away was how to upgrade outdated 5.8.x perl version without screwing up all the system.
Simple and yet elegant solution was found with using perlbrew. It installed a parallel repositories of new Perl version without corrupting vendor modules of my OS.
You can follow the steps described here, to easily switch your current perl installation to newer version.
Currently available versions of Perl via perlbrew:
$~: perlbrew available perl-5.15.8 perl-5.14.2 perl-5.12.4 perl-5.10.1 perl-5.8.9 perl-5.6.2 perl5.005_04 perl5.004_05 perl5.003_07
Sirius dog shelter in Limassol
Whole Saturday was spent in Sirius shelter (Location), helping people to deal with dogs. Everyone can come and take some dogs for a walk (they got plenty of them). You can also bring some food for dogs, or stuff people can resale on flea markets.
More of pictures are in the set on Flickr.
The result of the day, this young lady found new home:
There're about 6 puppies Labrador cross, that are looking for home, as the shelter is full, and they're not taking any more dogs.
MPlayer: downloading radio streams in Linux
MPlayer in combination with VLC (or any other player you use on Linux):
mplayer -playlist ~/radio_stream.pls -ao pcm:file=radio_stream.wav -vc dummy -vo null
And simply open radio_stream.wav in your player.
Now the tunes are recorded live and you listen it at the same time.
Digitally Imported Liquid DnB channel, I'm coming for ya!
How search engines work
You thought it includes massive search algorithms, tones of data, hordes of search bots.
Well, it's not!
Database copy in one line with no scripts
Recently, I had to make a fast copy of MySQL database. Being lazy of writing any scripts to do table-to-table copying, an elegant CLI solution was found:
mysqldump -u <username> -p<password> <source_database> | mysql -u <username> -p<password> <destination_database>
Pinwheel: “Flickr” for “Places”?
You said it, not me. Is it like Flickr for Places? Ish. Part of why making Pinwheel is so fun, is so exploding with possibility, is that a note, like a photo, can be a container for all kinds of things. It is the perfect social object. Stories, advice, jokes, diatribes, information, memories, facts, advertisements, love letters, grocery lists and manifestoes can all be put into a note. It is the perfectly constrained, perfectly open thing that you can make into what you want. [Caterina.net]
Sounds as an interesting concept for a start-up and monetization. I hope, that apart of just socializing around photos and notes, they will have some sort of badge system with planned routes (like in Foursquare). Grouping interesting "pins" of photos and notes on the Map - should be just a start.


