cfsilent night…

Written on 9 December 2014, 09:12pm

Tagged with:

An interesting bit about the cfsilent tag.
The official example from Adobe on the cfsilent page is the following:

<h3>cfsilent</h3>

<cfsilent>
<cfset a = 100>
<cfset b = 99>
<cfset c = b-a>
<cfoutput>Inside cfsilent block<br>
b-a = #c#</cfoutput><br>
</cfsilent>

<p>Even information within cfoutput tags does not display within a 
cfsilent block.<br>
<cfoutput>
b-a = #c#
</cfoutput>
</p>

As expected, nothing between the cfsilent tags is displayed:
before

But what do you think it happens if you add a cfabort on line 9, right before closing the cfsilent tag? 🙂
(more…)

Unix commands bucket

Written on 8 December 2014, 10:20pm

Tagged with: , , ,

Cleaning up my bookmarks and finishing and old draft post in the same time 🙂

1. Getting started

Linux 101 Hacks eBook
http://linux.101hacks.com/toc

Introduction To Linux Commands
http://coding.smashingmagazine.com/2012/01/23/introduction-to-linux-commands/

5 Unix Commands I Wish I’d Discovered Years Earlier (man ascii, cal, xxd, ssh, mdfind)
http://spin.atomicobject.com/2013/09/09/5-unix-commands/

VI common commands:
http://www.cs.colostate.edu/helpdocs/vi.html

Unix Programming Resources
http://www.whoishostingthis.com/resources/unix-programming/

2. OS

ps aux
a = show processes for all users
u = display the process’s user/owner
x = also show processes not attached to a terminal
http://www.unix.com/man-page/All/1b/ps/

top
http://www.unix.com/man-page/linux/1/top/

strace
http://www.unix.com/man-page/linux/1/strace/

How to run commands in the background properly:
http://felixmilea.com/2014/12/running-bash-commands-background-properly/

3. Networking

netstat -a
Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

wget
Non interactive network downloader

wget --save-cookies cookies.txt http://domain.com/login
wget --load-cookies cookies.txt http://domain.com/secured

curl
Transfer an URL

Analyze log files (ex from Apache) using AWK/SED:
http://www.the-art-of-web.com/system/logs/
http://snippets.aktagon.com/snippets/15-log-file-analysis-with-awk-calculating-the-sum-and-average

And one for Windows:
net useshow the mapped drives

C:\Documents and Settings\user> net use
New connections will be remembered.

Status       Local     Remote                    Network
-------------------------------------------------------------------------------
             P:        \\my.domain.com\www\public
                                                 Microsoft Windows Network
OK           S:        \\chaos\devd$    Microsoft Windows Network
             
The command completed successfully.
--------------------------------------------------------

Ronnie in 2014

Written on 8 December 2014, 12:14pm

Tagged with: ,

Ronnie is finishing 2014 winning the UK Championship in an impressive way. After injuring his ankle right before the start of the tournament, after complaints about the quality of the snooker tables, he managed to do three amazing things that will remain in the snooker history for a while:
1. he compiled his 13th maximum break in the last frame of the quarter final against Matthew Selt after a near miss in the previous frame (he missed a ball after potting 12/15 reds)
The maxi made Stephen Hendry to remark in commentary that snooker “does not get much better than this”:

2. he had an amazing comeback against Stuart Bingham in the semifinals, after trailing 1-4 he leveled at 5-5 and won the match in the deciding frame by risking everything on this ball. The deciding frame video:

3. he won the final against Judd Trump at a moment when no one thought he can really do it any more. After leading 5-1 and then 9-4 he needed one more frame to win. But Trump managed to win 5 frames in a row, moving the match in the decider.
There Ronnie had the first chance by potting this ball, but then he left Judd among the balls after this shot. Things were not over for Ronnie as he came back to the table and soon after he got the upper hand following a great safety shot. “That’s big trouble for Trump” said the commentary, and indeed, Trump response left Ronnie among the reds. Judd knew it was over, even though Ronnie was one millimeter away from an awkward position. But he made it, and the next 2 reds were enough to see him relieved.

“That is the hardest match I have ever played,” O’Sullivan told BBC Sport. “I was going through the motions and accepted I was going to get beaten.”

ronnie1

ronnie2

The deciding frame video (grab it while it’s hot, probably it will be taken down at some point):

To put that in a context, here is the Ronnie breakdown of 2014 – counting the 4 major tournaments in chronological order:
Masters – won – beating Mark Selby 10-4 in the final. He won 5/10 finals
Welsh Open – won – beating Ding Junghui 9-3 in the final with a maximum break (12th of his career). He won 3/4 finals
World Championship – lost the final against Mark Selby 14-18 after a 10-5 lead. It was his first ever defeat in a WC final (5/6 finals won).
UK Championship – won the final against Judd Trump 10-9. 5/5 finals won.

Update, 25 February 2016: There is an excellent article written by Sam Knight in The New Yorker: Follow the White Ball: The torments of Ronnie O’Sullivan, snooker’s greatest player. It describes the life and career of Ronnie focusing on this tournament.

The players came out for the final frame. They shook hands. A spectator near the front wore a T-shirt that said, “Keep Calm and Play Snooker.” Trump broke. O’Sullivan potted an early red. Suddenly, it seemed dangerous to go first. With sixteen points on the board, O’Sullivan missed and gave up the table. But Trump couldn’t take advantage. The men exchanged safety shots: long flicks of the white ball, down the table, to catch the edge of a red, hit a cushion, and then retreat up behind a barrier of colored balls. They did this until Trump snagged a red and brought it back up the table as well. “All the fancy fucking footwork, the control that he has had for maybe twenty, thirty shots,” O’Sullivan told me once about the art of safety. “Bang, I’m going to pounce on him.” He blocked the white ball behind the green. Trump missed his shot, and O’Sullivan had the freedom of the table. He opened his mouth slightly and padded faster in his sneakers. The match clock showed four hours, fifty-three minutes, and six seconds.

There was a moment, only a moment, after that when O’Sullivan was in trouble. He got too close to the blue and had to sneak around it. But for the rest of the match the balls were where he wanted them to be. Red followed by pink, red followed by yellow. The white stayed with him. He got to the end. Later, after the confetti and the prize, I found him backstage. Workmen were dismantling snooker tables, to transport them to the next tournament. “It came back,” O’Sullivan said. He looked relieved and haunted at the same time. “Sometimes you know it will.”