30 Nisan 2019 Salı

Recursive olarak bir kullanıcıya 777 vermek

setfacl -R -m u:colleague:rwX .

18 Mart 2019 Pazartesi

Python2 - Replace Turkish characters with ascii look-alikes

#!/usr/bin/python -tt
# -*- coding: utf-8 -*-

import codecs
import sys
from base64 import b64encode#reload()
#sys.setdefaultencoding("utf-8")

UTF8Writer = codecs.getwriter('utf8')
sys.stdout = UTF8Writer(sys.stdout)

def TRreplacer(mmm):
   my_dict = dict({u'ğ':"g", u'ş':"s", u'ç':"c", u'ü':"u", u'ı':"i", u'ö':"o", u'Ö':"O", u'Ğ':"G", u'Ş':"S", u'Ç':"C", u'Ü':"U", u'İ':"I"})

   for items in my_dict:
       mmm=mmm.replace(items,my_dict[items])
   return mmm

print TRreplacer(u'YİĞİT ÖZEN')

29 Kasım 2018 Perşembe

Oracle - Tablo ya da Kolon ismiyle arama

SELECT owner, table_name, column_name
FROM all_tab_columns
WHERE column_name like '%YOUR_COLUMN_NAME%'
AND OWNER in ('YOUR_SCHEMA_NAME');

SQL Server Tablo ya da Kolon ismiyle arama

SELECT Table_Name, Column_Name
FROM  INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG = 'YOUR_DATABASE'
AND   COLUMN_NAME LIKE '%YOUR_COLUMN%'

Linux - Dinlenen portlar

netstat -tupln | grep ':5000'

Linux port açma

iptables -I INPUT -p tcp --dport 5000 -j ACCEPT

10 Nisan 2018 Salı

Şifrede @ kullanmak

@'leri %40 ile değiştirmek yetiyor.