Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name YouTube live light-weight emoji picker
// @namespace http://zwpp.me/
// @version 0.1
// @description Remove generic emoji from emoji picker and remove notificatioin for Subscribers-only chat
// @author zwpp
// @match https://www.youtube.com/live_chat*
// @grant none
// ==/UserScript==
@zwpp
zwpp / youtube-live-light-emoji-picker.txt
Last active May 7, 2022 16:21
YouTube liveのカスタム絵文字をよく使う人のための uBlock Origin フィルター
! Title: Youtube live light-weight emoji picker
! Description: Only remain members only emoji on emoji picker
! Homepage: https://gist.github.com/zwpp/c0e836439f1d3910d559d670f6b2c38c
! remove notification at chat
www.youtube.com##+js(set, window.ytInitialData.contents.liveChatRenderer.actionPanel.liveChatMessageInputRenderer.onInitialFocusCommand, undefined)
www.youtube.com##+js(set, window.ytInitialData.continuationContents.liveChatContinuation.actionPanel.liveChatMessageInputRenderer.onInitialFocusCommand, undefined)
! remove unicode emoji pickers
www.youtube.com###categories > yt-emoji-picker-category-renderer:nth-child(n+3)
! remove emoji picker search panel
@zwpp
zwpp / anti_spam.rb
Last active October 15, 2016 14:55
require 'net/http'
require 'uri'
require 'zbar'
require 'mini_magick'
require 'twitter'
SEARCH_KEYWORD = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
ACCESS_TOKEN = ""
@zwpp
zwpp / hide.rb
Last active September 23, 2016 00:51
mikutterで表示されたツイートを非表示にする
Plugin.create(:hide_tweet) do
command(:hide_tweet,
name: '隠す',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
Plugin.call(:destroyed, opt.messages)
end
end
/*
* Sample of "Sieve of Eratosthenes".
* Require:C++14
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
int main()
#include <iostream>
#include <functional>
#include <algorithm>
//#include <array>
//#include <vector>
class Nyan {
public:
std::function<void()> fs[2];
@zwpp
zwpp / gist.rb
Created July 11, 2016 02:46
Rubyで筆記体っぽい文字様記号に置き換えるコード例
#Script symbolsを使ったとき
str1 = str1.tr("A-Za-z", "\u{1D49C}-\u{1D4CF}")
str1 = str1.tr("\u{1D49D}\u{1D4A0}\u{1D4A1}\u{1D4A3}\u{1D4A4}\u{1D4A7}\u{1D4A8}\u{1D4AD}\u{1D4BA}\u{1D4BC}\u{1D4C4}",
"\u{212C}\u{2130}\u{2131}\u{210B}\u{2110}\u{2112}\u{2133}\u{211B}\u{212F}\u{210A}\u{2134}")
# Bold script symbolsを使ったとき
str2 = str2.tr("A-Za-z", "\u{1D4D0}-\u{1D503}")
@zwpp
zwpp / ev3transport.rb
Created May 25, 2016 14:54
This can send EV3RT application with less effort.
#!/usr/bin/env ruby
EV3MAC = '00:00:00:00:00:00'.freeze # Replace with appropriate MAC Address.
RFCOMM = '/dev/rfcomm0'.freeze
require 'open3'
module Ev3
class << Ev3
def connected?
File.exist?(RFCOMM)
# -*- coding: utf-8 -*-
Plugin.create(:anti_url) do
command(:anti_url_command,
name: 'URL化を回避する',
condition: lambda{ |opt| true },
visible: true,
role: :postbox) do |opt|
# postboxからメッセジ拾う
message = Plugin[:gtk].widgetof(opt.widget).widget_post.buffer.text
zzzzd = %w(ズン ズン ズン ズン ドコ)
zd = zzzzd.uniq
out = []
until out == zzzzd
out.shift
puts out[zzzzd.length-1] = zd.sample
end
puts 'kys'