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 f (~/.zshrc.d/**/*.sh) { | |
source $f | |
} | |
source ~/.zsh-keybindings | |
source ~/.zsh-prompt |
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
INPUT requests; | |
// example: { action: 'GET', path: '/', code: 200 } | |
OUTPUT requestmetrics; | |
// send out the number of requests in that window every 5 seconds | |
requestmetrics = GROUP requests | |
BY TIMEONLY |
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
<body> | |
<div class="label">Current Real-Time Server Requests</div> | |
<div id="request-count">0</div> | |
<div class="total">Total: | |
<span id="total-request-count">0</span> | |
</div> | |
<div class="footnote">Powered by | |
<a href="http://brightcontext.com">BrightContext</a> | |
</div> | |
</body> |
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
# download and extract the gist, then from inside the folder | |
chmod +x ./tail-web-logs.js | |
# install dependencies | |
npm i | |
# tail the web logs into the input | |
./tail-web-logs.js --apikey="your api key" --project="www metrics" --channel="weblogs" --input="requests" --logfile=/var/log/httpd/access_log |
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 node | |
/*global require, console */ | |
(function () { | |
'use strict'; | |
var | |
bcc = require('brightcontext'), | |
argv = require('optimist') |
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
# save to ~/.oh-my-zsh/colors/mancolors.zsh and add 'mancolors' to your ~/.zshrc plugin load list | |
man() { | |
env \ | |
LESS_TERMCAP_mb=$(printf "\e[1;34m") \ | |
LESS_TERMCAP_md=$(printf "\e[1;34m") \ | |
LESS_TERMCAP_me=$(printf "\e[0m") \ | |
LESS_TERMCAP_se=$(printf "\e[0m") \ | |
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ | |
LESS_TERMCAP_ue=$(printf "\e[0m") \ |
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
sudo su - | |
# install node | |
yum -y install git-all | |
# latest | |
cd /opt |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>bcc + webrtc</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
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
function gitprompt() { | |
local NONE="\033[0m" # unsets color to term's fg color | |
# regular colors | |
local K="\033[0;30m" # black | |
local R="\033[0;31m" # red | |
local G="\033[0;32m" # green | |
local Y="\033[0;33m" # yellow | |
local B="\033[0;34m" # blue | |
local M="\033[0;35m" # magenta |
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
#import <UIKit/UIKit.h> | |
#import "FlipCounterView.h" | |
void SplitTimeIntervalIntoComponents(NSTimeInterval t, int* hours, int* minutes, int* seconds); | |
@protocol CountdownViewDelegate; | |
@interface CountdownView : UIView |