Standard escape codes are prefixed with Escape:
- Ctrl-Key: ^[
- Octal: \033
- Unicode: \u001b
- Hexadecimal: \x1B
- Decimal: 27
| server { | |
| listen 80; | |
| server_name localhost; | |
| location /oauth2/ { | |
| proxy_pass http://oauth-proxy:4180; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Scheme $scheme; | |
| proxy_set_header X-Auth-Request-Redirect $request_uri; | 
| # This work with selenium | |
| from selenium.webdriver import Chrome | |
| from selenium.webdriver.chrome.options import Options | |
| from splinter.driver.webdriver import BaseWebDriver, WebDriverElement | |
| options = Options() | |
| options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'}) | |
| browser = BaseWebDriver() | 
| #!/bin/bash | |
| tail -n0 -F "$1" | while read LINE; do | |
| (echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
| "payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2"; | |
| done | 
$ uname -r 
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| #! /usr/bin/env python | |
| # coding: utf-8 | |
| ''' | |
| auto switch keyboard between different applications | |
| if you want to change the app list, modify the var 'ignore_list' | |
| ''' | |
| from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey | 
| #!/usr/bin/env python | |
| """How to do regular expressions in sqlite3 (using python).""" | |
| from __future__ import division, absolute_import, print_function, unicode_literals | |
| import re | |
| import sys | |
| import time | |
| import datetime | |
| import sqlite3 | 
| #!groovy | |
| # Best of Jenkinsfile | |
| # `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
| node { | |
| } |