Skip to content

Instantly share code, notes, and snippets.

View volyx's full-sized avatar

Dmitrii Volykhin volyx

View GitHub Profile
package com.company;
import java.util.AbstractList;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) {
B b = new B<Integer>();
server {
listen 80;
root /home/wndlust;
index index.html index.htm;
listen 443 ssl;
# Make site accessible from http://localhost/
server_name wndlust.ru;
// <script src="http://pollfu.com/public/js/embed.v1.js" data-id="9"></script>
(function () {
var scriptName = "embed.js"; //name of this script, used to get reference to own tag
var jQuery; //noconflict reference to jquery
var jqueryPath = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";
var jqueryVersion = "1.8.3";
var scriptTag; //reference to the html script tag
/******** Get reference to self (scriptTag) *********/
@volyx
volyx / start.sh
Last active August 29, 2015 14:21
start.sh script
#!/bin/bash
PROJECTNAME=`mvn help:evaluate -Dexpression=project.artifactId 2>/dev/null| grep -v "^\["`
VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null| grep -v "^\["`
JARFile="$PROJECTNAME-$VERSION.jar"
PIDFile="app.pid"
PID="-1"
NOPID="-1"
/**
* Naive AngularJS module autoloader; depends on require.js.
*
* Usage:
*
* angular.autoLoad({
* 'ngResource': '/js/angular-resource-1.0.1.min.js',
* 'google-maps': '/js/angular-google-maps.js',
* 'ui.bootstrap': '/js/ui/ui-bootstrap-custom-tpls-0.4.0.min.js',
* 'module.split.over.multiple.files': ['/js/file1.js', '/js/file2.js']
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String nextLine = null;
int n = 0;
@volyx
volyx / index.html
Created April 21, 2015 11:30
index.html example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</script>
</head>
<body>
Content of the document.....
</body>
http.
csrf().disable().
sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).
and().
authorizeRequests().
// antMatchers(HttpMethod.OPTIONS, "/**").permitAll().
antMatchers(actuatorEndpoints()).hasRole(backendAdminRole).
antMatchers(ApiController.AUTHENTICATE_URL).permitAll().
antMatchers(HttpMethod.GET, ApiController.API_TRIPS).permitAll().
@volyx
volyx / Gruntfile.js
Created April 9, 2015 17:30
Gruntfile.js Angularjs
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.initConfig({
'pkg': grunt.file.readJSON('package.json'),
def a = [1,5,7,8,45,7,45,34,45,78,9]
k = 10
k0 = 0
void printArr(a) {
a.each{i ->
print i + ', '