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 / sineld.php
Created February 23, 2012 11:45
Sinan Eldem
<?php
echo 'hayır hayır amca dedi';
?>
@sineld
sineld / json-php.php
Created April 28, 2012 20:20
Json and php
<?php
$dizi = array('koca' => array('isim' => 'sinan', 'yas' => 31), 'es' => array('isim' => 'bilge', 'yas' => 22));
echo 'Php: ';
var_dump($dizi).'<br>';
$d = json_encode($dizi);
echo 'Json (encoded): ';
@sineld
sineld / helpers.php
Created July 25, 2012 07:18
My dd replace
<?php
/**
* Dump the given value and kill the script or continue.
*
* <code>
* // Dump the $data variable and kill the script
* d($data);
*
* // Dump the $data variable and continue the script
* d($data,1);
@clouddueling
clouddueling / is_64_bit.php
Created December 9, 2012 18:45
Is my php server 64 bit?
<?php
// http://ideone.com/JWKIf
function is_64bit() {
$int = "9223372036854775807";
$int = intval($int);
if ($int == 9223372036854775807) {
/* 64bit */
return true;
@sineld
sineld / DB.sql
Created March 12, 2013 08:12 — forked from msurguy/DB.sql
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@sineld
sineld / setup-sync-sublime-over-dropbox.sh
Last active December 15, 2015 12:34
zsh-scripts/bin/setup-sync-sublime-over-dropbox.sh
#!/bin/sh
#
# Original URL: https://github.com/miohtama/ztanesh/blob/master/zsh-scripts/bin/setup-sync-sublime-over-dropbox.sh
# Set-up Sublime settings + packages sync over Dropbox
# Kullanım: $sh dosya.sh
# Will sync settings + Installed plug-ins
#
# Tested on OSX - should support Linux too as long as
# you set-up correct SOURCE folder
#
@sineld
sineld / sublimeText2-3.settings
Last active December 19, 2015 13:49
sublimeText2-3.settings
{
"auto_complete": true,
"auto_complete_selector": "source, text",
"color_scheme": "Packages/Dayle Rees Color Schemes/FreshCut.tmTheme",
"ensure_newline_at_eof_on_save": false,
"fallback_encoding": "Turkish (Windows 1254)",
"folder_exclude_patterns":
[
".svn",
".hg",
<?php
define('DB_NAME', 'putyourdbnamehere'); // 数据库名
define('DB_USER', 'usernamehere'); // MySQL用户名
define('DB_PASSWORD', 'yourpasswordhere'); // 密码
define('DB_HOST', 'localhost'); // 很大可能你无需修改此项
function UTF8_DB_Converter_DoIt() {
$tables = array();
$tables_with_fields = array();
@sineld
sineld / paginator.js
Last active April 17, 2016 14:18 — forked from kirkbushell/paginator.js
Paginator module for AngularJS, in combination with Laravel's paginator class
/**
* 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
@scottoffen
scottoffen / add-datatables.js
Last active November 19, 2016 22:15
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 ()