Skip to content

Instantly share code, notes, and snippets.

View gaoryrt's full-sized avatar
🌝
上班啊,不然呢

gaoryrt gaoryrt

🌝
上班啊,不然呢
View GitHub Profile
@gaoryrt
gaoryrt / 🎵 My Spotify Top Tracks
Last active March 28, 2024 00:02
🎧 My music over 4 weeks
Music Sounds Better Wit Stardust & Benjam
Lady - Hear Me Tonight Modjo
Pick Up DJ Koze
Feeling for You Cassius
Dubidubidu (Chipi Chipi Christell
In Love With You The Paradise & Al
Another Chance - Radio Roger Sanchez
Event Horizon Younha
Stay Rihanna & Mikky E
Killin' Me Good (Englis JIHYO
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%">
    <defs>
      <filter id="noise" x="0" y="0" width="100%" height="100%" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse" color-interpolation-filters="linearRGB">
        <feTurbulence type="fractalNoise" baseFrequency=".45 .45" numOctaves="1" seed="1" stitchTiles="noStitch" x="0%" y="0%" width="100%" height="100%" result="turbulence1"/>
        <feBlend mode="multiply" x="0%" y="0%" width="100%" height="100%" in="SourceGraphic" in2="turbulence1" result="blend"/>
      </filter>
    </defs>
  </svg>
@gaoryrt
gaoryrt / fib.js
Last active January 6, 2022 02:49
nth fib
const fib = num => num < 3
? 1
: fib(num - 1) + fib(num - 2)
console.log(fib(7))
@gaoryrt
gaoryrt / fibArr.js
Last active April 12, 2019 06:43
fibArr of length num
const sumOfPrev = arr => {
let len = arr.length
return arr[len - 1] + arr[len - 2]
}
const fib = num => {
if (num === 1) return [1]
else if (num === 2) return [1, 1]
else {
const prev = fib(num - 1)
@gaoryrt
gaoryrt / flat.js
Last active May 11, 2019 06:32
flatten a nested array
const isArr = arg => Object.prototype.toString.call(arg) === '[object Array]'
const flat = inputAny =>
(
isArr(inputAny[0])
? flat(inputAny[0])
: [inputAny[0]]
)
.concat(
inputAny.length > 1
? flat(inputAny.slice(1))
@gaoryrt
gaoryrt / inline-img.txt
Last active March 31, 2018 03:43
smalles 1px * 1px transparent image in base64
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==
data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E
data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"/%3E
http://png-pixel.com/