Skip to content

Instantly share code, notes, and snippets.

View Mrjavaci's full-sized avatar
🎯
Focusing

Osman Taha Mrjavaci

🎯
Focusing
View GitHub Profile
version: '1'
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.2
ports:
- 2232:9200
networks:
- elastic
version: '3'
services:
kib01:
image: docker.elastic.co/kibana/kibana:8.12.0
container_name: kib01
networks:
- elastic
ports:
- "5601:5601"
@Mrjavaci
Mrjavaci / split-mysql-dump.sh
Created April 22, 2023 01:08 — forked from thanuja919/split-mysql-dump.sh
split-mysql-dump
#!/usr/bin/env bash
#When executing the script keep the main db dump in another folder.
AWK=awk
REGEX_NAME="Current Database: \`(.*)\`"
# Checks argument and prints usage if needed
if [ "$#" -lt "1" ]
then
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Osman Taha Kıyıcılar",
"label": "Backend Developer",
"image": "",
"email": "tr.osmantaha@gmail.com",
"phone": "+905458351973",
"url": "https://github.com/Mrjavaci",
"summary": "Swift, Java, PHP, Perl, JavaScript, Node.js, IntelliJ Idea extension Dev., Android, Objective-c, c#, üzerine uzun süredir projeler geliştiriyorum. Asıl uzmanlık alanım ise PHP. Datatelekom Veri Merkezinde linux altyapıları, mikrotik ve radius sistemleri üzerinde çalışmalar yaptım.",
@Mrjavaci
Mrjavaci / backup.sh
Last active October 17, 2022 08:25
Gitlab backup to remote ftp upload
USERNAME="USERNAME"
PASSWORD="PASSWORD"
SERVER="IP_ADDRESS"
PORT="FTP/SFTP PORT"
REMOTEDIR="REMOTE_DIR"
TYPE=2 # 1 -> ftp 2 -> sftp
FILE=$(find /var/opt/gitlab/backups/ -type f -printf "%p\n" | sort -n | tail -1)
echo $FILE
@Mrjavaci
Mrjavaci / WebpConvert.php
Created January 27, 2022 15:10
PHP Convert and Compress Webp All Image Files (Recursive) in Folder
<?php
function getDirContents($dir, &$results = array()) {
$files = scandir($dir);
foreach ($files as $key => $value) {
$path = realpath($dir . DIRECTORY_SEPARATOR . $value);
if (!is_dir($path)) {
$results[] = $path;
} else if ($value != "." && $value != "..") {
@Mrjavaci
Mrjavaci / PreventSleep.cs
Created October 4, 2021 12:08 — forked from brianhassel/PreventSleep.cs
Prevent Computer Sleep in C#
internal static class NativeMethods {
public static void PreventSleep() {
SetThreadExecutionState(ExecutionState.EsContinuous | ExecutionState.EsSystemRequired);
}
public static void AllowSleep() {
SetThreadExecutionState(ExecutionState.EsContinuous);
}