Skip to content

Instantly share code, notes, and snippets.

View bahadirdogru's full-sized avatar
💭
I may be slow to respond.

Bahadır bahadirdogru

💭
I may be slow to respond.
View GitHub Profile
@bahadirdogru
bahadirdogru / OpenWithSublimeText3.bat
Created March 7, 2019 07:49 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@bahadirdogru
bahadirdogru / set-user-agent-file_get_contents.php
Created April 26, 2019 13:50 — forked from vyspiansky/set-user-agent-file_get_contents.php
PHP: set user agent using file_get_contents()
<?php
$options = array('http' => array('user_agent' => 'custom user agent string'));
$context = stream_context_create($options);
$response = file_get_contents('http://domain/path/to/uri', false, $context);
@bahadirdogru
bahadirdogru / sketch.html
Created July 17, 2019 11:58 — forked from tomhodgins/sketch.html
Draw <svg> inside the browser! On mousedown and touchstart it begins drawing a line, drops nodes as you mousemove or touchmove, and then finishes the line where you mouseup or touchend. It also has support for line width and color, exporting the current drawing by email as well as downloading the drawing as an svg file.You can also import SVGs. h…
<!DOCTYPE html>
<html manifest=sketch.manifest>
<head>
<meta charset=utf-8>
<title>Sketch</title>
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<meta name=viewport content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, minimal-ui">
<link href="http://staticresource.com/formal.css" rel=stylesheet type=text/css>
<script>eval(unescape(escape('♶♡♲☠♩☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☧♣♡♮♶♡♳☧☩☬♣☽♩☮♧♥♴♃♯♮♴♥♸♴☨☧☲♤☧☩☬♦☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☧♬♩♮♫☧☩☬♭☽♤♯♣♵♭♥♮♴☮♣♲♥♡♴♥♅♬♥♭♥♮♴☨☧♬♩♮♫☧☩☻♩☮♷♩♤♴♨☽☲☰☰☻♩☮♨♥♩♧♨♴☽☲☰☰☻♣☮♦♩♬♬♓♴♹♬♥☽☧♬♩♧♨♴♧♯♬♤♥♮♲♯♤♹♥♬♬♯♷☧☻♣☮♢♥♧♩♮♐♡♴♨☨☩☻♣☮♭♯♶♥♔♯☨☱☰☬☰☩☻♣☮♬♩♮♥♔♯☨☱☹☰☬☰☩☻♣☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☲☰☰☬☰☬☲☰☰☬☱☰☩☻♣☮♬♩♮♥♔♯☨☲☰☰☬☱☹☰☩☻♣☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☲☰☰☬☲☰☰☬☱☹☰☬☲☰☰☩☻♣☮♬♩♮♥♔♯☨☱☰☬☲☰☰☩☻♣☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☰☬☲☰☰☬☰☬☱☹☰☩☻♣☮♬♩♮♥♔♯☨☰☬☱☰☩☻♣☮♱♵♡♤♲♡♴♩♣♃♵♲♶♥♔♯☨☰☬☰☬☱☰☬☰☩☻♣☮♣♬♯♳♥♐♡♴♨☨☩☻♣☮♦♩♬♬☨☩☻♣☮♳♴♲♯♫♥♓♴♹♬♥☽☧♲♥♤☧☻♣☮♬♩♮♥♗♩♤♴♨☽☳☰☻♣☮♬♩♮♥♃♡♰☽☧♲♯♵♮♤☧☻♣☮♢♥♧♩♮♐♡♴♨☨☩☻♣☮♭♯♶♥♔♯☨☴☵☬☱☳☰☩☻♣☮♢♥♺♩♥♲♃♵♲♶♥♔♯☨☴☵☬☱☳☰☬☷☰☬☲☰☰☬☱☰☵☬☱☳☰☩☻♣☮♢♥♺♩♥♲♃♵♲♶♥♔♯☨☱☰☵☬☱☳☰☬☱☴☰☬☵☰☬
@bahadirdogru
bahadirdogru / sql-check-valid-email.sql
Last active December 29, 2020 13:50
Sql Email Verification
select * from emails
where
and EMAIL LIKE '%_@%_.__%'
and EMAIL like '[a-z,0-9,_,-]%@[a-z,0-9,_,-]%.[a-z][a-z]%'
and EMAIL not like '%[;,üğçö<>:*/\{}[]()&%^!~¨$#£½|"é€æ?=]%'
@bahadirdogru
bahadirdogru / 000 - Magento .gitignore
Created May 10, 2021 22:42 — forked from dfelton/000 - Magento .gitignore
.gitignore for Magento 1.9 projects
##
# Magento stuff.
##
downloader/.cache/*
downloader/cache.cfg
downloader/connect.cfg
maintenance.flag
media/*
media/**
var/*
@bahadirdogru
bahadirdogru / 1.sql
Created May 11, 2021 12:40
Get enable and disable trigger list of databases
SELECT
t2.[name] TableTriggerReference
, SCHEMA_NAME(t2.[schema_id]) TableSchemaName
, t3.[rowcnt] TableReferenceRowCount
, t1.[name] TriggerName
, 'ALTER TABLE ' + SCHEMA_NAME(t2.schema_id) + '.' + t2.[name] + ' DISABLE TRIGGER ' + t1.[name] + ';' DisableScript
, 'ALTER TABLE ' + SCHEMA_NAME(t2.schema_id) + '.' + t2.[name] + ' ENABLE TRIGGER ' + t1.[name] + ';' EnableScript
, t1.object_id
,t1.is_disabled
FROM sys.triggers t1
@bahadirdogru
bahadirdogru / _cheatsheat.md
Created January 27, 2022 11:29 — forked from JeansBolong/_cheatsheat.md
Magento CheatSheet

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@bahadirdogru
bahadirdogru / magento-code-snippets.md
Created February 24, 2022 10:17 — forked from geekwho-eth/magento-code-snippets.md
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
# Files are in list of TEST-{Number} folder: TEST-1/01.png TEST-1/02.png...
#
#define indexes
let i_dir=0
let i_file=0
# first loop for directories
# Klasör isimleri TEST ifadesi ile başlamalı
for dir in TEST*/; do