Skip to content

Instantly share code, notes, and snippets.

View WebFikirleri's full-sized avatar
💤

Murat Akdeniz WebFikirleri

💤
View GitHub Profile
@WebFikirleri
WebFikirleri / cron.bat
Created September 23, 2022 10:48
Windows Batch File Run a Command at Specific Time
@ECHO OFF
:: SET Window Title (optional)
TITLE Your Cron Title
:: Set First Execution times
:: Your commands will be executed between 09:00 and 09:30
SET loop1Start=15:00
SET loop1End=15:30
:: Set Second Execution times
@WebFikirleri
WebFikirleri / MY_Controller.php
Last active November 4, 2022 06:07
Codeigniter Send Email Example (Gmail Example)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends CI_Controller {
public function _send_mail($to,$subjet,$message,$cc=null)
{
$this->load->library('email');
$this->email->from(config_item('smtp_user'), config_item('sender_name'));
$this->email->to($to);
if ($cc !== null) $this->email->cc($cc);
<div class="form-group">
<label for="resim1_d5">Resim<br></label>
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-primary">
<i class="glyphicon glyphicon-file"></i> &nbsp; Dosya Seç&hellip; <input type="file" style="display: none;" name="resim1_d5" id="resim1_d5">
</span>
</label>
<input type="text" class="form-control" name="resim1_d5" value="<?=$dt->resim1_d5?>" readonly>
</div>
@WebFikirleri
WebFikirleri / tr.grammar.php
Last active September 11, 2015 06:25
Türkçe Ek Düzenleme
/*
Kullanımı:
$text = 'ADANA';
$ek = tr_ek_sec($text,'DE','DA');
echo "{$text}'{$ek}";
Çıktı:
ADANA'DA
*/
function tr_ek_sec($text, $de = 'de', $da='da') {
@WebFikirleri
WebFikirleri / date_tr.php
Created May 4, 2015 06:01
PHP: Türkçe Tarih
<?php
function date_tr($format, $date = time(), $is_string = FALSE) {
if ($is_string) {
$date = strtotime($date);
}
$out = date($format, $date);
$replace = array(
'Sunday' => 'Pazar',
@WebFikirleri
WebFikirleri / download.php
Created April 1, 2015 09:43
PHP: Download A File
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
readfile($file);
exit;
@WebFikirleri
WebFikirleri / snow.js
Created January 2, 2015 08:46
JavaScript Snow Effect
<script type="text/javascript">
//<![CDATA[
var snowmax=300
var snowtype=new Array("Times","Arial","Times","Verdana")
var snowcolor=new Array("#f2f8fa","#eff5f7","#dcedf1","#ffffff","#BFE4FF")
var snowletter="*"
var sinkspeed=0.6
var snowmaxsize=30
var snowminsize=10
@WebFikirleri
WebFikirleri / packages.xml
Last active August 29, 2015 14:03
CDNJS XML Example
<?xml version="1.0" encoding="UTF-8"?>
<libraries>
<libraryjson><![CDATA[
{
"name": "js-sequence-diagrams",
"author": "Andrew Brampton (bramp.net)",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"filename": "sequence-diagram-min.js",
"version": "1.0.3",
"description": "Generates UML sequence diagrams from simple text",
@WebFikirleri
WebFikirleri / slugify.php
Created February 28, 2014 10:17
Slug Generator Library for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class slugify {
protected $ci, $latin, $plain;
protected $primary_key = 'id';
public function __construct()
{
$this->latin = array('á', 'é', 'í', 'ó', 'ú', 'ñ', 'ç', 'ü', 'à', 'è', 'ì', 'ò', 'ù', 'Á', 'É', 'Í', 'Ó', 'Ú', 'Ñ', 'Ç', 'Ü', 'À', 'È', 'Ì', 'Ò', 'Ù');
@WebFikirleri
WebFikirleri / .htaccess
Last active January 24, 2019 13:53
htaccess: html5boilerplate, codeigniter
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com