Skip to content

Instantly share code, notes, and snippets.

View sayz's full-sized avatar
🏠
Working from home

Sefa Yıldız sayz

🏠
Working from home
View GitHub Profile
@sayz
sayz / isimler.sql
Created June 30, 2016 05:42 — forked from berkayunal/isimler.sql
isim sözlüğü
CREATE TABLE `isimler` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`ad` varchar(255) COLLATE utf8_bin NOT NULL,
`cinsiyet` varchar(50) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ad` (`ad`),
KEY `cinsiyet` (`cinsiyet`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@sayz
sayz / decorator.py
Created January 17, 2016 22:09
dekoratörler için örnek olarak kenarda dursun
# -*- coding: utf-8 -*-
#def add(x, y):
# return x + y
#def sub(x, y):
# return x - y
alias up1="cd .."
# edit multiple files split horizontally or vertically
alias e="vim -o "
alias E="vim -O "
# directory-size-date (remove the echo/blank line if you desire)
alias dsd="echo;ls -Fla"
alias dsdm="ls -FlAh | more"
# show directories only
alias dsdd="ls -FlA | grep :*/"
# show executables only
@sayz
sayz / sssh
Created May 11, 2013 20:16
A simple way of connecting to SSH servers
#!/bin/bash
# A simple way of connecting to SSH servers
#
# Usage:
# sssh host_codename [USER]
#
# Configuration file:
# codename host [username]
CONF="$HOME/.sssh_hosts"
@sayz
sayz / changemacs.sh
Created May 11, 2013 16:14
change mac
#!/bin/bash
macs=$(cat "$MAC_FILE")
if [ "$#" -lt 1 ]
then
# No arguments. List available macs
echo "$macs"
else
IFS=$'\n'
@sayz
sayz / flashvideos.sh
Created May 11, 2013 16:04
List all flash videos opened on browser
#!/bin/bash
process_id=`ps aux | grep libflash | grep -v grep | tr -s " " | cut -d " " -f 2`
videos=`file /proc/$process_id/fd/* | grep Flash | sed -n 's,^\(/proc/[0-9]\+/fd/[0-9]\+\):\(.*\),\1,p'`
echo "$videos"
<?php
class Urunler {
public $urunID;
function urunBilgisi($urunID = 123)
{
$conn = mysql_connect('localhost','root','1234');
mysql_select_db('eticaret', $conn);
$urunler = "SELECT * FROM tUrunler WHERE urunID = '".$urunID."'" or die(mysql_error());
$q = mysql_query($urunler) or die(mysql_error());
#!/usr/bin/python3
#-*- coding:utf-8 -*-
import sys
import re
sesli = ['a', 'e', 'ı', 'i', 'o', 'ö', 'u', 'ü', 'A', 'E', 'I', 'i', 'O', 'Ö', 'U', 'Ü']
sessiz = ['b', 'c', 'ç', 'd', 'f', 'g', 'ğ', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'ş', 't', 'v', 'y', 'z', 'B', 'C', 'Ç', 'D', 'F', 'G', 'Ğ', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'Ş', 'T', 'V', 'Y', 'Z' ]
def reg_exp(list):
@sayz
sayz / index.html
Created March 29, 2013 13:56
A CodePen by Žiga Miklič. Pure CSS Google logos - I recreated the logos that I have in my Google Chrome browser, using only HTML5 and CSS3.
<section>
<!-- START YouTube -->
<article>
<div id="youtube"></div>
<footer>
<h3>YouTube</h3>
</footer>
</article>
<!-- END YouTube -->
@sayz
sayz / FizzBuzz.rb
Created March 29, 2013 00:57
first octopress
#!/usr/bin/env ruby
(1..100).each do |i|
fizz = (i % 3) == 0? 1 : 0
buzz = (i % 5) == 0? 1 : 0
index = (buzz << 1) | fizz
output = [i, "Fizz", "Buzz", "FizzBuzz"]
puts output[index]
end