Skip to content

Instantly share code, notes, and snippets.

View fedotxxl's full-sized avatar

Fedor Belov fedotxxl

View GitHub Profile
Client client = ClientBuilder.newBuilder()
.register(MultiPartFeature.class)
.build();
WebTarget target = client.target(config.getFilePath(id));
StreamDataBodyPart filePart = new StreamDataBodyPart("file", new FileInputStream(archiveFiles(files)), "a.zip");
MultiPart multipart = new FormDataMultiPart().bodyPart(filePart);
response = target.request(MediaType.APPLICATION_JSON_TYPE).post(Entity.entity(multipart, multipart.getMediaType()));
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public enum ExceptionStatus {
OPENED("open"), FIXED("fixed"), IGNORE("ignore"), LATER("later");
private String id;
ExceptionStatus(String id) {
#!/bin/sh
processName="vs-site"
logsPath="/home/fbelov"
delay=15
logsFullPath=${logsPath}/${processName}-jstack
mkdir -p $logsFullPath
while true
@fedotxxl
fedotxxl / wav.ga.js
Created March 5, 2015 08:51
ga util functions
(function() {
window._gaq = window._gaq || [];
var ga = wav.ga;
var eventsPercentage = wav.$config.data("ga-events-percentage");
ga.getCurrentPageCategory = function() {
return "page_" + wav.getCurrentPage();
};
ga.isLoaded = function() {
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="https://platform.twitter.com/widgets.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
var url = "https://twitter.com/intent/tweet?" + $.param({