View split-mysql-dump.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View resume.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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.", |
View backup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
View WebpConvert.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 != "..") { |
View PreventSleep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class NativeMethods { | |
public static void PreventSleep() { | |
SetThreadExecutionState(ExecutionState.EsContinuous | ExecutionState.EsSystemRequired); | |
} | |
public static void AllowSleep() { | |
SetThreadExecutionState(ExecutionState.EsContinuous); | |
} |