Skip to content

Instantly share code, notes, and snippets.

View android-leha's full-sized avatar

Alexey Vishnyakov android-leha

View GitHub Profile
resource "nexus_repository" "maven_proxy_central" {
name = "maven-central"
format = "maven2"
type = "proxy"
online = true
http_client {
}
provider "nexus" {
insecure = true
password = "admin123"
url = "https://127.0.0.1:8080"
username = "admin"
}
resource "nexus_repository" "maven_hosted" {
name = "maven-repo"
format = "maven"
@android-leha
android-leha / script.sh
Last active February 15, 2020 12:48
print sort files
#!/bin/bash
function get_in_asc() {
ls -l $1 | awk '{print $9}'
}
function get_in_desc() {
ls -l $1 | awk '{print $9}' | tac
}
package com.wekast.DongleClient;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
public class Main {
@android-leha
android-leha / main.java
Created May 9, 2016 05:21
Задача на поиск суммы в массиве
package ru.zapiataia.telran.isSumm;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int[] array = {1, 4, 5, 4, 5};
int sum = 3;
if (!xmppConnection.isConnected()) {
xmppConnection.connect();
}
AccountManager manager = AccountManager.getInstance(xmppConnection);
manager.createAccount(username, password, attributes);
xmppConnection.disconnect();
xmppConnection.connect();
xmppConnection.login(username, password);
vCard.save(xmppConnection);