start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env bash | |
| # Enable or disable git hooks | |
| #find .git/hooks/ -type f ! -name "*.*" | |
| gitHooks=.git/hooks/ | |
| echo "git Hooks $gitHooks" | |
| option="${1}" |
| import java.util.HashMap; | |
| import spark.Filter; | |
| import spark.Request; | |
| import spark.Response; | |
| import spark.Spark; | |
| /** | |
| * Really simple helper for enabling CORS in a spark application; | |
| */ | |
| public final class CorsFilter { |
| import argparse | |
| import logging | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--verbose', '-v', action='count', default=1) | |
| args = parser.parse_args() | |
| args.verbose = 70 - (10*args.verbose) if args.verbose > 0 else 0 | |
| logging.basicConfig(level=args.verbose, format='%(asctime)s %(levelname)s: %(message)s', |
| from BaseHTTPServer import BaseHTTPRequestHandler | |
| import urlparse, json | |
| class GetHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): | |
| parsed_path = urlparse.urlparse(self.path) | |
| message = '\n'.join([ | |
| 'CLIENT VALUES:', | |
| 'client_address=%s (%s)' % (self.client_address, |
| #!/bin/bash | |
| FILES=`git ls-tree --name-only HEAD .` | |
| MAXLEN=0 | |
| IFS=$(echo -en "\n\b") | |
| for f in $FILES; do | |
| if [ ${#f} -gt $MAXLEN ]; then | |
| MAXLEN=${#f} | |
| fi | |
| done |
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python (Updated for Python 3.7) | |
| Usage: | |
| ./dummy-web-server.py -h | |
| ./dummy-web-server.py -l localhost -p 8000 | |
| Send a GET request: |