Skip to content

Instantly share code, notes, and snippets.

View WhiteCat6142's full-sized avatar
:octocat:

K.O. WhiteCat6142

:octocat:
  • Titech->U-Tokyo (master)
  • Tokyo,Japan
View GitHub Profile
/*
MIT License
Copyright (c) 2024 WhiteCat6142
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@WhiteCat6142
WhiteCat6142 / Nostr-autoComplete.html
Last active July 16, 2023 03:48
Nostr-autoComplete
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Nostr補完</title>
<link rel="stylesheet"
#!/usr/bin/env python
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk
from gi.repository import WebKit2
from gi.repository import GLib
# https://stackoverflow.com/questions/42174933/python-web-browser-disable-javascript
# Python Web Browser: Disable Javascript? - Stack Overflow
# https://wiki.gnome.org/Projects/Vala/WebKitSample
#!/usr/bin/python
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
Notify.init ("Hello world")
Hello = Notify.Notification.new ("Hello world","This is an example notification.","dialog-information")
Hello.show ()
# https://ideone.com/BLQ2FM
# https://blog.tmtms.net/entry/2015/12/07/mime-header-encoding
# https://docs.python.org/ja/3/library/email.message.html
from email.message import Message
from email.header import Header
msg = Message()
h = Header('MIMEヘッダエンコーディングは複雑すぎてつらい', 'utf-8',77,'Subject')
msg['Subject'] = h.encode()
print(msg.as_string())
EARLYOOM_ARGS="-r 0 -m 7,1 -s 10 --prefer '^(Web Content|Isolated Web Co)$' --avoid '^(firefox|dnf|packagekitd|gnome-shell|gnome-session-c|gnome-session-b|lightdm|sddm|sddm-helper|gdm|gdm-wayland-ses|gdm-session-wor|gdm-x-session|Xorg|Xwayland|systemd|systemd-logind|dbus-daemon|dbus-broker|cinnamon|cinnamon-sessio|kwin_x11|kwin_wayland|plasmashell|ksmserver|plasma_session|startplasma-way|xfce4-session|mate-session|marco|lxqt-session|openbox)$'"
# https://sw.kovidgoyal.net/kitty/conf/
background #464646
font_size 14.0
font_family Ubuntu Mono
Nimbus Mono PS Bold
map f4 close_window_with_confirmation
touch_scroll_multiplier 12.0
hide_window_decorations no
linux_display_server X11
@WhiteCat6142
WhiteCat6142 / daemon.conf
Last active April 27, 2023 09:41
My PulseAudio config (Archives)
nice-level = -15
resample-method = speex-float-7
default-sample-format = s32le
default-sample-rate = 96000
default-sample-channels = 2
default-fragments = 6
default-fragment-size-msec = 16
# in Tokyo, sync <1ms
# server jp.pool.ntp.org iburst
# server time.cloudflare.com iburst
server ntp.nict.jp iburst
# NICT
server s2csntp.miz.nao.ac.jp minpoll 5 asymmetry +0.21 offset 0.0042 burst
# mizusawa tenmondai