Lego Cubestormer robot solves Rubik's Cube in sub-12 second whirlwind (video) -- Engadget
I can't help it, I think this is cool :)
"gem install cheat" and then...
Welcome. You've reached the central repository for cheat, the RubyGem which puts cheat sheets right into your terminal. The inaugural blog entry is here.
Get started:
$ sudo gem install cheat$ cheat strftimeA magnificent cheat sheet for Ruby's strftime method will be printed to your terminal.
To get some help on cheat itself:
$ cheat cheatHow meta.
Cheat sheets are basically wiki pages accessible from the command line. You can browse, add, or edit cheat sheets. Try to keep them concise. For a style guide, check out the cheat cheat sheet.
To access a cheat sheet, simply pass the program the desired sheet's name:
$ cheat <sheet name>
The Hardest Logic Puzzle Ever
From Wikipedia, the free encyclopediaThe Hardest Logic Puzzle Ever is a title coined by American philosopher and logician George Boolos in an article published in The Harvard Review of Philosophy (an Italian translation was published earlier in the newspaper La Repubblica, under the title L'indovinello più difficile del mondo) for the following Raymond Smullyan inspired logic puzzle:
“ Three gods A, B, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are 'da' and 'ja', in some order. You do not know which word means which. ” Boolos provides the following clarifications:[1]
“
- It could be that some god gets asked more than one question (and hence that some god is not asked any question at all).
- What the second question is, and to which god it is put, may depend on the answer to the first question. (And of course similarly for the third question.)
- Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he speaks truly; if tails, falsely.
- Random will answer 'da' or 'ja' when asked any yes-no question.[1]
”
This almost made my head explode. Try solving it without reading the solution. Good luck!
Nicer assertion framework ("Wrong") for Ruby
Algorithm
So wait a second. How do we do it? Doesn't Ruby have poor support for AST introspection? Well, yes, it does, so we cheat: we figure out what file and line the assert block is defined in, then open the file, read the code, and parse it directly using Ryan Davis' amazing RubyParser and Ruby2Ruby. You can bask in the kludge by examining
chunk.rbandassert.rb. If you find some code it can't parse, please send it our way.Before you get your knickers in a twist about how this is totally unacceptable because it doesn't support this or that use case, here are our caveats and excuses:
- It works! Tested in 1.8.6, 1.8.7, 1.9.1, and 1.9.2-rc2. (Thank you, rvm!)
- Your code needs to be in a file. That means it doesn't work in IRB. (If you're developing Ruby code without saving it to a mounted disk, then sorry, Wrong is not right for you.)
- It's a development-time testing library, not a production runtime library, so there are no security or filesystem issues.
evalisn't evil, it's just misunderstood.- It makes a few assumptions about the structure of your code, leading to some restrictions:
- You can't have more than one call to
assertper line. (This should not be a problem since even if you're nesting asserts for some bizarre reason, we assume you know where your Return key is. And actually, technically you can put two asserts on a line, but it always describes the first one it sees, which means that if the second one executes, its failure message will be incorrect or broken.)- You can't use metaprogramming to write your assert blocks.
- All variables and methods must be available in the binding of the assertion block.
This is a very slick hack. I'm gonna go play with this.
A list of historical security holes in ranked order of severity
Metric ID Date
PublicName 142.5 VU#191609 03/29/2007 Microsoft Windows animated cursor stack buffer overflow 108.16 VU#16532 11/10/1999 BIND T_NXT record processing may cause buffer overflow 104.73 VU#41870 04/03/1999 Sun Solstice AdminSuite ships with insecure default configuration 99 VU#945216 02/08/2001 SSH CRC32 attack detection code contains remote integer overflow 94.5 VU#254236 09/10/2003 Microsoft Windows RPCSS Service contains heap overflow in DCOM request filename handling 94.5 VU#483492 09/10/2003 Microsoft Windows RPCSS Service contains heap overflow in DCOM activation routines 90.97 VU#162451 04/20/2004 Cisco IOS fails to properly process solicited SNMP operations 89.5 VU#150227 02/19/2002 HTTP proxy default configurations allow arbitrary TCP connections 88.2 VU#827267 10/23/2008 Microsoft Server service RPC stack buffer overflow vulnerability 87.72 VU#29823 06/23/2000 Format string input validation error in wu-ftpd site_exec() function 81 VU#5648 07/27/1998 Buffer Overflows in various email clients 79.65 VU#970472 04/04/2001 Network Time Protocol ([x]ntpd) daemon contains buffer overflow in ntp_control:ctl_getitem() function 79.31 VU#789543 05/14/2001 IIS decodes filenames superfluously after applying security checks 78.75 VU#568148 07/16/2003 Microsoft Windows RPC vulnerable to buffer overflow 78 VU#117394 03/17/2003 Buffer Overflow in Core Microsoft Windows DLL 78 VU#257164 07/11/2006 Microsoft DHCP Client service contains a buffer overflow 76.5 VU#323070 11/25/2003 Outlook Express MHTML protocol handler does not properly validate source of alternate content 74.81 VU#745371 07/18/2001 Multiple vendor telnet daemons vulnerable to buffer overflow via crafted protocol options 73.5 VU#411332 07/16/2003 Cisco IOS Interface Blocked by IPv4 Packet 73.1 VU#28934 12/14/1999 Sun Solaris sadmind buffer overflow in amsl_verify when requesting NETMGT_PROC_SERVICE 72.9 VU#940193 07/10/2010 Microsoft Windows automatically executes code specified in shortcut files 72.14 VU#493881 12/09/2008 Microsoft Internet Explorer data binding memory corruption vulnerability 69.3 VU#952336 06/18/2001 Microsoft Index Server/Indexing Service used by IIS 4.0/5.0 contains unchecked buffer used when encoding double-byte characters 69.25 VU#107186 02/12/2002 Multiple vulnerabilities in SNMPv1 trap handling 69.25 VU#753044 07/18/2006 Microsoft Windows WebViewFolderIcon ActiveX integer overflow 68.84 VU#343145 05/08/2007 Microsoft Exchange Server fails to properly decode MIME email messages 68.4 VU#111677 10/10/2000 Microsoft IIS 4.0 / 5.0 vulnerable to directory traversal via extended unicode in url (MS00-078) 67.5 VU#591890 12/18/2002 Buffer overflow in Microsoft Windows Shell 67.5 VU#881872 02/10/2007 Sun Solaris telnet authentication bypass vulnerability 67.2 VU#897604 03/29/2003 Sendmail address parsing buffer overflow
![]()
![]()
Vulnerability Notes By Metric
Notes 1 - 30 of 2649
I'm not sure why I find this list so appealing (it's attempt to rank these things, the sheer quantity of Microsoft (though as % of installed base, it may be fairly represented, I'm not sure), the quantity of the list, the breadth/depth of it, etc.).
Make sure to run PDF Patch if you jailbreak your iPhone

assuming you've jailbroken, you should then do this as it will close the hole that allowed the jailbreak (and then you don't have to stress about upgrading to 4.0.2)
great paper on the dangers of concurrency and modern architectures
The paper itself is about C++ and the Perils of Double-Checked Locking. It's useful to read even if you don't write (or know C++), because it reminds you of the genius/perils of optimizing compilers and the various issues with SMP. It's also very funny (no really, not just Comic Book Guy funny, but genuinely funny).
It's by Scott Meyers, of Effective C++ fame. Check out his other writings too.




0 Comments