Skip to content

Instantly share code, notes, and snippets.

@prantlf
prantlf / logger.js
Last active February 22, 2022 09:56 — forked from rtgibbons/logger.js
Logger Library with winston - Fixed for additional log arguments
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
@prantlf
prantlf / jasmine.toBeTypeOf.js
Last active September 2, 2018 00:13 — forked from adamyanalunas/jasmine.toBeTypeOf.js
A Jasmine matcher checking if the actual object is of the expected type
// Checks if the actual object is of the expected type;
// the string `expected` is handled case-insensitively.
//
// Example:
// expects(123).toBeTypeOf("Number");
jasmine.Matchers.prototype.toBeTypeOf = function(expected) {
var actual = this.actual,
notText = this.isNot ? ' not' : '',
objType = actual ? Object.prototype.toString.call(actual) : '';
this.message = function() {
@prantlf
prantlf / base64.hpp
Last active December 21, 2015 12:18 — forked from nico159/base64.hpp
Interface for stateful and stateless BASE64 encoding. (Maintaining the encoding state is needed when encoding chunked or stream input.)
#ifndef BOOST_NETWORK_UTILS_BASE64_ENCODE_HPP
#define BOOST_NETWORK_UTILS_BASE64_ENCODE_HPP
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <algorithm>
#include <iterator>
#include <string>
namespace boost {
/**
* beautify_oscript.lxe - A code beautifier for OpenText Content Server OScript
*
* This script will beautify your OScript. Copy to a file within opentext/scripts/
* (e.g., opentext/scripts/beautify_oscript.lxe), restart Builder, place the focus on a
* script window, and run from the Tools menu.
*
* Some coding conventions assumed. Use at your own risk.
*
* Christopher Meyer (chris@schwiiz.org)