View telnet-imap
openssl s_client -crlf -connect imap.gmail.com:993
tag login user@gmail.com passwordhere
tag list "" "*"
tag select "inbox"
tag fetch 1:3 body[header]
tag fetch 3 body[header]
tag fetch 3 body[text]
tag fetch 2 all
tag fetch 2 fast
tag fetch 2 full
View grid-bookmarklet.js
javascript:(function () {
var BASE_PIXELS = 8;
var baselineNode = document.querySelector(".baseliner-overlay");
if (baselineNode) {
baselineNode.remove();
return;
}
var body = document.body,
html = document.documentElement,
height = Math.max(body.scrollHeight, body.offsetHeight,
View higher-order-arrow-explaination.js
// ======================================
// HIGHER ORDER CURRIED ARROW FUNCTIONS
// ======================================
// Double arrows are great for creating functions
// that dont need all their arguments at once
// This is best for functions that need configuration
// before running on an active value.
// So here we have a function called
View sortable_table_exercise.js
import React, { Component } from 'react';
import './App.css';
const SORT_UP = 'up';
const SORT_DOWN = 'down';
function alphanumeric(a,b){
if(a === b){ return 0; }
return a > b ? 1 : 0;
}
View keystone_roles_permissions.md

Keystone Roles & Permissions Support

The following documents the user permission support in keystone based on the support being added via PR #2111. Permissions are based on roles. If a user has a role and the list also specifies that role for any of its CRUD operations then it is permissive for the user to perform whichever CRUD operation matches the role. All users must define, at least, one role. The following are guidelines for adding role/permission support to your application:

Define a Role List Model:

View switch-test-render.js
const Switch = (props) => <span>{props.children}</span>;
const Case = (props) => props.expr && props.children;
const TestInstantiated = (props) => {
console.log(`${props.id}: I was rendered`);
return <div>{props.id}</div>;
}
function TestSwitch() {
const val = 3;
View switch.jsx
const Switch = (props) => <span>{props.children}</span>;
const Case = (props) => props.expr && props.children;
function TestSwitch() {
const val = 3;
return (
<Switch>
<Case expr={val === 1}>
View switch_alternative.js
function one(){
console.log('do one');
}
function two(){
console.log('do two');
}
function three(){
console.log('do three');
View redux_simplification_1.js
import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { Observable, Subject } from 'rxjs/Rx';
const stateEmitter = new Subject();
const state$ = Observable.from(stateEmitter);
const sendEvent = (data) => () => {
stateEmitter.next({
View gist:f1df91251c1caf03464b
Promise.all(this.routes.filter(route => !!route).map(route => new Promise((resolve, reject) => this.context.executeAction(route.data, state, () => resolve())).then(() => callback(null));