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
// thanks to x.com/umutbasalt | |
function generateUUID() { | |
function r() { | |
return Math.floor(Math.random() * 65536).toString(16).padStart(4, '0'); | |
} | |
return ( | |
r() + r() + "-" + | |
r() + "-" + |
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
{ | |
"basics": { | |
"name": "Fatih Kadir Akın", | |
"label": "DevRel Manager at Teknasyon", | |
"picture": "", | |
"email": "[email protected]", | |
"phone": "", | |
"website": "https://github.com/f", | |
"summary": "I'm a passionate software developer living in Istanbul, Turkey. Wrote a book about JavaScript. I love being part of development of web technologies. I like to organize conferences and give talks.\n\nI love open source development and I care on my GitHub profile (@f). Love JavaScript and Ruby (and RoR)", | |
"location": { |
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 $$ = document.querySelectorAll.bind(document); | |
const $ = document.querySelector.bind(document); | |
const watchBody = new MutationObserver(() => { | |
const tabs = `[href='/home'][role='tab']`; | |
const homeButton = `[aria-label="Home"]`; | |
const $tabs = $$(tabs); | |
if ($tabs?.length > 1) { | |
$tabs[1]?.click(); |
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
# add this to bashrc | |
p() { | |
if [ -f "yarn.lock" ]; then | |
yarn $1 | |
fi | |
if [ -f "package-lock.json" ]; then | |
npm run $1 | |
fi | |
} |
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
[ | |
[ | |
"a", | |
"#A" | |
], | |
[ | |
"ab", | |
"#AB" | |
], |
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 constraints = [ | |
{ | |
nums: [6, 9, 0], | |
hint: [1, true], // true means correct place | |
}, | |
{ | |
nums: [7, 4, 1], | |
hint: [1, false], // false means wrong place | |
}, | |
{ |
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
[ | |
"abacı", | |
"abadi", | |
"abalı", | |
"Abana", | |
"abani", | |
"abaşo", | |
"Abaza", | |
"Abbas", | |
"Abdal", |
This file has been truncated, but you can view the full file.
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
[ | |
"a", | |
"ab", | |
"aba", | |
"aba", | |
"abacı", | |
"abacılık", | |
"abadi", | |
"abajur", | |
"abajurcu", |
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 MY_DOMAIN = "fka.dev" | |
const NOTION_MAIL = "[email protected]" | |
const START_PAGE = "https://www.notion.so/fkadev/fka-dev-0606b67bc0f14660992362682d6f7eda" | |
const DISQUS_SHORTNAME = "fkadev" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { |
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
setInterval(()=>fetch("http://secim.aa.com.tr/Handlers/IlBelediyeBaskanligi.ashx").then(x=>x.json()).then(x=>x.AA.IlSonuclari["Il"].find(x=>x.Kod=='34').PartiSonuclari.Parti.filter(x=>['7','8'].includes(x.Kod)).map(x=>x.Oy).map(x=>parseInt(x)).reduce((x,y)=>x-y)).then(x=>console.log(Math.abs(x))),1e3); |
NewerOlder