Incroyable - fantastique
2009-01-16 Fri – 23:26:01Tres bien. Magnifique.
• http://uk.youtube.com/watch?v=6h03RO2Wcxo
(ctrl + a,: to bring up prompt for entering screen commands) :split split current window into two regions :resize +20 grow the current region by 20 lines :focus down move to the lower region (ctrl + a, until the desired window is visible) :focus up move back to the previous region ... later, when the new region is no longer (des|requ)ired.. :remove remove the current region
Hooray. I like keeping up with what my friends are up to, and add any weblog feeds I find to Google Reader whenever I come across one.
Recently I've realised how many of them are using Twitter, which I've signed up for but have no interest in using myself. So, it was kind of annoying to find out that while there is an RSS feed for each individuals' updates, the RSS feed that combined all my friends' updates together was password-protected.
This meant that rather than keep using Google Reader, to keep up with the all those Twitter updates I'd have to check Twitter itself - which truly doth sucketh.
However, problem solved! Not too complicated in the end really. Woo.
I've written a tiny script that uses curl to get a copy of the password-protected feed and runs from cron regularly and makes a local copy I can subscribe to in Google Reader:
Thankfully curl lets you use your .netrc file to specify the username and passowrd, and the Twitter feed is available over SSL, so it's even properly secure. Rah.
[jem:pgl]:~/scripts $ crontab -l | grep twit */5 * * * * twitter-friends-rss-update.sh ##~ [jem:pgl]:~/scripts $ cat twitter-friends-rss-update.sh #!/bin/bash friendsrssurl='https://twitter.com/statuses/friends_timeline/14063001.rss' localcopy="$HOME/p/twitter/rss/friends.rss" /usr/bin/curl -s -n "$friendsrssurl" -o "$localcopy" ##~ [jem:pgl]:~/scripts $ curl --help | egrep -- '-[sno]/' -n/--netrc Must read .netrc for user name and password -o/--output Write output to instead of stdout -s/--silent Silent mode. Don't output anything
Hello,
and good day to you. I am writing this to let you know about a site I made. It's actually been around for a while, but hasn't changed much from its original (very much lacking) state after I stopped playing WoW nearly a year ago. Now that started playing again, I've finally gotten round to updating the website with some bits that I hope other people might find useful.
(This is actually a repost of the note I put up in the WoWAce forums - apologies for the duplication!)
It was originally written so I didn't have to check three places whenever I was trying to find an addon, or check for updates.
You can see it here:
Here's a quick overview:
Here's some links in addition to the main page, if anyone's interested in having a look:
(Aside: just noticed ui.w are back to wowui.w - wtf? Another name change? Pff.)
It's not finished; there's lots more to do. But, now that there's finally favourites lists, I figured it might actually be useful for other people as well as me. :)
Any and all comments, criticisms, suggestions, and / or other similar communications, thoughts, opinions, and missives related, indirectly connected, or even nothing to do with the site are of course happily encouraged, welcome, desired, positively lusted over, and will find a soft warm home in my brain where they can relax with buttery toast and a nice cold alcoholic or non-alcoholic beverage of choice and the fine company amongst peers and friends.
cheers,
- pgl / Fin
How to use variable variables in bash:
[mimi:pgl]:~ $ tits=arse [mimi:pgl]:~ $ arse=cheese # this way I figured out myself after a long time pulling my hair out [mimi:pgl]:~ $ echo ${!tits} cheese # this I found later at http://www.seocam.net/how-tos/how-to-create-variable-variables-in-bash [mimi:pgl]:~ $ eval echo $`echo $tits` cheese # how to assign to a variable variable: [vini:plowe]:~ $ tits=cheese [vini:plowe]:~ $ arse=tits [vini:plowe]:~ $ eval $arse='hello' [vini:plowe]:~ $ echo $tits hello
Explained -- obliquely -- in the manual:
Parameter Expansion
...
If the first character of parameter is an exclamation point, a level of
variable indirection is introduced. Bash uses the value of the vari-
able formed from the rest of parameter as the name of the variable;
this variable is then expanded and that value is used in the rest of
the substitution, rather than the value of parameter itself. This is
known as indirect expansion. The exceptions to this are the expansions
of ${!prefix*} and ${!name[@]} described below. The exclamation point
must immediately follow the left brace in order to introduce indirec-
tion.("This is known as indirect expansion" - rubbish! Everyone calls it variable
variables! :))
Interesting:
• YouTomb.
YouTomb is a research project by MIT Free Culture that tracks videos taken down from YouTube for alleged copyright violation.
Also: cool!
Interesting:
You proceed through the game by redirecting waves of light into targets by positioning things that divert the waves, with the levels getting more complex as you go on. There are "many ways to solve every puzzle"
This demo of Auditorium features 3 Acts. Each Act has at least 5 separate levels. We are currently working on the full version of the game and have estimated around 20 acts total to be released in the near future..
Finally fixed my whois tool:
Previously, it arsed up on most domains due to overzealous sanitisation on my part. No longer! Hooray.
## arrays in bash: assignment, indexing, and looping
##
# assign multiple values to a new array:
array=(tits arse)
# or:
array=([0]=tits [1]=arse)
# or:
array=([0]=tits arse)
# assign single values to specific indices:
array[2]='cheese'
# add a new value to the end of the array (push)
array+=(hmm)
# NB: indices do not have to be congiuous:
array[5]='last'
# view specific element of an array:
echo "first element: ${array[1]}"
echo "----"
# view number of elements in an array:
echo "${#array[*]} total elements"
echo "----"
# loop through an array by index:
for x in ${!array[*]}
do
echo "\${array[$x]} -> ${array[$x]}"
done
echo "----"
# loop through an array by value:
for y in ${array[*]}
do
echo $y
done
exit
## --
## output
## --
"test.sh" 67L, 1089C written
:!bash -D test.sh
:![ $? -eq 0 ] && test.sh
first element: arse
----
5 total elements
----
${array[0]} -> tits
${array[1]} -> arse
${array[2]} -> cheese
${array[3]} -> hmm
${array[5]} -> last
----
tits
arse
cheese
hmm
last
Lovely image taken by Ricky Gervais where "the reflection of the room in the glass makes it look like a giant futuristic temple":
- http://www.rickygervais.com/images/tsott_nywindow.jpg