Skip to content

Instantly share code, notes, and snippets.

View rayriffy's full-sized avatar
⌨️
Ground pounding keyboard

Phumrapee Limpianchop rayriffy

⌨️
Ground pounding keyboard
View GitHub Profile

Quick start templates

There are minimum working site with automatic deployment already set up. Choose repository of your choice and get started right away!

Creating repository from a template by clicking Use this template > Create a new repository

Static

Keybase proof

I hereby claim:

  • I am rayriffy on github.
  • I am rayriffy (https://keybase.io/rayriffy) on keybase.
  • I have a public key ASCZL-Op_jwqbD01J2I0qqz0cpxNv1brG6cWZ0WOE13Ylwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am rayriffy on github.
  • I am rayriffy (https://keybase.io/rayriffy) on keybase.
  • I have a public key ASAbxF7JiJYGvMGmXpoZHmN-JG89r49B_m-KTTFJfl41BAo

To claim this, I am signing this object:

@rayriffy
rayriffy / popcat.js
Last active August 15, 2021 15:39
popcat.click clicker
// popcat auto-clicker
// by rayriffy
// drop this into DevTools console
// to run:
// let agent = clicker()
//
// to stop:
// agent.stop()
let getAllNameInMeeting = () => Array.from(document.querySelector('calling-roster-section[data-tid=participantsInCall]').querySelectorAll('div.name > span')).map(o => o.textContent.toLowerCase())
let leaveIfSomeoneLeave = (name) => {
try {
const lowerCaseNames = getAllNameInMeeting()
// if not found, then leave
if (!lowerCaseNames.includes(name)) {
console.log(`[leaveIfSomeoneLeave] "${name}" is leaving! stopping the call`)
document.querySelector('#hangup-button').click()
@rayriffy
rayriffy / autoplay.js
Last active May 11, 2020 13:01
Autoplay script for SEGA minigame: https://chunithm.sega.jp/minigame_memory/
Array.from({ length: document.querySelectorAll('div.card-backPicture').length / 2 })
.map((_, i) => [...document.querySelectorAll(`div.card-backPicture`)].filter(el => el.style.backgroundImage === `url("./images/master/score-${String(i + 1).padStart(2, '0')}.jpg")`))
.reduce((promise, pair) => {
return promise.then(() => {
return new Promise(resolve => {
setTimeout(() => {
resolve(pair.map(el => el.click()))
}, 3000);
})
})
_人人人人人人人人人人人人_
> 害悪プレイヤーの流儀 <
> 毒★麻痺★眠り     <
 ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄

Keybase proof

I hereby claim:

  • I am rayriffy on github.
  • I am rayriffy (https://keybase.io/rayriffy) on keybase.
  • I have a public key whose fingerprint is E9DB 85FE 488F 1776 A86E AEDD A00E DA35 934E AD9A

To claim this, I am signing this object:

@rayriffy
rayriffy / _security.conf
Created May 7, 2018 11:53
Security headers for NGINX server blocks
# STRICT ORIGIN WHEN CROSS ORIGIN
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src * data: 'unsafe-eval' 'unsafe-inline'" always;