Skip to content

Instantly share code, notes, and snippets.

Avatar
😺
😼

Jeong Arm tribela

😺
😼
View GitHub Profile
View fullscreen to hass lights.user.js
// ==UserScript==
// @name Fullscreen to lights off
// @version 1
// @grant GM.xmlHttpRequest
// @grant GM.setValue
// @grant GM.getValue
// @match https://app.plex.tv/*
// @match https://watcha.com/*
// @match https://www.netflix.com/*
// @match https://www.disneyplus.com/*
@tribela
tribela / es-nori.dockerfile
Created Oct 18, 2021
Make nori-enabled elastic search docker
View es-nori.dockerfile
FROM elasticsearch:7.14.2
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch analysis-nori
HEALTHCHECK CMD curl -f http://localhost:9200/_cluster/health
@tribela
tribela / resend_suspended_delete_activity.rb
Last active Sep 25, 2021
Resend Delete activity about suspended accounts
View resend_suspended_delete_activity.rb
# Run "bundle exec sidekiq -q tmp -c 32" to run in side of main sidekiq jobs to prevent huge latency on push queue
dry_run = 1 # Change this to nil to run actually
inboxes = Account.inboxes
worker = ActivityPub::DeliveryWorker.new
worker.sidekiq_options_hash['retry'] = 0
worker.sidekiq_options_hash['queue'] = 'tmp'
processed = 0
View glitch.css
@keyframes glitch-anim-text {
0% {
transform: none;
clip-path: polygon(0 0, 100% 0, 100% 0%, 0 0%, 0 5vh, 100% 5vh, 100% 100%, 0 100%);
}
9%, 11% {
transform: scale(1, 1);
View keybase.md

Keybase proof

I hereby claim:

  • I am tribela on github.
  • I am kjwon15 (https://keybase.io/kjwon15) on keybase.
  • I have a public key whose fingerprint is 27E6 CA88 CFBE 2D33 8679 7090 A400 5593 7FB2 BA89

To claim this, I am signing this object:

@tribela
tribela / empty_account.rb
Last active Feb 10, 2020
Find empty account from mastodon
View empty_account.rb
# frozen_string_literal: true
Account
.local.without_suspended
.where('accounts.created_at < ?', 30.days.ago)
.where(note: '')
.where(display_name: '')
.where(avatar_file_name: nil)
.where(
Account.arel_table[:fields].eq(nil).or(
Account.arel_table[:fields].eq([])
@tribela
tribela / fetch.py
Created Sep 22, 2019
Mastodon date site spammer
View fetch.py
import os
from itertools import product
from mastodon import Mastodon
app = Mastodon(
client_id=os.getenv('MASTODON_CLIENT_KEY'),
client_secret=os.getenv('MASTODON_CLIENT_SECRET'),
access_token=os.getenv('MASTODON_ACCESS_TOKEN'),
api_base_url=os.getenv('MASTODON_API_BASE_URL')
View mastodon_link_changer.user.js
@tribela
tribela / custom.scss
Created Aug 26, 2019
Qdon.space - custom scss
View custom.scss
// scss-lint:disable SelectorDepth, SelectorFormat, QualifyingElement, HexLength
$color-qdon: #ffc0fb;
$color-twingyeo: #f8ac59;
$color-twingyeo-edge: #ffdd00;
$color-planet: #4f71db;
$color-jmm: #aaff00;
// Header image on /about/more
.public-layout .column-0 .public-account-header__image {
@tribela
tribela / mpris-yeelight.py
Last active Jul 28, 2019
Mpris listener to change yeelight color
View mpris-yeelight.py
import gi.repository.GLib
from dbus.mainloop.glib import DBusGMainLoop
from io import BytesIO
from pprint import pprint
import colorthief
import mpris2
import requests