Skip to content

Instantly share code, notes, and snippets.

View msapariya's full-sized avatar

Manish Sapariya msapariya

  • kPoint Technologies Pvt Ltd
  • Pune
View GitHub Profile
class kp_ls(
#$somevar = $kp_ls::params::somevar,
#$somevar1 = $kp_ls::params::somevar1,
) inherits kp_ls::params {
notify { 'foo': }
notify { 'foo1': message => hiera('foo_message') }
}
@msapariya
msapariya / GlobalKeyListenerExample.java
Created October 11, 2013 05:00
jackson fails to jnativehook class with following exception ========================================= The class of event object is : org.jnativehook.keyboard.NativeKeyEvent com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.jnativehook.GlobalScreen and no properties discovered to create BeanSerializer (to avoi…
import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@msapariya
msapariya / gist:5966225
Created July 10, 2013 13:20
jmeter-regex-parse-data
<Account><Accountnumber>1234<Description>savings</Account><Account><Accountnumber>1235<Description>Savings1</Account>
@msapariya
msapariya / gist:4669895
Created January 30, 2013 01:46
settings to display japanese text on windows gvim 7.3
How to display and enter japanese text on windows gvim.
set encoding=utf-8
set guifont=MS_Gothic:h12:b:cANSI
@msapariya
msapariya / gist:4038677
Created November 8, 2012 13:04
Logstash IndexOutOfBoundsException Or Waiting on 0
Logstash IndexOutOfBoundsException OR Waiting on 0
===================================================
Exception in thread "LogStash::Agent" java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:551)
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:181)
at org.jruby.RubyEncoding$UTF8Coder.decode(RubyEncoding.java:250)
at org.jruby.RubyEncoding.decodeUTF8(RubyEncoding.java:191)
....
Waiting on 0
@msapariya
msapariya / text-to-hash.rb
Created August 16, 2012 13:47
ruby hash from text para
require "pp"
#
# A utility to get hash out of the text block
#
# Every line is delimited by ls == line separator
# Records in lines are delimited by rs = record separator
#
# The hash is returned where key is the first record and
# value is array of rest of the values
#
Public gist