Skip to content

Instantly share code, notes, and snippets.

@umuttaymaz
umuttaymaz / after.sh
Created December 19, 2023 12:32 — forked from ethanclevenger91/after.sh
Install PHP SQLSRV database extension on Laravel Homestead (probably works as a Laravel Forge recipe, too). Thanks @richvida
#!/bin/sh
PHP_MSSQL_DRIVERS=Ubuntu18-7.3
PHP_MSSQL_RELEASE=5.6.1
# Download and extract phpmysql drivers
sudo wget "https://github.com/Microsoft/msphpsql/releases/download/v${PHP_MSSQL_RELEASE}/${PHP_MSSQL_DRIVERS}.tar" -O - | tar -x
# Change Directory
cd $PHP_MSSQL_DRIVERS
@umuttaymaz
umuttaymaz / index.html
Created October 25, 2023 21:33 — forked from mcxiaoke/index.html
detect app installed in browser
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!-- iframe used for attempting to load a custom protocol -->
<iframe style="display:none" height="0" width="0" id="loader"></iframe>
@umuttaymaz
umuttaymaz / gist:3bc8860127f60d300b6f6d4076beb075
Created February 17, 2023 10:37 — forked from hidonet/gist:c8b61bc6548174a51c67
Türk bankaları için sanal pos test kartları
"EST (Akbank, IsBankasi, TEB, Anadolubank, Finansbank vs) " =>
"number" => "5404355404355405", "cvv" => "000", "type" => "MC", "expire_month" => "12", "expire_year" => "2019"
"GARANTI" =>
"number" => "4282209027132016", "cvv" => "232", "type" => "VI", "expire_month" => "04", "expire_year" => "2015"
"DENIZBANK (Interpos)" =>
"number" => "4090700015897901", "cvv" => "991", "type" => "VI", "expire_month" => "12", "expire_year" => "2014"
"HSBC" =>
@umuttaymaz
umuttaymaz / LinodeCopy.php
Created February 15, 2022 02:04 — forked from Dimimo/LinodeCopy.php
A Laravel artisan command to help move your files from S3 to Linode
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Storage;
class LinodeCopy extends Command
{
/**
@umuttaymaz
umuttaymaz / Controller.php
Created January 23, 2019 21:37 — forked from milon/Controller.php
Delete Modal Popup with Laravel, Bootstrap and jQuery
public function index(){
$categoryList = Category::all();
return view('category.list')->with('categoryList', $categoryList);
}
@umuttaymaz
umuttaymaz / basic-pubnub.php
Created April 11, 2018 10:34 — forked from krhoyt/basic-pubnub.php
Basic example of publishing to PubNub from PHP. Really distilled down to just the REST calls.
<?php
$CHANNEL = "iot";
$PUB_KEY = "_YOUR_PUBLISH_KEY_";
$SUB_KEY = "_YOUR_SUBSCRIBE_KEY_";
$SECRET_KEY = "_YOUR_SECRET_KEY_";
$PUBNUB = "http://pubsub.pubnub.com";
$data = array(
"count" => 3
@umuttaymaz
umuttaymaz / fix-locale-issue.md
Created December 7, 2017 20:28 — forked from aliuygur/fix-locale-issue.md
ubuntu makinadaki locale problemi ve çözümü. bu problem genelde digitalocean.com dan alınan makinalarda çıkıyor.

lets fix the ubuntu locale issue (digitalocea.com droplets)

1. step, browse locale settings

root@piklook-dev:~# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
@umuttaymaz
umuttaymaz / Handler.php
Created December 5, 2017 14:20 — forked from sirolad/Handler.php
Modified global exception for JSON in app/Exceptions/Hander.php file
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
...
{
"id": 1,
"kind": null,
"name": "three",
"created_at": "2017-11-01 04:29:22",
"updated_at": "2017-11-01 04:29:22",
"comments": [
{
"id": 5,
"body": "no non o",
[{"name":"example","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":true,"column":[{"name":"id","type":"increments","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c23","order":0}],"relation":[],"seeding":[]}]