Skip to content

Instantly share code, notes, and snippets.

View ergunozyurt's full-sized avatar

Ergun Ozyurt ergunozyurt

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ergunozyurt on github.
  • I am ergunozyurt (https://keybase.io/ergunozyurt) on keybase.
  • I have a public key ASCE7l39N7aG1056oa28cter5if5AgwQ20e8LWHvfpSifgo

To claim this, I am signing this object:

MERGE ResultRssDatas as TARGET
USING (select RssDataID as RssDataID, SYS_CHANGE_OPERATION as Operation from changetable(changes RssDatas, 0) as ctt) as SOURCE
ON TARGET.RssDataID = SOURCE.RssDataID
WHEN MATCHED AND SOURCE.Operation = 'D' THEN
delete
WHEN MATCHED AND SOURCE.Operation = 'U' THEN
delete;--will be changed
MERGE ResultRssDatas as TARGET
USING (SELECT
RssDatas.RssDataID,
NewsChannelCategories.NewsChannelCategoryID,
NewsChannels.NewsChannelID,
NewsChannels.Name as NewsChannelName,
ChannelCategories.ChannelCategoryID,
NewsChannelCategories.CountryID,
NewsChannelCategories.LanguageID,
[
"a",
"able",
"about",
"above",
"aboves",
"accept",
"accepted",
"accepting",
"accepts",
@ergunozyurt
ergunozyurt / find_the_key_in_multidimension_array.php
Last active October 12, 2015 03:11
Searches for the given key in multidimension array and returns its value
function searchArrayForKey($search,$array) {
$foundArray= array();
foreach ($array as $key => $value) {
if($key === $search)
{
$foundArray = $value;
break;
}
else
{
@ergunozyurt
ergunozyurt / .bash_profile
Created October 3, 2015 13:04 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# set folder path
$dump_path = "d:\temp"
# set min age of files
$max_days = "-1"
# get the current date
$curr_date = Get-Date
# determine how far back we go based on current date
@ergunozyurt
ergunozyurt / DeleteOldFiles.bat
Created January 26, 2013 15:36
simple bat content for scheduled jobs to delete files older than given date (tested only windows server 2008 )
forfiles /P C:\fullpath\ /M "*.*" /D -30 /C "cmd /c del /s /q @file"
@ergunozyurt
ergunozyurt / MySQLFragmentedTables.sql
Created December 16, 2012 02:41
shows fragmented tables at MySQL
select TABLE_NAME, TABLE_SCHEMA, Data_free from information_schema.TABLES where TABLE_SCHEMA NOT IN ('information_schema', 'mysql') and Data_Free >0;