text:
var OpenIdm = require('../lib/openidm');

var openidm = new OpenIdm({
    host : 'localhost',
    port : 8080,
    userName : 'openidm-admin',
    password : 'openidm-admin'
});

// Read managed object
var readed = openidm.get('managed/user/user001', function(err, data) {
    if (err) {
        console.log("Error: " + err.message);
        console.log("Error: " + err.response.message);
        return;
    }

    console.log(data);
});


text:
// @flow

/**
 * Main application file
 */

import type { $Application, $Request, $Response } from "express";

import express from "express";
import mongoose from "mongoose";
import config from "./config/environment";
import https from "https";
import http from "http";
import fs from "fs";
import routes from "./routes";
import configExpress from "./config/express";
import path from "path";
import { seedTestData } from "./config/seed";

// Connect to database
mongoose.Promise = global.Promise;
mongoose.connect(
  config.mongo.uri,
  config.mongo.options
);

// Populate DB with sample data
if (config.seedDB) {
  seedTestData();
}

// new for HTTPS
const options = {
  cert: fs.readFileSync(path.join(__dirname, "./cert/certificate.crt"), "utf8"),
  key: fs.readFileSync(path.join(__dirname, "./cert/server.key"), "utf8")
};

// Setup server
const app: $Application = express();

// new for HTTPS
const server = https.createServer(options, app);
configExpress(app, mongoose.connection);
routes(app);

// Start server
server.listen(config.httpsPort, config.ip, () => {
  console.log(
    "Express server listening on %d, in %s mode",
    config.httpsPort,
    config.env
  );
});

// redirect to HTTPS
http
  .createServer((req: $Request, res: $Response) => {
    res.writeHead(301, { Location: config.url });
    res.end();
  })
  .listen(config.httpPort);

// Expose app
export default app;

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CIBoard Admin</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/bootstrap.min.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/bootstrap-theme.min.css'); ?>" />
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/css/datepicker3.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo element('layout_skin_url', $layout); ?>/css/style.css" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/earlyaccess/nanumgothic.css" />
<?php if (element('favicon', $layout)) { ?><link rel="shortcut icon" type="image/x-icon" href="<?php echo element('favicon', $layout); ?>" /><?php } ?>

<a href="<?php echo admin_url(); ?>"><?php echo $this->cbconfig->item('admin_logo'); ?>

            <?php
            foreach (element('admin_page_menu', $layout) as $__akey => $__aval) {
            ?>
                <li class="nav-first-level nav_menuname_<?php echo $__akey; ?> <?php echo (element('menu_dir1', $layout) === $__akey) ? 'active' : ''; ?>">
                    <a data-toggle="menu_collapse" href="#collapse<?php echo $__akey; ?>" aria-expanded="false" aria-controls="menu_collapse<?php echo $__akey; ?>" onClick="changemenu('<?php echo $__akey; ?>');" class="<?php echo (element('menu_dir1', $layout) === $__akey) ? '' : 'collapsed'; ?>">
                        <i class="fa <?php echo element(1, element('__config', $__aval)); ?>">
                        <?php echo element(0, element('__config', $__aval)); ?>
                        <i class="fa <?php echo (element('menu_dir1', $layout) === $__akey) ? 'fa-angle-down' : 'fa-angle-left'; ?> menu-arrow-icon <?php echo $__akey; ?>">

                    <ul class="nav nav-second-level menu_collapse collapse <?php echo (element('menu_dir1', $layout) === $__akey) ? 'in' : ''; ?>" id="menu_collapse<?php echo $__akey; ?>" <?php echo (element('menu_dir1', $layout) === $__akey) ? '' : 'style="height:0;"'; ?>>
                        <?php
                        foreach (element('menu', $__aval) as $menukey => $menuvalue) {
                            if (element(2, $menuvalue) === 'hide') {
                                continue;
                            }
                        ?>
                            <li <?php echo (element('menu_dir1', $layout) === $__akey && element('menu_dir2', $layout) === $menukey) ? 'class="active"' : ''; ?>><a href="<?php echo admin_url($__akey . '/' . $menukey); ?>" <?php echo element(1, $menuvalue); ?> ><?php echo element(0, $menuvalue); ?>

                        <?php
                        }
                        ?>

            <?php
            }
            ?>

                    <a href="<?php echo site_url(); ?>" target="_blank">홈페이지로 이동

<a href="<?php echo site_url('login/logout'); ?>"> Log out

            <?php echo element('menu_title', $layout) ? '
' . element('menu_title', $layout) . '
' : ''; ?>

            <?php echo $yield; ?>

    Powered by <a href="<?php echo config_item('ciboard_website'); ?>" target="_blank">FunnyWare,
    Your Version <?php echo CB_VERSION; ?>
    Top


text:
var _ = require('lodash');
var stream = require('akostream');
var path = require('path');
var Data = require('./data.js');

var utils = {};

utils.stream = stream;

utils.fs = {
    // track file stack
    track: function(file) {
        var FileSystem = require('./fs.js');
        var ReadStream = require('./read_stream.js');

        if(FileSystem.fs.existFile(file)) {
            file = FileSystem.fs.pathResolve(file);
            var readStream = new ReadStream(file);

            return _.clone(readStream.trackStack);
        } else {
            return false;
        }
    },
    dependentFile: function(file, callback) {
        var FileSystem = require('./fs.js');

        file = FileSystem.fs.pathResolve(file);
        if(Data.virtualFileTraceTree[file]) {
            callback(null, _.clone(Data.virtualFileTraceTree[file]));
        } else {
            FileSystem.fs.readFile(file, function(error, buffer) {
                if(error) {
                    callback(error, null);
                } else {
                    callback(null, _.clone(Data.virtualFileTraceTree[file]));
                }
            });
        }
    },
    getByDependentFile: function(file) {
        var FileSystem = require('./fs.js');

        file = FileSystem.fs.pathResolve(file);
        return _.clone(Data.virtualFileTraceTreeB[file] || []);
    },
    map2local: function(file, callback, option) {
        option || (option = {});
        callback || (callback = function() {});
        var FileSystem = require('./fs.js');
        var fs = FileSystem.fs;
        var cwd = process.cwd();

        file = fs.pathResolve(file);
        if(fs.existFile(file, {notFs: true})) {
            try {
                var readStream = fs.createReadStream(file);
                var writeStream = fs.createWriteStream(file, {focus: true});
            } catch(e) {
                callback(e);
            }

            readStream.on('error', function(e) {
                callback(e);
            });
            readStream.pipe(writeStream, {end: false});
            readStream.on('end', function() {
                callback();
            });
        } else {
            var errorMsg = 'not exist file '+path.relative(cwd, file);
            callback(new Error(errorMsg));
        }
    },
    mapAll2local: function(callback, option) {
        option || (option = {});

        var FileSystem = require('./fs.js');
        var fs = FileSystem.fs;
        var files = this.getAllVirtualFiles();
        var builded = _.clone(files);
        var total = 0;

        var build = function() {
            var file = files.shift();

            if(file) {
                total++;
                /**
                 * 受操作系统的限制一次性打开太多文件会报错
                 * 修改成生成构建好一个再构建下一个
                 */
                utils.fs.map2local(file, function(e) {
                    if(e) {
                        callback(e);
                    } else {
                        build();
                    }
                }, option);
            } else {
                callback(null, builded);
            }
        }
        build();
    },
    getAllVirtualFiles: function(options) {
        !options || (options = {});

        var files = _.keys(Data.virtualFiles);
        var tempFiles = _.clone(Data.virtualTemporaryFile);

        tempFiles.unshift(files);

        files = _.without.apply(_, tempFiles);

        return files;
    }
};

utils.debug = {
    showMem: function() {
        if(!bone.status.debug) {
            return false;
        }
        var mem = process.memoryUsage();
        var format = function(bytes) {
          return (bytes/1024/1024).toFixed(2)+'MB';
        };
        bone.log.debug('Process: heapTotal '+format(mem.heapTotal) + ' heapUsed ' + format(mem.heapUsed) + ' rss ' + format(mem.rss));
        bone.log.debug('----------------------------------------');
    }
};

module.exports = _.extend(utils, _);