Skip to content

Instantly share code, notes, and snippets.

esfand / lookupstate.adoc
Last active Jul 31, 2020
State Lookup SQL Table
View lookupstate.adoc
esfand / asciidoc-artible.adoc
Created Mar 14, 2014
Asciidoc Article Template
View asciidoc-artible.adoc

AsciiDoc Syntax Quick Reference

esfand /
Last active Dec 31, 2019
Rsyslog queues

Main Queue

This object is available since 7.5.3. It permits to specify parameters for the main message queue. Note that only queue-parameters are permitted for this config object. This permits to set the same options like in ruleset and action queues. A special statement is needed for the main queue, because it is a different object and cannot be configured via any other object.

Note that when the main_queue() object is configured, the legacy $MainMsgQ... statements are ignored.

A Simple Example

    queue.size="100000"      # how many messages (messages, not bytes!) to hold in memory
    queue.type="LinkedList"  # allocate memory dynamically for the queue. Better for handling spikes
esfand /
Last active Dec 31, 2019
Nginx Location Ruels

Serving multiple webapps from different folders

November 29, 2011 developmentNginx

Few days ago I had to add a wordpress installation within the same environment where a Codeigniter app was already running happily and undisturbed.

It took me a while to figure out how to keep separate folders on the filesystem, and serve the blog from a subfolder of the main domain:

esfand / lookuptable.adoc
Last active Dec 21, 2019
SQL: Creating a lookup table
View lookuptable.adoc

SQL: Creating a Lookup SQL Table

Creating a Lookup SQL Table

esfand /
Last active Dec 3, 2019
Nginx Variables

Embedded Variables

The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:

  • $arg_name
    argument name in the request line
esfand /
Last active Nov 26, 2019
Tomcat with Multiple Virtual Host

I configured my single tomcat to host 2 services at different connector port like this :-

<!-- WebApp 1-->
<Service name="webapps1">
    <Connector port="7001" 
esfand /
Last active Sep 3, 2019
Serving Static Content with Nginx

OFBiz or Bonsai ERP, and nginx

Submitted by anne on 10 Oct 2011

OFBiz can quite happily service all http and https requests on its own, and many people run it this way.

However there are many possible reasons why you might want to put OFBiz behind a traditional http server, such as Apache. Perhaps you want to more efficiently serve static resources, or manage virtual domains, or restrict access in complicated ways, or also serve php or cgi pages.

Typically OFBiz is placed behind Apache using a connector such as mod_proxy_ajp, as documented at How To Httpd .

esfand /
Created May 28, 2018 — forked from ajumell/
Webfaction Magento Insatll script.
#!/bin/env python2.4
"autostart": not applicable
"extra info": Do you agree to Magento's license?
esfand / utf8.c
Created Aug 14, 2019 — forked from stanislaw/utf8.c
Some C functions to work with UTF-8 string : you can check if a string is valid UTF-8, get the length of a UTF-8 string and replace things in a UTF-8 string. All `char *` arguments must be regular, null-byte terminated, C strings. I've tried to optimize the best I could. I'd be grateful for any suggestions or improvements. Please note I have onl…
View utf8.c
// utf8.c
// training
// Created by Conrad Kleinespel on 5/27/13.
// Copyright (c) 2013 Conrad Kleinespel. All rights reserved.
#include <stdio.h>
#include <stdlib.h>
You can’t perform that action at this time.