Skip to content

Instantly share code, notes, and snippets.

View avraampiperidis's full-sized avatar

Avraam Piperidis avraampiperidis

View GitHub Profile
GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner:alpine
GITLAB_HOST=localhost
GITLAB_RUNNER_REGISTRATION_TOKEN=my_runner_registration_token
# This docker compose will start a gitlab instance,
version: "3.5"
services:
gitlab:
image: "gitlab/gitlab-ee:latest"
restart: always
hostname: "localhost"
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://localhost'
@avraampiperidis
avraampiperidis / .env
Last active October 1, 2021 10:12
Docker-compose with gitlab and gitlab-runner services.
GITLAB_IMAGE=gitlab/gitlab-ee:latest
GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner:alpine
GITLAB_HOME=/srv/gitlab
GITLAB_HOST=localhost
#ports
HTTP_PORT=80
HTTPS_PORT=443
SSH_PORT=23
REGISTRY_PORT=5050
@avraampiperidis
avraampiperidis / Main.java
Last active July 7, 2022 08:29
MoveMouse
package com.sample.testapi;
public class Main {
public static void main(String[] a) throws InterruptedException {
int x = 100;
int y = 100;
while (true) {
Thread.sleep(60000);
try {
@avraampiperidis
avraampiperidis / SearchUtilTest
Created December 8, 2018 19:46
Generic java list search/sort with unit test
public class SearchTest {
@Test
public void testSearchDetailsMore() {
List<LevelThreeEntity> list = getLevelThreeEntries();
JsonObject json = Json.createObjectBuilder()
//threeName:in the same object
.add("threeName","proto")
//id:In BaseEntity
.add("id",3L)
//twoint in the exact parent object
@avraampiperidis
avraampiperidis / AppCache.java
Created August 20, 2016 06:25
Android LruCache Wrapper. easy to use between activities
import android.support.annotation.NonNull;
import android.support.v4.util.LruCache;
public class AppCache<T> {
private final int maxMemory = (int) (Runtime.getRuntime().maxMemory()/1024);
private final int cacheSize = maxMemory / 6;
@avraampiperidis
avraampiperidis / mobilecheck.js
Created August 20, 2016 06:18
check if browser is mobile client
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
@avraampiperidis
avraampiperidis / foo
Created June 26, 2013 18:31 — forked from HellPat/foo
<?php
echo 'foo';
?>
#!/usr/bin/perl
# usage .txt file with ip - hostnames one per line
#requires root
my @ports = (20, 21, 22, 80, 443, 445); #add tcp ports here.
print "\nService version 7 status\n";
print "\===============================\n";
while (defined($ipaddr = <>)) {
chomp ($ipaddr);
@avraampiperidis
avraampiperidis / encoder.pl
Created June 18, 2013 20:35
encoder-decoder
#!/usr/bin/perl
print "\(c) Zeron \n";
print "En/Decoder (zeron)";
#**********************Main Menu****************************
menu:;
print "\n\nMenu:\n";
print "1.Encode\n";
print "2.Decode\n";