View gist:0848ba4d9dbd66d3e32e007f6708267f

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

View keybase.md

Keybase proof

I hereby claim:

  • I am voidabhi on github.
  • I am voidabhi (https://keybase.io/voidabhi) on keybase.
  • I have a public key ASD6YnhMOVqP8nqcsYjygYAPhRgkDmpTW66dmVENYHdKZQo

To claim this, I am signing this object:

View helpers.go
// GetBytes accepts any object (interface{]}) and returns its json encoded byte array
func GetBytes(key interface{}) ([]byte) {
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
err := enc.Encode(key)
if err != nil {
return []byte("")
}
return buf.Bytes()
View benchmark.py
import time
def print_numbers(n):
for i in xrange(n):
pass
class BM(object):
View stdio.py
# coding=UTF-8
"""
@example
from stdio import stdio
stdio.write('hello world')
data = stdio.read()
print stdio.STDIN_FILENO
print stdio.STDOUT_FILENO
"""
import thread
View checkconfig.sh
#!/bin/bash
# list all services
chkconfig --list
# check status of specific service
chkconfig --list | grep httpd
# start perticular service on run levels
chkconfig --level 35 httpd on
View ConsoleLogger.php
<?php
namespace Logging;
use Psr\Log\AbstractLogger;
/**
* Class ConsoleLogger
*
* @package Thruway
View node-sample-commandline.js
var fs = require('fs');
function parseArg(opt) {
var args = Array.prototype.slice.call(process.argv, 2);
var matches = args.filter(function(arg) {
return arg.indexOf(opt) > -1;
});
if (Array.isArray(matches) && matches.length) {