This file contains 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
; -> ->> -<> -<>> for S7 Scheme | |
; inspired by https://github.com/nightfly19/cl-arrows and https://github.com/rplevy/swiss-arrows | |
(require stuff.scm) | |
; using: any? while | |
; replace those with your favorite scheme alternatives | |
; direct translation from https://github.com/nightfly19/cl-arrows | |
(define (arrow-proto handler initial-form forms) | |
(let ((output-form initial-form) |
This file contains 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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains 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 | |
import sys, os, time, platform | |
sample_ansi = '\x1b[31mRED' + '\x1b[33mYELLOW' + '\x1b[32mGREEN' + '\x1b[35mPINK' + '\x1b[0m' + '\n' | |
for handle in [sys.stdout, sys.stderr]: | |
if (hasattr(handle, "isatty") and handle.isatty()) or \ | |
('TERM' in os.environ and os.environ['TERM']=='ANSI'): | |
if platform.system()=='Windows' and not ('TERM' in os.environ and os.environ['TERM']=='ANSI'): |