Skip to content

Instantly share code, notes, and snippets.

View mustafat0k's full-sized avatar
🚀
Go

Mustafa mustafat0k

🚀
Go
View GitHub Profile
@mustafat0k
mustafat0k / failtrait.php
Created April 24, 2017 21:35
AuthenticatesUsersTraitFails
<?php
namespace Illuminate\Foundation\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use File;
use Validator;
trait AuthenticatesUsers
@mustafat0k
mustafat0k / taksitController.php
Created May 18, 2017 21:09
LaravelCarbon Taksit günleri hesaplaması
/*
..
*/
/*
|--------------------------------------------------------------------------
| Taksit Günlerini Bul
|--------------------------------------------------------------------------
|
| Algoritmayı sadeleştirirsek.
@mustafat0k
mustafat0k / crawler.php
Created June 18, 2017 19:02
php DOMDocument::loadHTML fonksiyonları
<?php
/*
* howCode Web Crawler Tutorial Series Source Code
* Copyright (C) 2016
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@mustafat0k
mustafat0k / Kancalama.php
Created July 9, 2017 18:12
Laravel de Trait olarak view'lerde modül sistemi için kullanmayı düşündüğüm bir hook sınıfı
<?php
class Kancalama {
private $kanca;
public function fonksiyon_ekle($nereye, $fonksiyon, $oncelik = 1){
if(!isset($this->kanca[$nereye]))
$this->kanca[$nereye] = array();
@mustafat0k
mustafat0k / mail.py
Created September 14, 2017 03:26 — forked from anonymous/mail.py
Mail Sender
import smtplib as sm
from tkinter import *
class MailSender():
def __init__(self):
self.pencere = Tk()
self.giris_pencere_olustur()
def giris_pencere_olustur(self):
@mustafat0k
mustafat0k / gateContract.php
Last active March 9, 2019 15:45
AppServiceProvider GateContract
<?php
public function boot(GateContract $gate) // Bu kısmı 5.5 de boş boot() şeklinde muhtemelen sadece 5.3 de bu şekilde.
{
$this->registerPolicies();
foreach ($this->getPermissions() as $permission) {
$gate->define($permission->name, function($user) use ($permission ) {
@mustafat0k
mustafat0k / .php
Last active March 9, 2019 16:03
Env kaydet
<?php
/** Mail Ayarları */
public function getSmtp() {
$smtp=Config::get('mail');
return view('backend.setting.smtp',compact('smtp'));
@mustafat0k
mustafat0k / .php
Created February 8, 2018 02:59
Laravel file ovveride
<?php
public function get_dir(Request $request)
{
$root = base_path() . DIRECTORY_SEPARATOR;
// "C:\Users\fizikci\Desktop\dev\la1\"
$postDir = rawurldecode(base_path($request->get('dir')));
@mustafat0k
mustafat0k / HTML5StorageMultidimensional.js
Created March 4, 2018 16:17 — forked from klederson/HTML5StorageMultidimensional.js
Adding Multidimensional Support for javascript / html5 sessionStorage , localStorage or just Storage object
/**
*
* MOVED TO: https://github.com/iFind/html5MultidimensionalStorage
*
* This methods extends the default HTML5 Storage object and add support
* to set and get multidimensional data
*
* @example Storage.setObj('users.albums.sexPistols',"blah");
* @example Storage.setObj('users.albums.sexPistols',{ sid : "My Way", nancy : "Bitch" });
* @example Storage.setObj('users.albums.sexPistols.sid',"Other songs");
@mustafat0k
mustafat0k / firewall.cpp
Created March 9, 2019 15:47
Exercising the Firewall using C++
/*
Copyright (c) Microsoft Corporation
The following code example exercises the Windows Firewall profile; displays the current profile, turns off the firewall,
turns on the firewall, and adds an application.
*/
#include <windows.h>
#include <crtdbg.h>
#include <netfw.h>