Print Special Characters as Backslash Escapes – Python3 One-liner with Unicode Support

Let’s find that weird or invisible character that breaks your code $ echo “Hello in Finnish: Päivää”|python3 -c ‘import sys; s=sys.stdin.read(); print(s.encode(“unicode_escape”));’ b’Hello in Finnish: P\\xe4iv\\xe4\\xe4\\n’

Posted in Uncategorized | Tagged , , , , , , , , , , , , | Leave a comment

Python RegEx One-Liner in a Pipe – Remove Hard Line Wrapping – No Perl

Just put Python in your pipe and let Perl rest in peace. Python can be used as a one-liner in a pipe. Replacing text with a regular expression used to be the last holdout of perl, but now you can … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment

Hello Puppet revisited – on Ubuntu 12.04 LTS

Learn “Hello Puppet World” in 5 minutes. Write one-liners & modules. Meet the configuration management system used by Google and Wikipedia.

Posted in Uncategorized | Tagged , , , , , , , , , , | Leave a comment
  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects