View fold.js
/*eslint-env es6 */ | |
// Inspired by the paper "A tutorial on the universality and | |
// expressiveness of fold" by Graham Hutton (available at | |
// http://www.cs.nott.ac.uk/~gmh/fold.pdf), implementing some generic | |
// list handling functions in JavaScript in terms of `fold`. | |
// Personally I had an enlightnening moment when I realised the | |
// beautiful interplay of cons lists and foldr during the FP101x | |
// Haskell course. JavaScript's syntax doesn't make this very apparent |
View Prettier security.js
//OnPageInit(); //For some reason the OnLoad does not execute with Arcot Cards. | |
//Checks to see if "Chip Password" is in the authentication method list | |
//or is the default authentication method | |
function ChipCardInAuthList() { | |
var retValue = false; | |
var objAuthType = document.forms[0].authSelect; | |
if (objAuthType != null) { | |
var optLength = objAuthType.length; | |
var idx; | |
for (idx = 0; idx < optLength; idx++) { |
View refactoring-property-based.js
const fc = require('fast-check'); | |
const _ = require('lodash'); | |
let selectNames = data => { | |
let names = []; | |
data.forEach(element => { | |
names.push(element.name); | |
}); | |
return names; | |
}; |
View rancher-singlenodeinstall-selfsignedcert.sh
#!/bin/bash | |
if [[ $DEBUG == "true" ]]; then | |
set -x | |
fi | |
# Check if FQDN is given | |
if [ -z "$1" ]; then | |
echo "Usage: $0 rancher.yourdomain.com" | |
exit 1 | |
fi |
View react-clearfix.js
'use strict'; | |
import React from 'react'; | |
export default class Clearfix extends React.Component { | |
render() { | |
const beforeStyle = { | |
display: 'table' | |
}; |
View flake8-mypy.cfg
[mypy] | |
mypy_path=typeshed | |
# Specify the target platform details in config, so your developers are | |
# free to run mypy on Windows, Linux, or macOS and get consistent | |
# results. | |
python_version=3.6 | |
platform=linux |
View TinkerPop documentation deprecation warning.md
####Attention: this Wiki hosts an outdated version of the TinkerPop framework and Gremlin language documentation.
####Please visit the [Apache TinkerPop website](http://tinkerpop.apache.org/) and [latest documentation](http://tinkerpop.apache.org/docs/current/reference/).
View Gremlin Server JS serialization format.md
Vertices
Current format
{
"id": 1,
"label": "vertex",
"type": "vertex",
"properties": {
"name": [
View Gremlin Server bindings.md
Raw message sent:
{
"requestId": "56da9f40-d32f-11e5-bea1-0164965f4534",
"processor": "",
"op": "eval",
"args": {
"gremlin": "foo",
"bindings": {
"foo": {
View secundus.properties
gremlin.graph=com.thinkaurelius.titan.core.TitanFactory | |
storage.backend=cassandrathrift | |
storage.hostname=127.0.0.1 | |
storage.cassandra.keyspace=secundus | |
index.secundus.backend=elasticsearch | |
index.secundus.hostname=127.0.0.1 |
NewerOlder