parse @message /Query_time: (?<queryTime>.*?) Lock_time: (?<lockTime>.*?) Rows_sent: (?<rowsSent>.*?) Rows_examined: (?<rowsExamined>.*?)\s(?<query>.*?)$/
| filter @message like /(?i)insert/
| sort queryTime desc
| limit 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
JSON-to-Go | |
by Matt Holt | |
https://github.com/mholt/json-to-go | |
A simple utility to translate JSON into a Go type definition. | |
*/ | |
function jsonToGo(json, typename) { | |
let data; | |
let scope; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { Table, Button, Space, Row, Col } from "antd"; | |
import { LeftOutlined, RightOutlined } from "@ant-design/icons"; | |
const CursorPagination = ({ lastEvaluatedKey, onChange, size }) => { | |
/* Use stack to keep track of which evaluated keys have been previously seen */ | |
const [ prevEvaluatedKeys, setPrevEvaluatedKeys ] = useState([]); | |
/* Keep track of the current evaluated key */ | |
const [ currentEvaluatedKey, setCurrentEvaluatedKey ] = useState(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT GROUP_CONCAT('kill ',id SEPARATOR '; ') AS kill_list | |
FROM INFORMATION_SCHEMA.PROCESSLIST | |
WHERE command='Sleep'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A little script to recover deleted recording of a mongoDB db file | |
There's no optimization but it work and has saved me | |
""" | |
import struct | |
import bson | |
import pymongo | |
import sys |
https://github.com/djvirgen/virgen-acl Simple and elegant, create your own checks. No middleware?
https://github.com/OptimalBits/node_acl Use as middleware, create your own roles and access. Great choice.
https://github.com/tschaub/authorized Similar to connect roles... but a bit more robust? you can create roles and action, and associate many roles with that action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var directives = angular.module('app', []); | |
// override the default input to update on blur | |
directives.directive('input', function () { | |
return { | |
restrict: 'E', | |
require: 'ngModel', | |
link: function (scope, elm, attr, ngModelCtrl) { | |
if (attr.type === 'radio' || attr.type === 'checkbox') return; |