Skip to content

Instantly share code, notes, and snippets.

@esfand
esfand / PrintValues
Created March 20, 2010 11:55
MSBuild Property Demo
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="PrintValues"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Add>$([MSBuild]::Add(5,9))</Add>
<Subtract01>$([MSBuild]::Subtract(90,768))</Subtract01>
<Mult01>$([MSBuild]::Multiply(4,9))</Mult01>
<Div01>$([MSBuild]::Divide(100,5.2))</Div01>
@esfand
esfand / innerclass.md
Last active May 2, 2022 11:14
Difference between static and non-static java inner class in Java

Difference between static and non-static java inner class.

A static java inner class cannot have instances. A non-static java inner class can have instances that belong to the outer class.


james vinett said on 16/11/2009,

@esfand
esfand / EntryPointTemplte.gwt.java
Created March 28, 2010 06:44
GWT EntryPoint JSON RPc
package com.lingona.rockgwt.front.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
@esfand
esfand / rsyslogque.md
Last active March 10, 2022 09:29
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

main_queue(    
    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
esfand / MSBuild Batching 1.xml
Created March 20, 2010 13:10
MSBuild Batching
<?xml version="1.0" encoding="utf-8"?>
<!-- MSBuild Batching -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<fruit Include="apple">
<consistency>firm</consistency>
</fruit>
<fruit Include="orange">
<consistency>pulpy</consistency>
@esfand
esfand / twitter.css
Created July 4, 2018 08:24 — forked from chloechantelle/twitter.css
Twitter CSS
@-moz-document domain("twitter.com")
{
/* custom options */
:root
{
--bg1: #1d1e2a !important;
--bg2: #14151F !important;
--text1: #aaa !important;
Book Title Goes Here
====================
Author's Name
v1.0, 2003-12
:doctype: book
[dedication]
Example Dedication
------------------
@esfand
esfand / nginxvarcore.md
Last active May 17, 2021 16:39
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
esfand / build_nginx_from_source.sh
Created June 15, 2018 23:00 — forked from a-luna/build_nginx_from_source.sh
Shell Script: Build NGINX from Source with Third Party Modules (Cache Purge, GeoIP2), Completely Non-Interactive, No User Input Required
#!/bin/bash -e
# build_nginx_from_source.sh
# Author: Aaron Luna
# Website: alunablog.com
#
# This script downloads the source code for the latest version of NGINX
# (libraries required to build various NGINX modules are also downloaded)
# and builds NGINX according to the options specified in the ./configure
# command. Many of the possible configuration options are explained at
# the link below:
# this is a config sample for log normalization, but can
# be used as a more complex general sample.
# It is based on a plain standard rsyslog.conf for Red Hat systems.
#
# NOTE: Absolute path names for modules are used in this config
# so that we can run a different rsyslog version alongside the
# regular system-installed rsyslogd. Remove these path names
# for production environment.
#### MODULES ####