This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Action<IMaybe<TA>> LiftToMaybe<TA>(this Action<TA> func) where TA : class | |
| { | |
| return param => | |
| { | |
| var justparam = param as Just<TA>; | |
| if (justparam == null || justparam.Value == null) return; | |
| func(justparam.Value); | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/sbin/dtrace -s | |
| #pragma D option quiet | |
| dtrace:::BEGIN | |
| { | |
| self->start = 0; | |
| } | |
| syscall::write:entry, | |
| syscall::write_nocancel:entry, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # Sniffs a serial Connection. Prints all unprintable characters! | |
| # Only tested under Mac OS X 10.8. (should work with earlier versions) | |
| # Uses dtruss, which comes with Mac OS. | |
| # | |
| # Usage: | |
| # $ ./serialsniffer.rb <serial device> | |
| # | |
| # Example: |
NewerOlder