Skip to content

Instantly share code, notes, and snippets.

@cmdel
cmdel / autopgsqlbackup
Created October 1, 2017 23:44 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@cmdel
cmdel / mongodbcheats.js
Created June 21, 2016 10:14 — forked from kgorman/mongodbcheats.js
MongoDB cheat sheet
/* MongoDB cheat sheet */
// replication lag via serverStatus()
db._adminCommand( { serverStatus : 1 , repl ; 2 } )
// stats
db.stats()
db.foo.stats()
// size of BSON of some query

Keybase proof

I hereby claim:

  • I am cmdel on github.
  • I am cmdel (https://keybase.io/cmdel) on keybase.
  • I have a public key whose fingerprint is 7BFE E0E3 9667 7CEF 85DF 2EE3 0C76 2659 ED49 BD51

To claim this, I am signing this object:

// Terminal request client
//
static void Main(string[] args)
{
_client = new RequestClient<IRequest, IResponse<DataTable>>("request_client_FromTerminal", x =>
{
// Extra configuration for the ReceivePoint
x.Handler<IRequest>(async context =>
//Console.WriteLine("Received: {0}",context.Message.GetHashCode()));
Logger.Log(String.Format("Message received at: {0}", context.Message.GetHashCode())));
// Async console application
static class Program
{
static RequestClient<SimpleCommand, SimpleResult> _client;
static void Main(string[] args)
{
_client = new RequestClient<SimpleCommand, SimpleResult>("testing_req_res");
Console.WriteLine("Created the request client");
var mainAsync = Get();