Skip to content

Instantly share code, notes, and snippets.

View yuxel's full-sized avatar

Osman Yüksel yuxel

View GitHub Profile
<?php
$row = 0;
$head = array();
$result = array();
$columnCount = 0;
$input = "/var/www/products.csv";
$output = "/tmp/outx.json";
@yuxel
yuxel / varnish.vcl
Last active December 29, 2015 04:49
Özgür Web Teknolojileri Günleri 2013'deki Varnish Konfigursayonu
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend server1 {
.host = "haber.local";
.port = "8080";
}
var Sahi = function () {
var that = this;
console.log(this);
that.msg = "Burasi Class";
that.clickBindEt = function () {
console.log('class this ', this);
#1227086 | #1227085 | #1227084 | #387134 | #387133 | #339221 | #387166 | #387141 | #339223 | #339224 | #387139 | #339225 | #387140 | #387143 | #339227 | #387129 | #339229 | #387158 | #339230 | #387159 | #339231 | #387149 | #339232 | #387101 | #339236 | #387165 | #339237 | #387164 | #339238 | #387163 | #339239 | #339240 | #387122 | #387123 | #339241 | #339242 | #387136 | #339245 | #339246 | #387145 | #387146 | #339247 | #387144 | #339248 | #387170 | #339251 | #387127 | #339252 | #339253 | #339254 | #387118 | #339255 | #387152 | #339257 | #387151 | #339258 | #387153 | #339259 | #339260 | #387112 | #387137 | #387138 | #339263 | #387126 | #339264 | #387115 | #387116 | #387160 | #339270 | #387106 | #339271 | #387108 | #339272 | #387117 | #339273 | #387125 | #339278 | #387090 | #339280 | #339281 | #339282 | #387096 | #387097 | #339284 | #339285 | #387148 | #339286 | #387121 | #339289 | #387128 | #339290 | #339291 | #387091 | #387092 | #387110 | #339293 | #339295 | #339296 | #339297 | #387105 | #339298 | #387111 | #
@yuxel
yuxel / image.php
Created February 26, 2013 14:14
get image color palette
<?php
namespace Sonsuzdongu;
class Image
{
private $colors = array(
"black" => array(0, 0, 0),
"green" => array(0, 128, 0),
"green:x" => array(120, 150, 70),
"green:xxx" => array(0, 255, 0),
@yuxel
yuxel / shibby.php
Created June 1, 2012 22:18
shibby.php
<?php
$text = <<<EOT
<TABLE NOBORDER cellPadding=0 cellSpacing=0 width=310>
<TR>
<TD COLSPAN="2" class=baslik>151814244&nbsp;ENGINEERING TERMODYNAMICS I</TD>
</TR>
<TR>
<TD align=left width=100 class=beyazsatir><A class=normaltext href="javascript:window_open('http://193.140.141.9:7777/pls/osmangaziuniversitesibilgisistemi/ASP.pageid_000085?param01=not_01&param02=1&param03=106685&param04=13',2)">ARA SINAV (%20):</A></TD>
<TD align=left width=210 class=beyazsatir>13</TD>
</TR>
@yuxel
yuxel / labeledstatements.js
Created May 9, 2012 23:00
labeled statements
//normal loop
for (var i=0; i < 3; i++) {
for(var j = 0; j < 3; j++) {
console.log(i,j);
}
}
/* output for normal loop
0 0
0 1
0 2
@yuxel
yuxel / static.html
Created April 26, 2012 11:08
static.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>At Hirisiz</title>
</head>
<body>
<script type="text/javascript">
@yuxel
yuxel / foo-iso.css
Created December 10, 2011 17:49
utf9
/* bu calismayacaktir */
@charset "ISO-8859-1";
#sonsuzdöngü {border:1px solid red; content: "burayı utf-8 karakterlerle değiştiriyorum üğçıİ"}
@yuxel
yuxel / yilmaz.sh
Created October 25, 2011 11:43
yilmaz.sh
#!/bin/bash
#bunu
matching="yuxel www-data"
#buna cevir, bundaki ':' ya dikkat
convertTo="yuxel:yuxel"
#her dosyada (bunu dizin için de yapmak istersen -type d ile bi daha dönmen gerekeek galiba
for i in `find * -type f`; do
#owner ve group'u al
owngrp=`ls -al $i | awk '{print $3 , $4;}'`;