Skip to content

Instantly share code, notes, and snippets.

View ahmeti's full-sized avatar
🎯
Focusing

Ahmet Imamoglu ahmeti

🎯
Focusing
View GitHub Profile
@ahmeti
ahmeti / 01-pagination.php
Last active January 7, 2024 03:32
ahmeti.com.tr - Php ile Kolayca Sayfalama Yapmak
<?php
// $top_sayfa == Toplam Sayfa Sayısı
// $page == Mevcut Sayfa
// $limit == Sayfa Limiti
// $page_url == Sayfa Bağlantısı
function Sayfala($top_sayfa, $page, $limit, $page_url)
{
// Sayfalama Şeridimiz
@ahmeti
ahmeti / command.sh
Created February 25, 2023 02:05
Install Nginx Latest Stable 1.22 Version on Ubuntu 22.04
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
fingerprint: "573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62" If the fingerprint is different, remove the file.
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
@ahmeti
ahmeti / ffmpeg.sh
Created December 17, 2022 10:48
ffmpeg
# Youtube Short Videos
ffmpeg -i source.mp4 -s 1920x1080 -c:a copy dist.mp4
@ahmeti
ahmeti / HtmlTableGenerator.html
Created June 15, 2022 17:52
HTML Table Generator (Especially Mac Mail)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Table Generator (Especially Mac Mail)</title>
</head>
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
@ahmeti
ahmeti / backup.php
Created December 17, 2021 14:59
Wordpress Backup With Client Request
<?php
ini_set('max_execution_time', 0);
error_reporting(E_ALL);
ini_set('display_errors','On');
$rootPath = realpath(__DIR__);
$zip = new ZipArchive();
$zip->open('backup_'.uniqid().'.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
@ahmeti
ahmeti / apple_store.svg
Last active December 12, 2021 21:50
SVG Icons
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 01. Sanal Bellek Oluşturma ve Başlatma
cd /var
touch swapfile
chmod 600 swapfile
/bin/dd if=/dev/zero of=/var/swapfile bs=1M count=10000
/sbin/mkswap /var/swapfile
/sbin/swapon /var/swapfile
<?php
function exportExcel($filename='ExportExcel', $columns=array(), $data=array(), $replaceDotCol=array()){
header('Content-Encoding: UTF-8');
header('Content-Type: text/plain; charset=utf-8');
header("Content-disposition: attachment; filename=".$filename.".xls");
echo "\xEF\xBB\xBF"; // UTF-8 BOM