Showing posts with label hacking. Show all posts
Showing posts with label hacking. Show all posts

14 February 2014

Changing comment fonts on blogger

I can't believe I spent time doing this, i.e., finding a way to change the fonts on the comments field, but it was easy, thanks to these instructions.  I was prompted to do by Sabio's comment.(Fonts on the comments field were bold (and big and ugly).) So, here is the algorithm:

First, save the current remplate:
Design > Template > Backup/Restore > Download Full Template > Close
Then
Edit HTML > Proceed 
Within the HTML code, just below the lines
/* Variable definitions
 ==================== 
insert the code 
<Variable name="sscommentfont" description="Comment Font" type="font"
         default="normal normal 100% 'Trebuchet MS', Trebuchet, Verdana, Sans-serif" value="normal normal 100% 'Trebuchet MS', Trebuchet, Verdana, Sans-serif"/>  
     <Variable name="sscommentcolor" description="Comment Color" type="color" default="#000000" value="#000000"/>
Then, just above the line
#comments {
insert the code
.comments .comments-content .comment-content, .ss{
    font: $sscommentfont;
    color: $sscommentcolor;
}
Click Save Template. Then go again to
Design > Template > Customize > Advanced
and you will see a new entry, Comment Font, which can be edited.

27 March 2013

YouTube: searching for playlists

As is well-known, YouTube is a good medium but it is surprisingly monolithic, difficult to use, hard to organize. This is, of course, not a coincidence. The hackers of YouTube are no idiots. Most likely, they have clear instructions to make the system inflexible so that people (you and I) keep always clicking for new videos. Their dominant term in their utility function is the maximization of clicks by the average user, in the hope that the user will become victim of some advertisement once in a while.

The inflexibility of YouTube includes:
-- inability to organize playlists in different order (say reverse chronological order)
-- impossibility to shift items from one playlist to another
-- very limited search
-- impossibility to search for playlists

However, there are some things you can get around, and here is my one-time contribution to the art of hacking: Here is how to search for playlists.

Copy and paste the following into the URL field of your browser
https://gdata.youtube.com/feeds/api/playlists/snippets?q=KEYWORD&start-index=N&max-results=M&v=2
after replacing the items in yellow by what  you need them to be:
KEYWORD : a search term, case-insensitive
N : start index, an arbitrary positive integer
M: number of items to be listed, an integer, 1 ≤ M ≤ 50
 N.B. No, this is not my thing. I got it from here.



T H E B O T T O M L I N E

What measure theory is about

It's about counting, but when things get too large.
Put otherwise, it's about addition of positive numbers, but when these numbers are far too many.

The principle of dynamic programming

max_{x,y} [f(x) + g(x,y)] = max_x [f(x) + max_y g(x,y)]

The bottom line

Nuestras horas son minutos cuando esperamos saber y siglos cuando sabemos lo que se puede aprender.
(Our hours are minutes when we wait to learn and centuries when we know what is to be learnt.) --António Machado

Αγεωμέτρητος μηδείς εισίτω.
(Those who do not know geometry may not enter.) --Plato

Sapere Aude! Habe Muth, dich deines eigenen Verstandes zu bedienen!
(Dare to know! Have courage to use your own reason!) --Kant