Skip to content

Instantly share code, notes, and snippets.

View sineld's full-sized avatar
🏢
Full Stack Developer

Sinan Eldem sineld

🏢
Full Stack Developer
View GitHub Profile
@sineld
sineld / InputEdit.vue
Created March 15, 2018 14:10 — forked from nckg/InputEdit.vue
Vue Inline edit
<template>
<div>
<span v-show="!editing"
@click="toggleEdit" v-html="showValue"></span>
<div v-show="editing" class="row">
<div class="col-md-10">
<div class="form-group">
<textarea class="form-control"
rows="3"
@sineld
sineld / passwordvalidation
Created December 30, 2017 08:58 — forked from Michael-Brooks/passwordValidation.php
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
*/
$rules = array(
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
);
/*
* Use this one if you also require at least one symbol.
@sineld
sineld / Laravel PHP7 LEMP AWS.md
Created December 20, 2017 10:01 — forked from santigarcor/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@sineld
sineld / Lravel-5-inpalce-edit-using-xeditable.php
Created December 8, 2017 15:13 — forked from pupadupa/Lravel-5-inpalce-edit-using-xeditable.php
Laravel 5 inplace editing using jquery's x-editable plugin . Inline and bulk editing examples.
/**
*
* In this example we create view with inplace and bulk editing.
* Tools and plugins:
* jQuery
* xEditable jquery plugin
* twitter bootstrap
*
*/
@sineld
sineld / sayiyiYaziyaCevir.php
Created September 26, 2017 07:25
sayıyı yazıya çevirme
<?php
// Kaynak: http://www.jteklif.com/php-icin-sayiyi-yaziya-cevirme/
$yaziyla = sayiyiYaziyaCevir(123456.67, 2, "TL", "Kr", "#", null, null, null);
echo (sayiyiYaziyaCevir("123456.67", 2, "TL", "Kr", "#", null, null, null));
function sayiyiYaziyaCevir($sayi, $kurusbasamak, $parabirimi, $parakurus, $diyez, $bb1, $bb2, $bb3) {
// kurusbasamak virgülden sonra gösterilecek basamak sayısı
@sineld
sineld / add-datatables.js
Created November 19, 2016 22:15 — forked from scottoffen/add-datatables.js
Apply the DataTables jQuery plugin to any table on a website
var options = { class : "wikitable", idx : 0, id : "firstWikiTable" };
var dt_options = { paging: false, scrollY: 400 };
var jscript = document.createElement("script"); jscript.src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"; document.body.appendChild(jscript);
jscript.onload = function ()
{
var script = document.createElement("script"); script.src="https://cdn.datatables.net/1.10.6/js/jquery.dataTables.min.js"; document.body.appendChild(script);
script.onload = function ()
{
var css = document.createElement("link"); css.rel="stylesheet"; css.href="https://cdn.datatables.net/1.10.6/css/jquery.dataTables.min.css"; document.body.appendChild(css);
css.onload = function ()
@sineld
sineld / FormHelper.php
Created November 5, 2016 07:50 — forked from veedeoo/FormHelper.php
Form Helper
<?php
/**
* FormHelper
*
* @package veedeoo HMVC
* @author @Veedeoo and @Geegler
* @copyright 2014
* @version 2.1.0
* @access public
@sineld
sineld / ajax-validation-with-vue.js
Created October 11, 2016 13:03 — forked from TahaSh/ajax-validation-with-vue.js
Ajax validation with VueJS
new Vue({
el: '#app',
data: {
formInputs: {},
formErrors: {}
},
methods: {
submitForm: function(e) {
@sineld
sineld / array2json.php
Created June 24, 2016 08:02 — forked from ferdiunal/array2json.php
Ülkelerin İl, İlçeleri. Şimdilik Türkiye'yi ekleyebildim.
#!/usr/bin/env php
<?php
/**
* @author Ferdi ÜNAL
* @email ferdi@unal.pw
*/
$location = require "location.php";
$json = fopen('location.json', 'w');
@sineld
sineld / 01_Laravel 5 Simple ACL manager_Readme.md
Created June 4, 2016 23:41 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php