Skip to content

Instantly share code, notes, and snippets.

View ahmetgungor's full-sized avatar
🙃

ahmet G. ahmetgungor

🙃
View GitHub Profile
@ahmetgungor
ahmetgungor / Nextjs 14 Modal
Created April 13, 2024 20:21
Nextjs 14 Modal state ile açılmasını istediğim modal hedef gösterebilirim
<ModalGnrV1 openboolean={(isOpen==1)}title={'Form Başlık'} closeOnClick={()=>{dispatch(changeOpenMode(0))}}
footer={[{
label:'Kaydet',
onClick:()=>{alert('test')},
class:'p-2 bg-green-800 hover:bg-green-700 rounded-sm ml-4 text-white'
},
{
label:'Güncelle',
onClick:()=>{alert('test')},
class:'p-2 bg-yellow-800 hover:bg-yellow-700 rounded-sm ml-4 text-white'
@ahmetgungor
ahmetgungor / font-awesome-4.7.0.json
Created December 22, 2022 11:19 — forked from zwinnie/font-awesome-4.7.0.json
JSON Of All Font Awesome 4.7.0 Icons
{
"4.7.0": [
"fa-500px",
"fa-address-book",
"fa-address-book-o",
"fa-address-card",
"fa-address-card-o",
"fa-adjust",
"fa-adn",
"fa-align-center",
@ahmetgungor
ahmetgungor / gist:071c7a012cb52b23d6b3ff1068eb991d
Created October 21, 2021 18:10
Alttan Yukarı Kayan Scrollview
import 'package:flutter/material.dart';
class AnaEkran extends StatefulWidget {
const AnaEkran({Key? key}) : super(key: key);
@override
_AnaEkranState createState() => _AnaEkranState();
}
pubspec.yaml ekle
shared_preferences: ^2.0.8
provider: ^6.0.1
== dark_theme_preferences.dart ========================================================================================================================
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'dart:ui';
@ahmetgungor
ahmetgungor / gist:541b20f597a2d3b551810ea6173cbfd9
Created May 19, 2021 15:21
php ile yandex mail okuma - en basit hali
<?php
if(function_exists("imap_open"))
{
$imapPath = '{imap.yandex.com.tr:993/imap/ssl}INBOX';
$username = '';
$password = '';
$inbox = imap_open($imapPath,$username,$password) or die('Cannot connect to yandex: ' . imap_last_error());
$emails = imap_search($inbox,'UNSEEN'); // okunmamış epostları göster https://www.php.net/manual/tr/function.imap-search.php
foreach($emails as $mail)
{
@ahmetgungor
ahmetgungor / gist:5a41de7f4a939f6b0d2022fcf28acf3f
Created February 1, 2021 10:33
Cpanel email listesi alma
var rows = $("#accounts_table tbody tr"),
returnString = "";
rows.each(function(i, item){
var tdList = [];
$(item).find('span.account-name').each(function(s,subItem){
tdList.push($(subItem).text());
});
returnString += tdList + "\n";
});
console.log(returnString);
<?php
$email = '[email protected]';
function mail_gizle($mail,$baslangic=2,$bitis=1)
{
$e = explode('@',$mail);
list($name,$dom) = $e;
$say = strlen($name);
if($say > 7)
{
class sifrele {
protected $key;
protected $etype;
protected $mcmod;
protected $rand;
protected $iv;
public function __construct()
{
@ahmetgungor
ahmetgungor / mask.js
Created March 19, 2019 10:02 — forked from meftunca/mask.js
Javascript number mask
const mask = (res = "", regex) => {
if (res.replace(/\D+/gim, "").length == 0) return "";
if (res.replace(/\D+/gim, "").length > regex.replace(/\D+/gim, "").length)
return res.slice(0, regex.replace(/\[|\]/gim, "").length);
let regexNumber = regex.match(/\d+/gim, ""), //sadece sayılar
totalLen = res.match(/\d+/gim, "").join("").length, //gelen değerin uzunluğu
number = res.match(/\d+/gim, "").join("") + new Array(regexNumber.join("").length - totalLen).fill("_").join(""),
len = 0,
rlen = 0;
let match = regex.replace(/\[\d+\]/gim, (m, k) => m.replace(/\[\d+\]/gim, "$" + rlen++));
var keyExistsOn = (o, k) => k.split(".").reduce((a, c) => a.hasOwnProperty(c) ? a[c] || 1 : false, Object.assign({}, o)) === false ? false : true;