I have a weired hobby, checking very frequently the Release-Critical Bugs in Debian.
It's kind of a magic window to all this wonderful packages found in Debian. Sometimes I'm horrified to see so many bugs opened at once. Like now ... 169 FTBS introduced by GCC-4.7...
It's no reason to panic, but it's been a while since I've seen such a huge bump up...
Monday, May 07, 2012
Thursday, May 03, 2012
Ubuntu Rant! You need Ubuntu to install Ubuntu
Ubuntu "engineers" are probably dumber than that Enterprise Linux OS. I got a laptop from a friend who asked me to install the latest Ubuntu on it. My usual technique of make a live bootable usb faild.
So, I googled and found this evidence that Ubuntu engineers are retarded.
You need Ubuntu to install Ubuntu.
This reminds me a bit that Redmond company. What if I have another OS ? NOT Mac or Windows ? For example, Debian? can't you just write how to obtain that package ???
So, I googled and found this evidence that Ubuntu engineers are retarded.
You need Ubuntu to install Ubuntu.
This reminds me a bit that Redmond company. What if I have another OS ? NOT Mac or Windows ? For example, Debian? can't you just write how to obtain that package ???
Wednesday, May 02, 2012
New Entry in the Linux laptop list !
I am looking for a new laptop. 14" is a bit hard to fit in the bag sometimes.
While search for a new 12" laptop, I found garlac.eu. Their 14" laptop is exactly the Clevo I have, the 13.3" version I bought to my girlfriend under the brand name Belina in Germany. It's a good laptop. But the one in Garlac comes either with equiped with old AMD version or newer with Intel but equipped with NVIDIA.
Sorry, I DON'T buy AMD. Until someone here or in AMD convinces me that they do a better job with Linux. The second option, NVIDIA is an utter crap. NVIDIA drivers is the biggest piece of s$#% I ever saw, and in my work place, I curse a lot when I need to mess with NVIDIA card on a CAE workstation or some cluster.
But... if you are looking for a good 14.1" laptop and you are in Europe... The Rush 14.1 seems like a good choice.
While search for a new 12" laptop, I found garlac.eu. Their 14" laptop is exactly the Clevo I have, the 13.3" version I bought to my girlfriend under the brand name Belina in Germany. It's a good laptop. But the one in Garlac comes either with equiped with old AMD version or newer with Intel but equipped with NVIDIA.
Sorry, I DON'T buy AMD. Until someone here or in AMD convinces me that they do a better job with Linux. The second option, NVIDIA is an utter crap. NVIDIA drivers is the biggest piece of s$#% I ever saw, and in my work place, I curse a lot when I need to mess with NVIDIA card on a CAE workstation or some cluster.
But... if you are looking for a good 14.1" laptop and you are in Europe... The Rush 14.1 seems like a good choice.
Monday, April 02, 2012
Command Line Posting to Blogger
Oh man, I'm really becoming a geek. I spend so much time staring at VIM that writing a Blog post using the Web interface seems cumbersome to me. I know about Google command line interface and I even wrote my own little script to upload images to Picasa directly from Nautilus (good times are gone, I don't use GNOME anymore).
Anyway, at this point, you have python-markdown2 installed, and the command
Basic setup
So, in this post I will explore how post to Blogspot from the command line in an elegant way. First we need to install Google's CLI tool, let's grab it:wget http://code.google.com/p/googlecl/downloads/detail?name=googlecl_0.9.13-1_all.deb
Now, let's install it:
dpkg -i googlecl_0.9.13-1_all.deb
OK, basically, now you are good to go. The documentation is fairly easy to understand. Except maybe one note. The first time you will run the command you will need to configure your client. The config files are found in:
~/.config/googlecl/config
Well done by googleres who put the stuff where I expected it. Do note, when you run the config you will be asked for the name of your Blog. This is NOT the subdomain, e.g. in my case:
linuxpixies.blogspot.com
Rather to correct answer is the title of the Blog:
Linux Pixies and Stuff
Spaces are digested very well.
Making things Fancy
Until now you can post simple text files, or manually edit HTML (YUCK!). Here comes the fun part. Editing simple text files and automagically converting them to HTML. Enter markdown.Markdown
Markdown is a sweet little thing I discovered using stackexchange.com. The more I use it I want more. This thing is addicting, and even worse, it makes me hate all other Wiki syntax! Especially TkWiki, which we use in my workplace. Markdown has many many converters. I use python-markdown2, so let's install it:pip install markdown2
Now, if you are a pedant, you could make a Debian package, which is actually better than just dumping Python packages. But pip can also remove Python packages, so it's now that bad, after all.Anyway, at this point, you have python-markdown2 installed, and the command
markdown is at your finger tips. You can start writing your post with your favorite editor, be it Nano, EMACS, Ed or VIM, when your done, save it with an appropriate title and md suffix so you know later it's Markdown. Now comes the fun part.
Converting to HTML
/usr/local/bin/markdown2 YourCoolPost.md > Title\ of\ Your\ Cool\ Post.html
Now, you can view it with:
firefox Title\ of\ Your\ Cool\ Post.html
It will be bare naked HTML, without any styling, but you will get a good feeling how your post will look like. When your satisfied, go the next step, publishing.
Publishing your Post
Easy as:google blogger post Title\ of\ Your\ Cool\ Post.html
Done.
Final Remarks
I am writing these final remarks from Google's own web interface to Blogger. I wanted to see how my post looks like in real life. I was amazed to find a plague of break elements. elements in my post. Apparently, Blogger's engine parses the HTML once again when it's submitted. Everywhere I had a line break in VIM using enter, I had inside Blogger a break element. Quite upsetting, but just remember, don't use to many of them inside VIM, and your post should look good.
Labels:
Command Line,
vim
Tuesday, March 20, 2012
Good Bye Latex ? Hello WeasyPrint ...
Latex, is my main way of producing reports and scientific works. Usually these are formed as PDF before being actually printed. Latex is AWESOME. I love writing documents with latex. That said, although I am not a beginner with latex, when I want to deviate from normal good old latex patterns things become a bit rough.
Despite using the Latex language for almost 5 years, I still don't fully understand the syntax of writing packages, although mostly a long enough search will yield some solution which does not require me to hack on my own. Never the less this is a bit tiresome sometimes.
Enter WeasyPrint. This project seems really cool because it allows anyone with basic knowledge of HTML and CSS to produce good looking PDFs. Further more, I can really think of a simple work flow once a template is made:
Write your documents with Markdown, use something like Jekyll to convert your easy to understand Markdown to HTML with some Jinja or CSS and finally convert your pages to good looking PDF's.
I think this is more or less what Sphinx does (except that Sphinx uses RST instead of Markdown). I never really mastered CSS or HTML, but this seems like a good opportunity to start mastering both
Besides, consider this:
MarkDown + Convert to HTML + WeasyPrint = Sphinx from Scratch.
Besides being a very cool educational project, a project like this can allow people with CSS + HTML knowledge to produce some great looking PDF. It also allowed a lot of flexibility if you are good at both.
Never the less, Latex has still one big advantage: Latex is well designed to produce good looking documents even though you are not an expert on typography and page layout. Additionally it is thousands of ready made packages and kind community that can help solving many existing problems. So maybe after all, Latex is not going away so fast!
Despite using the Latex language for almost 5 years, I still don't fully understand the syntax of writing packages, although mostly a long enough search will yield some solution which does not require me to hack on my own. Never the less this is a bit tiresome sometimes.
Enter WeasyPrint. This project seems really cool because it allows anyone with basic knowledge of HTML and CSS to produce good looking PDFs. Further more, I can really think of a simple work flow once a template is made:
Write your documents with Markdown, use something like Jekyll to convert your easy to understand Markdown to HTML with some Jinja or CSS and finally convert your pages to good looking PDF's.
I think this is more or less what Sphinx does (except that Sphinx uses RST instead of Markdown). I never really mastered CSS or HTML, but this seems like a good opportunity to start mastering both
Besides, consider this:
MarkDown + Convert to HTML + WeasyPrint = Sphinx from Scratch.
Besides being a very cool educational project, a project like this can allow people with CSS + HTML knowledge to produce some great looking PDF. It also allowed a lot of flexibility if you are good at both.
Never the less, Latex has still one big advantage: Latex is well designed to produce good looking documents even though you are not an expert on typography and page layout. Additionally it is thousands of ready made packages and kind community that can help solving many existing problems. So maybe after all, Latex is not going away so fast!
Friday, March 16, 2012
The weired Indexing in Perl
I am learning Perl. I am doing it with a lot of a resentment, but I am slowly learning it.
Normal people count from 1. Computer Scientist count from 0. Perl developers count from -1?
WTF?
Normal people count from 1. Computer Scientist count from 0. Perl developers count from -1?
WTF?
oz@server ~ $ test.pl test num of args 0 oz@server ~ $ test.pl test test num of args 1 0 test 1 test oz@server ~ $ test.pl num of args -1 No arguments! oz@server ~ $My Code, just in case I am totally wrong about this here, :
$ cat test.pl
#!/usr/local/bin/perl -w
print "num of args $#ARGV \n";
if ( $#ARGV > 0 ){
for ( my $i = 0 ; $i <= $#ARGV ; ++$i ) {
print "$i\n";
print "$ARGV[$i]\n";
}
}
if ( @ARGV > 0 )
{
print "Number of arguments: " . scalar @ARGV . "\n";
}
else
{
print "No arguments!\n";
}
Labels:
Perl,
Programming,
Sysdamin
Friday, February 24, 2012
VIM Quicky: set tabs and spaces behaviour for different files
Never really bothered me before, because I only used Python and C, so I always replaces tabs with spaces.
However, with more C programming lately, I needed to start working with Makefiles. These require tabs instead of spaces.
So here is how to. In the end of my .vimrc file I put:
Et viola, not so complicated!
However, with more C programming lately, I needed to start working with Makefiles. These require tabs instead of spaces.
So here is how to. In the end of my .vimrc file I put:
" python python pyhton " convert tabs to spaces before writing python files or C files autocmd! bufwritepre *.py,*.c,*.h set expandtab | retab! 4 " convert spaces to tabs when reading python file or C files autocmd! bufreadpost *.py,*.c,*.h set noexpandtab | retab! 4
Et viola, not so complicated!
Labels:
C,
python,
Scientific Programming,
vim
Subscribe to:
Posts (Atom)
