Skip to content

Instantly share code, notes, and snippets.

View badursun's full-sized avatar
🎯
Focusing

Anthony Burak DURSUN badursun

🎯
Focusing
View GitHub Profile
@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" />
@badursun
badursun / web.config
Created May 9, 2019 12:53 — forked from weeksdev/web.config
IIS Web Config with All Http Verbs Allowed
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<!--
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.