(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
augeas { "ntp.conf": | |
context => "/files/etc/ntp.conf", | |
changes => [ | |
"rm server[.]", | |
"set server timehost.tconet.net", | |
"clear server[. = 'timehost.tconet.net']/iburst", | |
"set server[. = 'timehost.tconet.net']/maxpoll 9", | |
"clear server[. = 'timehost.tconet.net']/prefer", | |
], | |
require => Package["ntp"], |
Carbon relay - performance | |
alias(color(sumSeries(group(carbon.agents.*.updateOperations)), "blue"),"Updates") | |
alias(color(sumSeries(group(carbon.agents.*.metricsReceived)), "green"), "Metrics Received") | |
alias(color(sumSeries(group(carbon.agents.*.committedPoints)),"orange"),"Committed Points")) | |
alias(secondYAxis(color(sumSeries(group(carbon.agents.*.pointsPerUpdate)),"yellow")),"PPU") | |
alias(secondYAxis(color(averageSeries(group(carbon.agents.*.cpuUsage)),"red")),"CPU (avg)") | |
alias(secondYAxis(color(sumSeries(group(carbon.agents.*.creates)),"purple")),"Creates") | |
Metrics received | |
carbon.agents.*.metricsReceived |
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask_httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |
#!/usr/bin/env python | |
from collections import deque | |
import Queue | |
import csv | |
import datetime | |
import os | |
import re | |
import subprocess | |
import multiprocessing as mp |
#!/bin/sh | |
# | |
# Build a chroot with a CentOS 6.5 base install. | |
# | |
CHROOT=/tmp/chroot | |
mkdir -p $CHROOT | |
mkdir -p $CHROOT/var/lib/rpm |
#!/bin/bash | |
# | |
# consul Manage the consul agent | |
# | |
# chkconfig: 2345 95 95 | |
# description: Consul is a tool for service discovery and configuration | |
# processname: consul | |
# config: /etc/consul.conf | |
# pidfile: /var/run/consul.pid |
# -*- coding: utf-8 -*- | |
#test on python 3.4 ,python of lower version has different module organization. | |
import http.server | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import socketserver | |
PORT = 8080 | |
Handler = http.server.SimpleHTTPRequestHandler |