0 notes &
Slackware on ASUS Zenbook Prime UX31A.
0 notes &
Slackware on ASUS Zenbook Prime UX31A.
0 notes &
Since October last year I took over the server management tasks in my project. Unfortunately, those machines are loaded not with Debian but with Scientific Linux (Why SL is one of the great mysteries of universe).
One of these days I needed to know which were the compilation flags of a package.
TL;DR:
rpm -q --queryformat="%{NAME}: %{OPTFLAGS}\n" PACKAGE_NAME
Long Version:
-q or —query is the flag for querying information about a package.
—queryformat is quite obvious but here it is: use this flag to set the the output format of the query result.
A bit more on —queryformat:
According to the docs:
Query formats are modifed versions of the standard printf(3) formatting.
Ok, how can I get a list of the information I can output?
Again, from the docs:
rpm will print a list of all of the tags it knows about when it is invoked with the —querytags argument.
Kinda weird to be writing about RPM based distributions but oh well, at least I’m not managing Windows servers ;)
1 note &
This is the second time I break the screen of a notebook.
First time was with this this Asus Eee PC 1000HE I had for a 1 year and a half. The little boy was on beside my bed and so it had an encounter with my foot, long enough just to crack the LCD screen. The second time was a few weeks ago. I was doing some work on the bed before sleeping but I actually fell asleep. The notebook just fell. Here I am again with a broken LCD screen.
The first time I really had no idea of where to buy a new screen, so I just went around the web looking for some japanese site that seemed reliable enough and that was selling notebook LCD screens. The search took a few days but I ended finding 液晶プロ(Ekishou Pro - “LCD Pro”).
They specialize on replacement LCD screens for notebooks and have a pretty nice line up, covering most brands like Asus, Dell and even Apple.
The looks of the website don’t really help but my first buying went really smooth. The screen for my notebook was listed as in “contact us” so I sent them an email which was quickly replied by their staff with a link to the an available screen, compatible with my model. Payment can be done through credit card or bank transfer.
The LCD arrived in a few days and worked all pretty well.
So, this time when I got yet another screen broken it was a no brainer. Just went to Ekishou Pro and looked up my model (Dell Inspiron 1122 - or M102z) and quickly found it around the Dell, 11.6 inches category.
Can’t wait for it to arrive soon and get my machine back!
0 notes &
A simple way for adding attribute accessors to a class dynamically:
class MyClass
def add_attr(name, value)
self.class.send(:attr_accessor, name)
instance_variable_set("@#{name}", value)
end
end
20 notes &

I don’t normally reblog random silly stuff but this was too good not to
(Source: fraufi666)
1 note &
Sometimes you just happen to cat a binary file and it just messes up your terminal output and all can see and type is garbage.
Normally here you’d just give up and reopen your terminal but here’s another solution: Just type the command below:
echo -e \\033c
All you’re doing is sending an ESC(033 is the octal version of the ASCII control key “ESC”) + a letter “c” to the console, which is a VT100 command to reset the terminal to its default settings. If you’re curious about other VT100 commands, take a look at this page. You can send them all using
echo -e
followed by the the codes in ASCII. This works in any VT100 compatible terminal which means that you’re safe to use it on your Linux or Mac machine.
Edit: As some people said in the comments and at G+, you can just use the “reset” command, which is actually doing the above and some more.
To read more about the reset command, check the man pages here.
1 note &
I’m trying to finish the Go Tour and one of the exercises was to write a Fibonnaci closure, that is, a closure that generates the Fibonnaci sequence.
It was a cool exercise to learn on closure works in Go, so to remind myself of this later, I’ll share it here:
1 note &
Animated explanation of the Pythagorean theorem
(Source: loui-7)
1 note &
Playing around with math and images at ”a Tour of Go”
1 note &