Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ahmetgungor's full-sized avatar
🙃

ahmet G. ahmetgungor

🙃
View GitHub Profile
@ahmetgungor
ahmetgungor / Html5 Notification Kullanımı
Last active February 16, 2016 11:54
Html5 Notification Kullanımı
<script>
// tarayıcı türleri ie,chrome,mozilla
var notification = window.Notification || window.mozNotification || window.webkitNotification;
// Kullanıcı izini
if ('undefined' === typeof notification)
alert('Web notification not supported');
else
notification.requestPermission(function(permission){});
@ahmetgungor
ahmetgungor / gist:2490ef3634089447b95220de5ef113c7
Created November 6, 2017 11:24
sag tuş ve f12 kaldırır
<script language="JavaScript">
/**
* Disable right-click of mouse, F12 key, and save key combinations on page
* By Arthur Gareginyan (arthurgareginyan@gmail.com)
* For full source code, visit http://www.mycyberuniverse.com
*/
window.onload = function() {
document.addEventListener("contextmenu", function(e){
e.preventDefault();
}, false);
<?php
/**
* adasusbilisim[.]gmail.com
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Tarihhesapla {
private $msj = array();
/**
var keyExistsOn = (o, k) => k.split(".").reduce((a, c) => a.hasOwnProperty(c) ? a[c] || 1 : false, Object.assign({}, o)) === false ? false : true;
@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++));
tools >Build System>new Build System
ile ekleyin
{
"cmd": ["C:\\wamp\\bin\\mysql\\mysql5.6.17\\bin\\mysql",
"-u", "root",
"-P","",
"-h", "localhost",
"-e", "source $file", "-t"],
"selector": "source.sql", "quiet": true
}
class sifrele {
protected $key;
protected $etype;
protected $mcmod;
protected $rand;
protected $iv;
public function __construct()
{
<?php
$email = 'ahmeeret@hotmail.com';
function mail_gizle($mail,$baslangic=2,$bitis=1)
{
$e = explode('@',$mail);
list($name,$dom) = $e;
$say = strlen($name);
if($say > 7)
{
@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);
@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)
{