This file contains hidden or 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/local/bin/awk -f | |
# echo -e "Jane Doe\n123 Main Street\nAnywhere, SE 12345-6789\n\nJohn Smith\n456 Tree-lined Avenue\nSmallville, MW 98765-4321" | ./include-test.awk | |
#@include "/Users/jhyland/Documents/scripts/awk/utils.awk" | |
function resetVhost() { | |
vhost["server_name"] = "" | |
vhost["document_root"] = "" | |
vhost["error_log"] = "" | |
vhost["access_log"] = "" | |
vhost["cfg_file"] = "" |
This file contains hidden or 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/local/bin/awk -f | |
# Todo: | |
# skip empty rows | |
# Look for duplicate pids | |
# Validate data types in columns: | |
# - pid (int) | |
# - ppid (int) | |
# - uid (int) | |
# - ruid (int) |
This file contains hidden or 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/awk -f | |
# Examples | |
# $ ps -o pid,user,cpu,%cpu,%mem,nswap,sess,tty | ./ps_total.awk | |
# Count : 58 | |
# USER : 0 | |
# CPU : 0 | |
# %CPU : 1.8 | |
# %MEM : 2.5 | |
# NSWAP : 0 |
This file contains hidden or 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
<div class="row"> | |
<div class="col-md-3 col-sm-6"> | |
<div class="widget widget-stats bg-blue-grey"> | |
<div class="stats-icon stats-icon-lg"><i class="fa fa-fw fa-globe"></i></div> | |
<div class="stats-title">Todays Visits</div> | |
<div class="stats-number">123</div> | |
<div class="stats-progress progress"> | |
<div class="progress-bar" style="width: 70.1%;"></div> | |
</div> | |
<div class="stats-desc">Better than last week (70.1%)</div> |
This file contains hidden or 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
'use strict' | |
import React, { Component } from 'react' | |
import PageLoader from './PageLoader' | |
import IconFactory from './IconFactory' | |
import Tree from 'react-ui-tree' | |
//import Panel from './Panel' | |
import Header from './Header' | |
import Sidebar from './Sidebar' | |
import TreeView from './TreeView' |
This file contains hidden or 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
'use strict' | |
import React, { Component } from 'react' | |
import _ from 'lodash' | |
import ReactBootstrap, { | |
Button, ButtonGroup, DropdownButton, ButtonToolbar, OverlayTrigger, Tooltip, Popover, | |
MenuItem, Nav, NavItem, Breadcrumb, PageHeader, Table, Panel, | |
ListGroup, ListGroupItem, Jumbotron, Grid, Row, Col, Alert, Glyphicon, | |
} from 'react-bootstrap' | |
import PropTypes from 'prop-types' |
This file contains hidden or 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
var _ = require('lodash') | |
var expect = require('chai').expect | |
var Account = require('../models/Account') | |
describe('Account model', function() { | |
describe('schema item', function() { | |
// Account.username | |
describe('"username"', function() { |
This file contains hidden or 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
'use strict' | |
var _ = require('lodash') | |
var expect = require('chai').expect | |
var Account = require('../models/Account') | |
var testData = { | |
// Default data for test account | |
testAccount: { |
This file contains hidden or 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
'use strict' | |
const Mongoose = require( 'mongoose' ) | |
const _ = require( 'lodash' ) | |
const _internal = { | |
states: { | |
// List of valid Mongoose states | |
readyStates: [ | |
'disconnected', // readyState: 0 |
This file contains hidden or 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
'use strict' | |
//const _ = require( 'lodash' ) | |
const _ = require('../mongoose-mixins') | |
const Async = require( 'async' ) | |
const Util = require( 'util' ) | |
const Path = require( 'path' ) | |
const Mongoose = require( 'mongoose' ) | |
const Promise = require( 'bluebird' ) |