This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import argparse | |
import iso8601 | |
import re | |
import subprocess | |
import logging | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HttpConnector = require('elasticsearch/src/lib/connectors/http'); | |
var inherits = require('util').inherits; | |
var qs = require('querystring'); | |
var fs = require('fs'); | |
function CustomHttpConnector(host, config) { | |
HttpConnector.call(this, host, config); | |
} | |
inherits(CustomHttpConnector, HttpConnector); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Bookmarks fix | |
// @match https://www.google.com/bookmarks/* | |
// @grant none | |
// @require https://code.jquery.com/jquery-1.12.4.min.js | |
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.js | |
// ==/UserScript== | |
$(function() { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def jobNames = [ | |
'job1', | |
'job2', | |
'job3', | |
'job4' | |
] | |
def branches = [ | |
'master', | |
'v1', | |
'v2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def color(text, **user_styles): | |
styles = { | |
# styles | |
'reset': '\033[0m', | |
'bold': '\033[01m', | |
'disabled': '\033[02m', | |
'underline': '\033[04m', | |
'reverse': '\033[07m', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for domain in "github.com" "bitbucket.org"; do | |
echo $domain | |
sed -i "/$domain/d" ~/.ssh/known_hosts | |
line=$(ssh-keyscan $domain,`nslookup $domain | awk '/^Address: / { print $2 ; exit }'`) | |
echo $line >> ~/.ssh/known_hosts | |
done |
OlderNewer