Skip to content

Instantly share code, notes, and snippets.

View kyberorg's full-sized avatar

Aleksandr Muravja kyberorg

View GitHub Profile
@kyberorg
kyberorg / error.log
Created August 28, 2015 18:32
Gradle problem
$ /srv/java/gradle/bin/gradle clean test war -b build.gradle --debug
21:27:57.652 [INFO] [org.gradle.BuildLogger] Starting Build
21:27:57.666 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /srv/java/jenkins/.gradle
21:27:57.667 [DEBUG] [org.gradle.BuildLogger] Current dir: /srv/java/jenkins/workspace/DevTeleBotVirtadev
21:27:57.668 [DEBUG] [org.gradle.BuildLogger] Settings file: null
21:27:57.668 [DEBUG] [org.gradle.BuildLogger] Build file: /srv/java/jenkins/workspace/DevTeleBotVirtadev/build.gradle
21:27:57.690 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources.
21:27:57.693 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave.
21:27:57.699 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: []
21:27:57.700 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: []
#!/bin/bash
if [ "x$2" != "x" ];then
MESSAGE=$2
else
echo "Usage git-add -m \"My commit message\" "
echo "Please enter commit message (just press enter for default message): "
read MESSAGE
if [ "x$MESSAGE" == "x" ]; then
#Fallback to default message
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.9.2
# Step: 1
# Install rpmbuild
@kyberorg
kyberorg / about PUT
Created November 11, 2014 16:46
REST API
The HTTP specification (RFC 2616) has a number of recommendations that are applicable. Here is my interpretation:
HTTP status code 200 OK for a successful PUT of an update to an existing resource. No response body needed. (Per Section 9.6, 204 No Content is even more appropriate.)
HTTP status code 201 Created for a successful PUT of a new resource, with URIs and metadata of the new resource echoed in the response body. (RFC 2616 Section 10.2.2)
HTTP status code 409 Conflict for a PUT that is unsuccessful due to a 3rd-party modification, with a list of differences between the attempted update and the current resource in the response body. (RFC 2616 Section 10.4.10)
HTTP status code 400 Bad Request for an unsuccessful PUT, with natural-language text (such as English) in the response body that explains why the PUT failed. (RFC 2616 Section 10.4)
@kyberorg
kyberorg / index.html
Last active August 29, 2015 14:11 — forked from anonymous/index.html
Atlassian
<html>
<head>
<!-- External dependencies -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.15/require.min.js"></script>
<script src="http://aui-cdn.atlassian.com/aui-adg/5.8.0/js/aui.js"></script>
<script src="http://aui-cdn.atlassian.com/aui-adg/5.8.0/js/aui-experimental.js"></script>
<script src="http://aui-cdn.atlassian.com/aui-adg/5.8.0/js/aui-datepicker.js"></script>
<link rel="stylesheet" type="text/css" href="http://aui-cdn.atlassian.com/aui-adg/5.8.0/css/aui.css"/>
<link rel="stylesheet" type="text/css" href="http://aui-cdn.atlassian.com/aui-adg/5.8.0/css/aui-experimental.css"/>
<table id="allReports" class="aui allreports-table">
<thead>
<th class="table-head" data-sort="int">#</th>
<th class="table-head">Ссылка</th>
<th class="table-head" data-sort="int">Дата создания</th>
<th class="table-head">Кем создан</th>
</thead>
<tbody>
#foreach(${reportId} in ${params.reportKeeper.getReports().keySet()})
<tr>
@kyberorg
kyberorg / g.css
Created March 3, 2015 03:13
CSS Gradient
/* The old syntax, deprecated and prefixed, for old browsers */
background: -prefix-linear-gradient(top, blue, white);
/* The new syntax needed by standard-compliant browsers (Opera 12.1, IE 10, Firefox 16, Chrome 26, Safari 6.1), without prefix */
background: linear-gradient(to bottom, blue, white);
Redirect at origin 'https://assets-cdn.github.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://github.com' is therefore not allowed access.
github.com/:1 Refused to load the script 'https://github.com/assets/frameworks-3241a40a58a82e21daef3dd3cdca01bde189158793c1b6f9193fff2b5293cd1d.js' because it violates the following Content Security Policy directive: "script-src assets-cdn.github.com collector-cdn.github.com".
github.com/:1 Refused to load the script 'https://github.com/assets/github/index-60b249427d9766f9f7c2ce367b03a9ed485faded0f6ebc2be69b8442d789d8db.js' because it violates the following Content Security Policy directive: "script-src assets-cdn.github.com collector-cdn.github.com".
@kyberorg
kyberorg / catalina.out
Created July 22, 2015 07:27
Atlassian plugin + Spring 4 problem
2015-07-22 11:26:09,153 UpmAsynchronousTaskManager:thread-2 INFO muravya 680x50x1 204e0h 172.16.14.11,127.0.0.1 /rest/plugins/1.0/installed-marketplace [atlassian.plugin.loaders.ScanningPluginLoader] No plugins found to be installed
2015-07-22 11:26:09,978 UpmAsynchronousTaskManager:thread-2 ERROR muravya 680x50x1 204e0h 172.16.14.11,127.0.0.1 /rest/plugins/1.0/installed-marketplace [atlassian.plugin.loaders.ScanningPluginLoader] Unable to deploy plugin 'net.virtalab.spring' from 'Unit: /opt/jira-data/plugins/installed-plugins/plugin_6942824220095218031_spring-1.0.jar (1437549969000)'.
2015-07-22 11:26:09,978 UpmAsynchronousTaskManager:thread-2 ERROR muravya 680x50x1 204e0h 172.16.14.11,127.0.0.1 /rest/plugins/1.0/installed-marketplace [atlassian.plugin.loaders.ScanningPluginLoader] Because of the following exception:
java.lang.NoClassDefFoundError: freemarker/template/TemplateHashModelEx
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at j
@kyberorg
kyberorg / ResultBundle.java
Last active September 15, 2015 09:35
ResultBundle API
public SomeClass{
public static ResultBundle method(){
ResultBundle rb = ResultBundle.instance();
Component comp = Creator.create();
if(comp!=null){
rb.setStatus(Status.OK);
rb.putPayload(comp);
} else {
rb.status(Status.FAIL).errorMessage("Component is NULL");