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 python | |
| # vim: set ts=4 sw=4 noet: | |
| import argparse | |
| def shoveIntoClipboard(contents): | |
| "Copies a string into the clipboard... on a Mac" | |
| p = subprocess.Popen(['pbcopy'], stdin = subprocess.PIPE) | |
| p.stdin.write(contents) | |
| p.stdin.close() | |
| return p.wait() == 0 |
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 python | |
| # vim: set ts=4 sw=4 noet: | |
| ################################################################################ | |
| # Author: Paul Chandler <[email protected]> | |
| # Facebook's FaceBull Puzzle | |
| # | |
| # NOTE: If psyco is installed, it's imported & enabled. The improvement is | |
| # unimpressive, but it's something. | |
| # | |
| # /me crosses fingers |
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
| <?php | |
| // vim: set ts=4 sw=4 noet: | |
| /* | |
| In the example above, the author forgets to include $_REQUEST, | |
| which is also slashed (using PHP 4.3.8). | |
| It's good practice to include a routine to "unslash" or "slash" | |
| variables, if something happens that isn't to your expectation. | |
| However your PHP is written to depend on this option, it becomes | |
| important to support either when or if others deploy your code. |
NewerOlder