Skip to content

Instantly share code, notes, and snippets.

@poom
poom / git-commit-log-stats.md
Created August 27, 2023 15:20 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@poom
poom / Use Yubikey (GPG key) for SSH.md
Created May 6, 2021 05:57 — forked from jacquesbh/Use Yubikey (GPG key) for SSH.md
Use my Yubikey with GPG keys to SSH with a guest computer (OSX or Windows)
@poom
poom / nginx-ssl.conf
Created June 9, 2017 01:04
Configuration to get an A+ on the Qualys SSL Labs test with fast performing and low overhead SSL ciphers. Works in combination with nginx 1.6.0 full and OpenSSL v1.0.1i.
# I've used the configuration below for all my nginx instances and gotten an A+ on the Qualys SSL Test
# (https://www.ssllabs.com/ssltest/index.html). It satisfies requirements for PCI Compliance and
# FIPS. Includes OCSP Stapling (http://en.wikipedia.org/wiki/OCSP_stapling) and HTTP Strict Transport
# Security (http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security).
# - Not vulnerable to the Heartbleed attack.
# - Not vulnerable to the OpenSSL CCS vulnerability (CVE-2014-0224) with OpenSSL v1.0.1i 6 Aug 2014 & Nginx 1.6.0
# - SSL Handshake takes <80ms on most modern server hardware
# Use within the "server" scope among other directives
@poom
poom / SimpleICS.php
Created November 21, 2016 03:04 — forked from furkanmustafa/SimpleICS.php
Simple ICS Generation class for PHP
<?php /*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@poom
poom / PHPtoICS.php
Created November 21, 2016 03:04 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
@poom
poom / keybase.md
Created July 8, 2016 08:53
Please publicly post the following Gist, and name it keybase.md

Keybase proof

I hereby claim:

  • I am poom on github.
  • I am poom (https://keybase.io/poom) on keybase.
  • I have a public key ASA5z5aJXkLVIDMAfip6n7dp4WckIhzBa_g0vEkpEK47Cgo

To claim this, I am signing this object:

sub docTest
set HotelList = ActiveDocument.Variables("LB276")
set Montyly = ActiveDocument.Variables("LB277")
HotelList.SetContent "Asoke" , true
'Montyly.SetContent "January" , true
'MsgBox getVariable("LB276")
end sub
function getVariable(varName)
set v = ActiveDocument.Variables(varName)
@poom
poom / regex-email.txt
Created June 24, 2014 02:42
Regular expression for Email
# Refer: http://www.w3.org/TR/html-markup/input.email.html
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@poom
poom / gist:4073207
Created November 14, 2012 16:41 — forked from supermethod/gist:913394
Convert a PHP array into XML file using SimpleXML
class ArrayToXML
{
/**
* The main function for converting to an XML document.
* Pass in a multi dimensional array and this recrusively loops through and builds up an XML document.
* Based on: http://snipplr.com/view/3491/convert-php-array-to-xml-or-simple-xml-object-if-you-wish/
*
* @param array $data
* @param string $rootNodeName - what you want the root node to be - defaultsto data.
* @param SimpleXMLElement $xml - should only be used recursively