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 / redis-server
Last active July 5, 2016 20:14
redis - this script starts and stops the redis-server daemon (centos 6.5)
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@sineld
sineld / nginx.conf
Last active August 29, 2015 13:57
Rewriting subdomains to the Document Root in Nginx
# http://www.nigeldunn.com/2011/06/30/rewriting-subdomains-to-the-document-root-in-nginx/
# hosts file: 127.0.0.1 proje.sineld.se proje2.sineld.se
server {
server_name ~^(.+)\.sineld\.se$;
set $file_path $1;
@sineld
sineld / barantr90.php
Created March 14, 2014 13:46
barantr90
Evet sorunu buldum.
navigation.blade.php dosya içeriğindeki bu satırı:
<a href="{{ URL::route('profile-user') }}">Profil</a><br>
bununla değiştirince
<a href="{{ URL::route('profile-user', Auth::user()->username) }}">Profil</a><br>
@sineld
sineld / gnome-keyring.sh
Created February 6, 2014 07:46
Disabling gnome-keyring
$ rm ~/.gnome2/keyrings/*
$ sudo shutdown -r now
(after restart) Login.
Enter network key in NetworkManager dialog.
Hit button=Cancel in keyring dialog.
http://ubuntuforums.org/showthread.php?t=796410&page=2
@sineld
sineld / macros.php
Created February 5, 2014 09:47 — forked from mnshankar/macros
<?php
/*********************************************************************************************
* Example usage (In view)
* <div class="welcome">
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?>
<?php echo Form::textField('first_name')?>
<?php echo Form::textField('last_name')?>
<?php echo Form::emailField('email')?>
<?php echo Form::passwordField('password')?>
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?>
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@sineld
sineld / routes.php
Created October 27, 2013 12:48
Sefa için filtre örneği
<?php
class DogumgunuFilter {
public function filter($route, $request, $tarih) {
if (date('d/m') == $tarih) {
return 'Doğum günün kutlu olsun Sefa';
}
}
}
Route::filter('dogumgunu', 'DogumgunuFilter');
@sineld
sineld / .vimrc
Created October 14, 2013 18:32 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
<?php
require("PHPMailer/class.phpmailer.php");
function sinMailer($kimeEmail, $kimeAd = FALSE, $mailKonu, $mailMesaj, $kimdenEmail = FALSE, $kimdenAd = FALSE){
$kimeAd = $kimeAd ? $kimeAd : $kimeEmail;
$mail = new PHPMailer();
$mail->IsSMTP();
@sineld
sineld / class.phpmailer.php
Created August 13, 2013 06:59
Mandrillapp ile Phpmailer
<?php
/*~ class.phpmailer.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
| Version: 5.2.1 |
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
| ------------------------------------------------------------------------- |
| Admin: Jim Jagielski (project admininistrator) |
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |