javascript: document.body.setAttribute( "style", "-webkit-transform: rotate(-90deg);");
paste into JS console: Ctrl-Shift-C -> "Console" from top menu
SELECT idx.relname as table, | |
idx.indexrelname as index, | |
pg_relation_size( idx.indexrelname::text )/1024/1024 as bytes, | |
cls.relpages as pages, | |
cls.reltuples as tuples, | |
idx.idx_scan as scanned, | |
idx.idx_tup_read as read, | |
idx.idx_tup_fetch as fetched | |
FROM pg_stat_user_indexes idx, | |
pg_class cls , |
# Make mouse useful in copy mode | |
setw -g mode-mouse on | |
# Allow mouse to select which pane to use | |
set -g mouse-select-pane on | |
# Allow mouse dragging to resize panes | |
set -g mouse-resize-pane on | |
# Allow mouse to select windows |
Sample code for blog post Benchmarking IEnumerables in F# - Seq.timed
One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:
module Helper | |
open Fable.Import.Browser | |
let private toList (nodeList:NodeListOf<Element>) = | |
let length = nodeList.length - 1.0 | |
[0.0 .. length] | |
|> List.map (fun i -> nodeList.item i :?> HTMLElement) | |
let dollar selector (element:HTMLElement) = |
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger(); |
module ReactErrorBoundary | |
open Fable.Core | |
open Fable.Import | |
open Fable.Helpers.React | |
type [<AllowNullLiteral>] InfoComponentObject = | |
abstract componentStack: string with get | |
[<Pojo>] |
module ConsoleTracer | |
open System | |
open Fable.Core | |
// Use it when initializing your Elmish app like this | |
//|> Program.withTrace ConsoleTracer.withTrace | |
let getMsgNameAndFields (t: Type) (x: 'Msg): string * obj = | |
let rec getCaseName (t: Type) (acc: string list) (x: obj) = |