This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
if (!document.querySelector('#telefon') || 0 === document.querySelector('#telefon').value.length) { | |
return null; | |
} | |
var phone = '+90' + document.querySelector('#telefon').value.replace(/[\(|\)|\s]/g,''); | |
//+905551234567 -> 13 karakter | |
if (13 < phone.length) { | |
return null; | |
} | |
return phone; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- vim: set autoindent expandtab shiftwidth=2 tabstop=2: | |
-- :PlugInstall | |
-- vim-plug https://github.com/junegunn/vim-plug | |
local vim = vim | |
local Plug = vim.fn['plug#'] | |
local PlugBegin = vim.fn['plug#begin'] | |
local PlugEnd = vim.fn['plug#end'] | |
vim.cmd [[language en]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { PurgeCSSPlugin } = require("purgecss-webpack-plugin"); | |
const glob = require("glob-all"); | |
// https://stackoverflow.com/a/77249323/181295 | |
module.exports = { | |
plugins: [ | |
new PurgeCSSPlugin({ | |
defaultExtractor: (content) => { | |
const defaultSelectors = content.match(/[A-Za-z0-9_-]+/g) || []; | |
const extendedSelectors = content.match(/[^<>"=\s]+/g) || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="Redirect to www" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="tr" itemscope itemtype="https://schema.org/FAQPage"> | |
<body> | |
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> | |
<h2 itemprop="name">Sample Question 1?</h2> | |
<div itemprop="acceptedAnswer" itemscope itemtype="https://schema.org/Answer"> | |
<div itemprop="text"> | |
<p>Answer example 1</p> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-webkit-scrollbar { | |
width: 5px; | |
} | |
::-webkit-scrollbar-thumb { | |
background-color: black; | |
} | |
::-webkit-scrollbar-track { | |
box-shadow: inset 0 0 2px gray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/36986520 | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} example\.com$ | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cjs variable name: cjs - search_term (q) | |
function() { | |
var params = new URLSearchParams(window.location.search); | |
return params.get('q'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @return IntersectionObserver */ | |
function createObserver(p_threshold) { | |
return new IntersectionObserver( | |
(entries) => { | |
entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
if (entry.isIntersecting) { | |
const eventIntersecting = new CustomEvent("intersecting"); | |
entry.target.dispatchEvent(eventIntersecting); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define the observer | |
const observer = new IntersectionObserver((entries) => { | |
entries.forEach((/** @type IntersectionObserverEntry */ entry) => { | |
if (entry.isIntersecting) { | |
const eventIntersecting = new CustomEvent("intersecting"); | |
entry.target.dispatchEvent(eventIntersecting); | |
return; | |
} | |
const eventNotIntersecting = new CustomEvent("not-intersecting"); | |
entry.target.dispatchEvent(eventNotIntersecting); |
NewerOlder