Skip to content

Instantly share code, notes, and snippets.

View arulrajnet's full-sized avatar

Arul arulrajnet

View GitHub Profile
@valotas
valotas / tomcat.sh
Created May 31, 2011 07:11
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@href
href / dict_namedtuple.py
Created October 27, 2011 12:00
Convert any dictionary to a named tuple
from collections import namedtuple
def convert(dictionary):
return namedtuple('GenericDict', dictionary.keys())(**dictionary)
"""
>>> d = dictionary(a=1, b='b', c=[3])
>>> named = convert(d)
>>> named.a == d.a
True
>>> named.b == d.b
@calo81
calo81 / LoggerFilter
Created March 18, 2012 12:48
Filter for reading and logging HttpServletRequest body, and resetting the input stream
package com.paddypower.financials.market.management.rest.logging;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@larsks
larsks / blogger2scriptogram.py
Created November 6, 2012 04:23
Convert Blogger posts to Markdown for use with Scriptogr.am
#!/usr/bin/python
import os
import sys
import argparse
import iso8601
import re
import subprocess
import logging
import json
@adamloving
adamloving / temporary-email-address-domains
Last active April 24, 2024 14:20
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@fabriziofortino
fabriziofortino / JSONUserType.java
Last active July 21, 2020 08:59
Hibernate JSONUserType with Jackson
package com.keepithttps.hibernate.type;
import java.io.IOException;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
@n0ts
n0ts / get_oracle_jdk_x64.sh
Last active September 16, 2023 12:07
Get latest Oracle JDK package bash shell script for linux/osx/windows
#!/bin/bash
# You must accept the Oracle JDK License Update
# https://www.oracle.com/java/technologies/javase-downloads.html
# usage: get_oracle_jdk_x64.sh <jdk_version> <platform> <ext>
# jdk_version: 14
# platform: linux or osx or windows
# ext: rpm or dmg or tar.gz or exec
jdk_version=${1:-14}
From Hichame : this not my post, i copy/paste it in gist in case of issue on original post server => http://www.brucalipto.org/java/how-to-create-a-portable-jdk-1-dot-7-on-windows/
thanks to him for this job
How to Create a Portable JDK 1.7 on Windows
Published Dec 27th, 2013 | Comments
[Java logo] As a Java developer sometimes I need a version of Java Development Kit (JDK) that is not the one installed on my PC. Oracle Java installer on Windows does too many things that I cannot control (like changing the JVM used by browsers to run applets). As of this writing Java 7 is at version u45 and you can download it from here. Open the downloaded file with 7-zip (in my case was jdk-7u45-windows-i586.exe) and then open the tools.zip you find inside. Extract everything to a convenient path like C:\jdk-1.7u45. Now it is shell time so open a DOS console (Start->Run…->cmd) and type:
Create a portable JDK 1.7