Skip to content

Instantly share code, notes, and snippets.

View erdoganoksuz's full-sized avatar
🚴
Focusing

Erdogan Oksuz erdoganoksuz

🚴
Focusing
  • Turkey
View GitHub Profile
@erdoganoksuz
erdoganoksuz / index.html
Created March 26, 2018 16:47
Service Worker Network Test
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1 id="text">Heyy</h1>
<button onclick="getData()">GetData</button>
self.addEventListener('fetch', function (event) {
if (event.request.url == "https://jsonplaceholder.typicode.com/posts/1") {
console.log(event)
var init = {
status: 200,
statusText: "OK",
headers: {
'Content-Type': 'application/json'
}
};
@erdoganoksuz
erdoganoksuz / cloudSettings
Last active June 26, 2018 13:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-06-26T13:42:12.712Z","extensionVersion":"v2.9.2"}
@erdoganoksuz
erdoganoksuz / cloudSettings
Last active December 14, 2020 13:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-14T13:22:47.851Z","extensionVersion":"v3.4.3"}
0 == "0" // true
0 == "1" // false
const list = ["yey", "wuw"];
list.valueOf = () => "JAVASCRIPT SO EASY!";
if (Array.isArray(list)) console.log("IM AN ARRAY")
if (list.some(val => val === "yey")) console.log("YEY EXIST")
if(list == "JAVASCRIPT SO EASY!"){
list.valueOf = () => 1;
console.log("IM ALSO STRING")
}
if(1 == list) console.log("IM ALSO NUMBER")