Skip to content

Instantly share code, notes, and snippets.

View unique1984's full-sized avatar
💭
I may be slow to respond.

Yasin KARABULAK unique1984

💭
I may be slow to respond.
View GitHub Profile
@unique1984
unique1984 / bin2chr.php
Created February 14, 2024 20:24
Binary To String & String To Binary conversion 8bit
<?php
if(empty($argv[1])) {
die;
}
if($argc > 2) {
for ($i = 1; $i < $argc; $i++) {
echo chr(bindec($argv[$i]));
@unique1984
unique1984 / addMailSslDomain.sh
Created October 14, 2023 04:29
ISPConfig3 add domain based mail ssl
#!/usr/bin/env bash
if [ -z $1 ]; then
echo -e "No domain specified!"
exit 1
fi
# if given domain has a website @TODO: not just website, manually geather the mail.domain.tld certificates...
if [ ! -d /var/www/$1 ]; then
echo -e "There is no website named $1 !"
@unique1984
unique1984 / .gitlab-ci.sh
Created April 25, 2022 03:56 — forked from RomainMarecat/.gitlab-ci.sh
Simple gitlab-ci configuration symfony
#!/bin/bash
# Install dependencies only for Docker.
[[ ! -e /.dockerinit ]] && exit 0
set -xe
# Update packages and install composer and PHP dependencies.
apt-get update -yqq
apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev phpunit -yqq
@unique1984
unique1984 / installer.sh
Last active November 24, 2023 21:00
OpenZFS - ZFS as a Root File System on Debian Bullseye
#!/usr/bin/env bash
###########################################################################################################
# Bash Script of this Documentation :
# https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Bullseye%20Root%20on%20ZFS.html#debian-bullseye-root-on-zfs
#
# Copyright © 2022 - installer.sh
# Yasin Karabulak
# info@yasinkarabulak.com
# https://github.com/unique1984
#
@unique1984
unique1984 / symfony
Last active November 16, 2023 01:09
Symfony Cli bash-completion
_symfony()
{
local cur=${COMP_WORDS[COMP_CWORD]}
local cmd="${COMP_WORDS[0]}"
if ($cmd > /dev/null 2>&1)
then
COMPREPLY=($(compgen -W "$($cmd --help --no-ansi | grep -v 'Available\|Global\|Usage:\|Runs\|Environment' | grep ':' | awk '{print $1}' | grep -Poi '^\K[\w:-]+') new serve server:stop security:check composer console login link projects envs env:create tunnel:open ssh deploy domains vars user:add help" -- $cur))
fi
}
complete -F _symfony symfony
@unique1984
unique1984 / VBOX-on-bullseye.md
Last active August 16, 2021 17:57
VirtualBox 6.1 on bullseye

##Virtualbox Bullseye Installation (6.1.26 sürümü için)

!! Tüm işlemleri root olarak yaparsan sıkıntı yaşamazsın !!

apt-key ekleme işlemleri (https://www.virtualbox.org/wiki/Linux_Downloads)

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Paketleri indir (Application + Extension Pack --> ExtPack isteğe bağlı uygulama kurulunca otomatik indireyim mi diye soruyor.)

@unique1984
unique1984 / network-tweak.md
Created June 17, 2021 04:38 — forked from mustafaturan/network-tweak.md
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
@unique1984
unique1984 / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Created June 16, 2021 21:02 — forked from mrothNET/LetsEncrypt+certbot+UFW+postfix+dovecot.md
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
@unique1984
unique1984 / cities.json
Created June 7, 2021 03:07
Türkiye şehirler json
[
{
"plaka": 1,
"il": "ADANA"
},
{
"plaka": 2,
"il": "ADIYAMAN"
},
{
@unique1984
unique1984 / flutter-logos.sh
Last active March 18, 2024 00:48
Flutter application logo creation
#!/bin/bash
# Flutter application logo images location!
# WIN : FLUTTER_APP_ROOT\android\app\src\main\res
# LINUX : FLUTTER_APP_ROOT/android/app/src/main/res
function explode {
FULL="$1"
F_PATH=${FULL%/*}
F_BASE=${FULL##*/}