Skip to content

Instantly share code, notes, and snippets.

🏠
Working from own office

Sinan Eldem sineld

🏠
Working from own office
View GitHub Profile
@sineld
sineld / Lravel-5-inpalce-edit-using-xeditable.php
Created Dec 8, 2017 — 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.
View Lravel-5-inpalce-edit-using-xeditable.php
/**
*
* 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 Sep 26, 2017
sayıyı yazıya çevirme
View sayiyiYaziyaCevir.php
<?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 Nov 19, 2016 — forked from scottoffen/add-datatables.js
Apply the DataTables jQuery plugin to any table on a website
View add-datatables.js
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 ()
View FormHelper.php
<?php
/**
* FormHelper
*
* @package veedeoo HMVC
* @author @Veedeoo and @Geegler
* @copyright 2014
* @version 2.1.0
* @access public
View ajax-validation-with-vue.js
new Vue({
el: '#app',
data: {
formInputs: {},
formErrors: {}
},
methods: {
submitForm: function(e) {
@sineld
sineld / array2json.php
Created Jun 24, 2016 — forked from ByOfficer/array2json.php
Ülkelerin İl, İlçeleri. Şimdilik Türkiye'yi ekleyebildim.
View array2json.php
#!/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 Jun 4, 2016 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type
View 01_Laravel 5 Simple ACL manager_Readme.md

#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

@sineld
sineld / laravel.js
Created May 20, 2016 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
View laravel.js
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@sineld
sineld / 1) Install
Created May 5, 2016 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
View 1) Install
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@sineld
sineld / paginator.js
Last active Apr 17, 2016 — forked from kirkbushell/paginator.js
Paginator module for AngularJS, in combination with Laravel's paginator class
View paginator.js
/**
* Paginator
*
* The paginator can be used within any controller to easily set up
* some pagination options, including number of pages, page navigation
* and more. It is built to work with Laravel's own pagination library,
* which returns data in a particular format.
*
* Usage:
* Before you can use paginator, make sure you specify the URLs to your pagination
You can’t perform that action at this time.