Skip to content

Instantly share code, notes, and snippets.

View tufanbarisyildirim's full-sized avatar
🎯
Focusing

Tufan Barış Yıldırım tufanbarisyildirim

🎯
Focusing
View GitHub Profile
<?php
error_reporting(E_ALL);
$output = shell_exec('sudo svn up /srv/www/me.tufyta.com');
$lines = explode("\n",$output);
$colors = array(
'A' => array('#640064','Addding'),
'D' => array('#640000','Deleting'),
'U' => array('#3a32a0','Modified')
);
@tufanbarisyildirim
tufanbarisyildirim / sort_array_multidim.php
Created September 15, 2011 23:26
sort a multidimensional array by sql like order by clause
<?php
/**
* @name Mutlidimensional Array Sorter.
* @author Tufan Barış YILDIRIM
* @link http://www.tufanbarisyildirim.com
* @github http://github.com/tufanbarisyildirim
*
* This function can be used for sorting a multidimensional array by sql like order by clause
*
* @param mixed $array
@tufanbarisyildirim
tufanbarisyildirim / StringExtensions.cs
Created October 13, 2011 23:44
CSharp Extensions
using System;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Globalization;
namespace Extensions
{
public static class StringExtensions
{
private const string UrlPattern = "(ht|f)tps?:\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&amp;:/~\\+#]*[\\w\\-\\@?^=%&amp;/~\\+#])?";
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Query7 RSS Feed',
backgroundColor:'#000'
});
var data = [];
// create table view
namespace ConsoleApplication2
{
class Program
{
private static Program instance;
static void Main(string[] args)
{
instance = new Program();
instance.callMe();
}
public string DataTableToWorkBook(DataTable dt, string postfix)
{
object oMissing = Missing.Value;
Microsoft.Office.Interop.Excel.Application app;
Microsoft.Office.Interop.Excel.Workbooks wkBks;
Microsoft.Office.Interop.Excel.Workbook wkBk;
Microsoft.Office.Interop.Excel.Sheets wkShts;
Microsoft.Office.Interop.Excel.Worksheet wkSht;
@tufanbarisyildirim
tufanbarisyildirim / ImageExtensions.cs
Created April 10, 2013 13:58
OCR Extension metod for System.Drawing.Image using MODI
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
namespace Extensions
{
public static class ImageExtensions
@tufanbarisyildirim
tufanbarisyildirim / GenericExtensions.cs
Last active December 16, 2015 10:49
select list items by using print page like string
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// TODO: check out of page ranges.
public static class GenericExtensions
{
public static List<T> PrintPagesFilter<T>(this List<T> list, string pattern)
{
@tufanbarisyildirim
tufanbarisyildirim / Kefukar.Dotnet.cs
Last active December 17, 2015 02:38
php DOTNET sınıfına bir örnerk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Kefukar
{
public class Dotnet
{
@tufanbarisyildirim
tufanbarisyildirim / ServiceJsonAdapter.cs
Last active December 24, 2015 07:28
an http module example to publish .net asmx webservices as a restful service.
using System;
using System.Web;
using System.Reflection;
using System.Linq;
using System.Collections.Specialized;
using System.Collections.Generic;
namespace ServiceTest
{
public class ServiceJsonAdapter : IHttpHandler