Skip to content

Instantly share code, notes, and snippets.

@ateszdn
ateszdn / Random Images on Refresh
Created May 15, 2023 07:37 — forked from stephenscaff/Random Images on Refresh
Super simple way to randomly load new images on refresh via Jquery and DOM injection. Great for banners.
<!DOCTYPE html>
<head>
<!--Little CSS fade in -->
<style>
.fade-in{
-webkit-animation: fade-in 2s ease;
-moz-animation: fade-in ease-in-out 2s both;
-ms-animation: fade-in ease-in-out 2s both;
-o-animation: fade-in ease-in-out 2s both;
@ateszdn
ateszdn / change-codec.md
Created January 17, 2023 09:36 — forked from dvf/change-codec.md
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@ateszdn
ateszdn / index.html
Created January 4, 2023 17:26
VR2 logo scroll anim
<section class="blank" style="height: 300px; background-color: rgb(4, 3, 35); position: relative;">
</section>
<section id="sensory-experience" class="pinned-section" style="height: 3001px; background-color: rgb(4, 3, 35); position: relative;">
<div style="top: 0px; left: 0px; position: sticky; width: 100%; height: 895px; will-change: transform; overflow: hidden;">
<div class="flex flex-col items-center justify-center w-full h-screen bg-cover" style="background-image: linear-gradient(rgb(4, 3, 35) 50%, rgba(4, 3, 35, 0));">
<div class="relative w-[460px] sm:w-[932px] md:w-[784px] lg:w-[1054px] xl:w-[1540px] mb-[5px] md:mb-[20px] lg:mb-[-10px] xl:mb-[-20px]" style="transform: translate(0px, 89.5px);">
<img id="img1" class="absolute top-0 left-0 z-0 w-full backface-visible max-w-none" src="https://gmedia.playstation.com/is/image/SIEPDC/section2b-header-image-1?qlt=87,1&amp;resMode=bilin&amp;fmt=jpg&amp;scl=1" data-di-id="4e55d033-b29a919" alt="A virtuális valóság játékainak új generációja">
@ateszdn
ateszdn / index.html
Created January 4, 2023 12:42
VR2 - sound section
<section id="sound-section" class="pinned-section" style="height: 5401px; background-color: rgb(216, 220, 231); position: relative;">
<div style="top: 0px; left: 0px; position: sticky; width: 100%; height: 896px; will-change: transform; overflow: hidden visible;">
<div class="relative w-full h-full overflow-hidden">
<div class="absolute top-0 left-0 flex items-start justify-center w-full h-full">
<div class="relative w-full h-screen " id="vid_container_magávalragadó3dhangzás" style="height: 100%;"><video class="absolute top-0 object-cover w-screen h-screen transform -translate-x-1/2 left-1/2" loop="" id="vid_el_magávalragadó3dhangzás" style="height: 100%;" playsinline="" preload="auto" poster="https://gmedia.playstation.com/is/image/SIEPDC/section4b-video-poster?qlt=87,1&amp;resMode=bilin&amp;fmt=jpg&amp;scl=1" aria-label="" title="Magával ragadó 3D hangzás">
<source src="https://gmedia.playstation.com/is/content/SIEPDC/global_pdc/en/hardware/psvr2/channel-specific-content/pdc/
@ateszdn
ateszdn / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Created May 15, 2018 15:50 — forked from ccstone/BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2016/02/29 17:26
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@ateszdn
ateszdn / gist:abc874e5a93d76816c74cdda6be88155
Created June 29, 2016 08:18 — forked from mhawksey/gist:1170597
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user