Skip to content

Instantly share code, notes, and snippets.

View FARUK-YILDIRIM's full-sized avatar
Could it actually be possible for computer code strings to be able to think? 🤔

Faruk YILDIRIM FARUK-YILDIRIM

Could it actually be possible for computer code strings to be able to think? 🤔
View GitHub Profile
@FARUK-YILDIRIM
FARUK-YILDIRIM / mysql_dump_import_to_docker.sh
Last active January 10, 2025 01:32
mysql dump and import script for docker
#!/usr/bin/env bash
SOURCE_HOST=''
SOURCE_PORT='3306'
SOURCE_USER=''
SOURCE_PASSWORD=''
SOURCE_DB=''
DUMP_FILE='dump.sql'
DEST_HOST='host.docker.internal'
@FARUK-YILDIRIM
FARUK-YILDIRIM / search_char_text_columns.sql
Created June 12, 2024 06:43
This script dynamically searches for a specific value in columns of character and text data types across all tables in the database. It then returns the table and column names where the value is found.
DECLARE @search_value NVARCHAR(100) = '46CF7YQFBUU1159';
DECLARE @query NVARCHAR(MAX) = '';
SELECT @query = @query +
'SELECT ''' + t.name + ''' AS [Table], ''' + c.name + ''' AS [Column] FROM ' + QUOTENAME(t.name) + ' WHERE CAST(' + QUOTENAME(c.name) + ' AS NVARCHAR(MAX)) = ''' + @search_value + ''' UNION ALL '
FROM
sys.columns c
INNER JOIN
sys.tables t ON c.object_id = t.object_id
WHERE
@FARUK-YILDIRIM
FARUK-YILDIRIM / top_3_table_data.sql
Created June 12, 2024 06:39
This script selects the top 3 rows of data from each table in the database whose names contain the letter "g".
DECLARE @TableName NVARCHAR(128)
DECLARE @SQL NVARCHAR(MAX)
SET @SQL = ''
DECLARE table_cursor CURSOR FOR
SELECT name FROM sys.tables WHERE name LIKE '%g%';
OPEN table_cursor;
FETCH NEXT FROM table_cursor INTO @TableName;
@FARUK-YILDIRIM
FARUK-YILDIRIM / launch.json
Last active April 14, 2025 11:01
This gist contains a launch.json configuration for debugging multiple microservices within a Node.js environment using Visual Studio Code. Each configuration is tailored for a specific microservice, enabling seamless debugging across the architecture.
// This gist contains a launch.json configuration for debugging multiple microservices within a
// Node.js environment using Visual Studio Code. Each configuration is tailored for a specific microservice,
// enabling seamless debugging across the architecture.
{
"version": "0.2.0",
"configurations": [
{
"name": "Auth Service",
"type": "node",
"request": "launch",
@FARUK-YILDIRIM
FARUK-YILDIRIM / .ideavimrc
Last active September 30, 2025 14:13 — forked from dewaka/.ideavimrc
" General Vim Settings
set ignorecase
set smartcase
set scrolloff=15
set clipboard+=unnamed
set ideajoin
set multiple-cursors
set relativenumber
" Plugin Emulation
@FARUK-YILDIRIM
FARUK-YILDIRIM / realm-path.swift
Last active February 1, 2022 12:13
Finding the path to the Realm Database file
import RealmSwift
print("DEBUG: \(Realm.Configuration.defaultConfiguration.fileURL)")
// DEBUG: Optional(file:///Users/farukyildirim/Library/Developer/CoreSimulator/Devices/DB27F964-1D6E-4F65-917D-2E812EB2E92A/data/Containers/Data/Application/AA51CF8D-3B4A-4E2D-A1E4-5666CF6B53FD/Documents/default.realm)
@FARUK-YILDIRIM
FARUK-YILDIRIM / cloudSettings
Last active August 21, 2021 06:15
VSCODE Settings
{"lastUpload":"2021-08-21T06:15:25.153Z","extensionVersion":"v3.4.3"}