Skip to content

Instantly share code, notes, and snippets.

View badursun's full-sized avatar
🎯
Focusing

Anthony Burak DURSUN badursun

🎯
Focusing
View GitHub Profile
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@badursun
badursun / URLDecode.asp
Created May 26, 2023 13:42 — forked from gwobcke/URLDecode.asp
ASP seems to lack a URL Decode function but has a URL Encode function available. Here is a function that can decode any URL Encoded URL or variable.
<%
FUNCTION URLDecoder(str)
'// This function:
'// - decodes any utf-8 encoded characters into unicode characters eg. (%C3%A5 = å)
'// - replaces any plus sign separators with a space character
'//
'// IMPORTANT:
'// Your webpage must use the UTF-8 character set. Easiest method is to use this META tag:
'// <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
'//
dequeue() {
if (this.workingOnPromise) {
return false;
}
const item = this.queue.shift();
if (!item) {
return false;
}
try {
this.workingOnPromise = true;
@badursun
badursun / DateTimeConvert.asp
Created January 24, 2022 09:24 — forked from radleta/DateTimeConvert.asp
Date and Time conversion local to and from UTC for ASP.
<%
' ****************************************************************************
' Sub: GetUtcOffsetMinutes
' Description: Gets the number of minutes between local time and UTC.
'
' Params: None
' ****************************************************************************
Function GetUtcOffsetMinutes()
@badursun
badursun / tawkto_rebind.js
Created May 18, 2021 16:21
tawk.to Dynamicli Script Remove Re-Init
var scriptAdded = false;
function TawkRun(RunCode){
console.log('RunCode:', RunCode);
if(scriptAdded==true && window.Tawk_API !== undefined && typeof window.Tawk_API.hideWidget === 'function'){
window.Tawk_API.hideWidget();
}
const scripts = document.getElementsByTagName('script');
for (let i = 0; i < scripts.length; i++) {
@badursun
badursun / krpano-hotspot-script
Last active July 5, 2021 04:29
KRPano Javascript Click and Add HotSpot Dynamicly
let hotspot=3;
function getlookat(){
var krpano = document.getElementById("krpanoSWFObject");
if (krpano && krpano.get){
krpano.call("screentosphere(mouse.x, mouse.y, mouseath, mouseatv)");
var mouse_at_h = krpano.get("mouseath");
var mouse_at_v = krpano.get("mouseatv");
let spotname = 'spot_'+hotspot;
let $panoCode = "addhotspot("+spotname+");"

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@badursun
badursun / google-taxonmy.sql
Created December 29, 2020 15:21 — forked from ahmetkakici/google-taxonmy.sql
Google Product Taxonomy - SQL script
INSERT INTO categories (parent_id, name, id) VALUES (null, 'Bavullar ve Çantalar', 5181);
INSERT INTO categories (parent_id, name, id) VALUES (5181, 'Alışveriş Çantaları', 5608);
INSERT INTO categories (parent_id, name, id) VALUES (5181, 'Bavul Aksesuarları', 110);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Bagaj Rafları ve Sehpaları', 499691);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Bavul Düzenleyicileri', 5620);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Bavul Etiketleri', 5651);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Bavul Kayışları', 5652);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Bavul Örtüleri', 7521);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Korumalı Kap Düzenleyicileri ve Bölme Ekleri', 503014);
INSERT INTO categories (parent_id, name, id) VALUES (110, 'Seyahat Keseleri', 5650);
@badursun
badursun / mime_type_configuration.xml
Created September 21, 2019 10:35 — forked from contensis/mime_type_configuration.xml
How to configure MIME types within web.config.
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".vtt" mimeType="text/vtt" />
<mimeMap fileExtension=".srt" mimeType="text/srt" />
<mimeMap fileExtension=".aac" mimeType="audio/aac" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />