Skip to content

Instantly share code, notes, and snippets.

View absyah's full-sized avatar

Ardian Bahtiarsyah absyah

  • Semarang, Indonesia
View GitHub Profile
@absyah
absyah / daily-payload.json
Last active February 7, 2024 13:48
Shift Generator Payloads
{
"required_members": 9,
"classes": [
{
"id": 1,
"name": "A",
"required_members": {
"morning": 2,
"naptime": 2,
"other": 2
@absyah
absyah / gist:b17cf5cb87db36195f3478eab5eb7de0
Created October 17, 2023 15:34
[DELETE ME] HLS debug
[log] >
instrument.js:109 [log] > stopLoad
instrument.js:109 [log] > loadSource:https://stream.mux.com/m2x0101omwAeb02XfOkLbpVD4rXgwv5wwrrzEfXLd5ZDlA.m3u8?max_resolution=1080p
instrument.js:109 [log] > [stream-controller]: Trigger BUFFER_RESET
instrument.js:109 [log] > attachMedia
instrument.js:109 [log] > [buffer-controller]: Media source opened
instrument.js:109 [log] > [subtitle-stream-controller]: STOPPED->IDLE
instrument.js:109 [Fast Refresh] rebuilding
instrument.js:109 [Fast Refresh] done in 228ms
instrument.js:109 [log] > [level-controller]: manifest loaded, 5 level(s) found, first bitrate: 2564100
{
"textPayload": "checkViews [{\"id\":\"0YCzsPvYG0gdOEe8xfGn\",\"ref\":{\"_firestore\":{\"projectId\":\"vidbase-ee21b\"},\"_path\":{\"segments\":[\"workspaces\",\"MWsnEB09rbWJ97fUUM7M\",\"embeds\",\"alrzekAMId1VXOL6rpRP\",\"views\",\"0YCzsPvYG0gdOEe8xfGn\"],\"projectId\":\"vidbase-ee21b\",\"databaseId\":\"(default)\"},\"_converter\":{}},\"uid\":\"d8UZhrc570Q7FDjUMeaw4m22ZJj2\",\"referrer\":\"https://lp.sakura.ad.jp/\",\"marketoLeadId\":\"37963412\",\"isMarketoLeadSyncToSalesforce\":false,\"contentId\":\"8FmJMCDR63oiZZLg6cXZ\",\"type\":\"embed\",\"embedId\":\"alrzekAMId1VXOL6rpRP\",\"munchkinAccountId\":\"941-NEO-212\",\"workspaceId\":\"MWsnEB09rbWJ97fUUM7M\",\"createdAt\":{\"_seconds\":1683694898,\"_nanoseconds\":385000000},\"viewSeconds\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27],\"totalViewTime\":36,\"updatedAt\":{\"_seconds\":1683704013,\"_nanoseconds\":121000000},\"actionButtonShowCounts\":0,\"actionClickCounts\":0,\"formShowCounts\":0,\"formSubmittedCounts\":0},{\"id\
@absyah
absyah / summary.md
Created August 4, 2023 02:16 — forked from angelialau/summary.md
(Summary) The Art of Readable Code

A summary of The Art of Readable Code by Dustin Boswell and Trevor Foucher

  • Overall metric for readability: code should be written to minimise the time it would take someone else to fully understand it (able to modify the code and spot bugs) Ways to improve readability (ranked from easiest change to most time intensive)
  1. Naming of variables and functions:
    • Use specific, descriptive, succinct names that say the entity's value or purpose
    • Use concrete names instead of abstract names e.g. canListenOnPort > serverCanStart
    • Add important attributes e.g. units or state e.g. unsafeUrl, safeUrl > url
    • Can use shorter variable names for smaller scope
require: rubocop-rails
Style/StringLiterals:
Enabled: false
AllCops:
NewCops: enable
TargetRubyVersion: 3.0
Exclude:
- 'db/**/*'
@absyah
absyah / gist:2bbb7e253e72d211c4f736dd72eb2202
Created May 2, 2023 14:46
RVM install with openssl dir
rvm install x.x.x --with-openssl-dir=$HOME/.rvm/usr
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException
from time import sleep
from selenium.common.exceptions import NoSuchElementException
EMAIL = "email@quipper.com"
PASSWORD = "password"
@absyah
absyah / gist:fee9e61302910e0be952f92e5894515f
Created June 17, 2021 03:21
COMMON_LOCAL_TOPIC_ATTEMPT
localUsages
localTopicAttemptsIds
0"60ca11f4997eac001e3defed"
1"60ca12cdfcae46001cc75654"
2"60ca134a997eac001e3deffa"
3"60ca1375997eac001e3df004"
4"60ca13d9997eac001e3df00a"
5"60ca166afcae460019c755d5"
topicAttemptsByIds
60ca11f4997eac001e3defed{
ini ternyata...
[Tue Jun 8 06:08:00 2021] ena 0000:00:06.0: ENA device version: 0.10
[Tue Jun 8 06:08:00 2021] ena 0000:00:06.0: ENA controller version: 0.0.1 implementation version 1
[Tue Jun 8 06:08:00 2021] ena 0000:00:06.0: Elastic Network Adapter (ENA) found at mem c0100000, mac addr 0a:4e:87:c9:1f:d7
[Tue Jun 8 06:08:06 2021] ena 0000:00:06.0 eth1: Local page cache is disabled for less than 16 channels
[Tue Jun 8 06:08:14 2021] pci 0000:00:07.0: [1d0f:ec20] type 00 class 0x020000
[Tue Jun 8 06:08:14 2021] pci 0000:00:07.0: reg 0x10: [mem 0x00000000-0x00003fff]
[Tue Jun 8 06:08:14 2021] pci 0000:00:07.0: reg 0x18: [mem 0x00000000-0x000fffff pref]
[Tue Jun 8 06:08:14 2021] pci 0000:00:07.0: enabling Extended Tags
require "rails"
%w(
active_record/railtie
action_controller/railtie
action_view/railtie
action_mailer/railtie
active_job/railtie
action_cable/engine
rails/test_unit/railtie