A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord| import transformTypescript from "@babel/plugin-transform-typescript" | |
| import {declare} from "@babel/helper-plugin-utils" | |
| import {types as t, PluginObj, Node, NodePath} from "@babel/core" | |
| import template from "@babel/template" | |
| import { | |
| TSTypeAliasDeclaration, | |
| TSType, | |
| TSTypeParameter, | |
| TSUnionType, | |
| TSTypeReference, | 
Note: Consider using mitmproxy instead of Charles. There is better, more recent, documentation for using mitmproxy on Android.
| import { fromGlobalId } from 'graphql-relay'; | |
| import { Model, Types } from 'mongoose'; | |
| // returns an ObjectId given an param of unknown type | |
| export const getObjectId = (target: string | Model<any> | Types.ObjectId): Types.ObjectId | null => { | |
| if (target instanceof Types.ObjectId) { | |
| return new Types.ObjectId(target.toString()); | |
| } | |
| if (typeof target === 'object') { | 
FLIPPER_VERSION=0.39.0 without successPeter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers | 
| import React from 'react' | |
| import { Link } from 'systems/Core/Link' | |
| import css from 'styled-jsx/css' | |
| export const Header = () => { | |
| return ( | |
| <header className="Root"> | |
| <img src="/logo.svg" width={100} /> | |
| <div className="MainMenu"> | |
| <ul className="MenuList"> | 
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| const WebpackNodeExternals = require('webpack-node-externals'); | |
| const ReloadServerPlugin = require('reload-server-webpack-plugin'); | |
| const cwd = process.cwd(); | |
| module.exports = { | 
Quantitative type theory (QTT) is an extension of dependent type theory which allows us to track the number of computational (non-erased) uses of variables in well-typed lambda terms. With such usage information, QTT allows us to combine dependent types with substructural types, such as linear, affine or relevant types.
While in a Martin-Löf style type theory typing judgments are of form
x1 : A1, ..., xn : An ⊢ b : B, in QTT the bindings in the context