Skip to content

Instantly share code, notes, and snippets.

View iberianpig's full-sized avatar

Kohei Yamada iberianpig

View GitHub Profile
@greymd
greymd / teip2.md
Last active May 30, 2023 16:10
teip v2.0 でヤバい機能がついた件

teip v2.0 でヤバい機能がついた件

teip コマンド に関するお話

まとめ

  1. teip v2.0 に新機能:マッチオフロード機能
  • テープの穴をあける行の指定に外部コマンドが使えるようになった
  1. あるコマンドの抽出範囲のみを、範囲外は残したまま、別のコマンドで編集可能になる

WaylandとPipeWireとEasyEffectsでノイズ除去する

Linux のノイズ除去まわりメモ の Wayland 版。Wayland の場合画面共有とかの都合上 PipeWire を使っているだろうから、それを前提にする。試してないけど X11 + PipeWire でも同じ設定で動きそうではある。

音声フィルタには EasyEffectslibrnnoise を使う。PipeWire でも一部の PulseAudio のフィルタは使えるけど、EasyEffects の方が色々できて良さそう。また、NoiseTorch とかより素性よさそう (個人の感想)。また、普通に GUI から設定できるので、画面ポチポチしてるだけもわりと何とか使えそう。

2022-04-22 追記

原因はよく分からないけど、再起動した後とか EasyEffects の Souce と各アプリがうまく繋がってくれない事がままあって、ノイズ除去に EasyEffects を使うのはやめた。PipeWire#音声のポストプロセッシング - ArchWiki に従って、NoiseTorch か Noise suppression for voice を使うのが良いと思う。実際 Noise suppression for voice を使うようにしたらわりと安定した (気がする)

@palkan
palkan / README.md
Created January 24, 2022 13:29
Rails boot time profiling

Add the following to application.rb:

$icallbacks = []
$icallbacks.define_singleton_method(:print) do
  puts sort_by { |(a, b)| -b }.map { |(a, b)| "#{b}\t\t#{a}" }.join("\n")
end

ActiveSupport::Notifications.subscribe("load_config_initializer.railties") do |event|
 $icallbacks << [event.payload[:initializer], event.duration]
package main
import (
"fmt"
"log"
"time"
"github.com/zserge/hid"
)
@eloylp
eloylp / Fedora35Hibernation.md
Last active March 25, 2024 15:47
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
@tm9k1
tm9k1 / gestures_support_linux.md
Last active February 25, 2024 10:56
(AUR) Gestures for any DE (especially KDE Plasma)

Gestures support for any DE

  1. Install Gestures support
yay -S libinput-gestures gestures
  1. Set up autostart for gestures
libinput-gestures-setup autostart
  1. Add our current user to the input group
@buzztaiki
buzztaiki / ld_preload_gnome_shell_linux_kernel_capability.md
Created March 25, 2021 08:04
LD_PRELOAD と Gnome Shell と Linux Kernel Capability

環境変数 LD_PRELOADLD_LIBRARY_PATH を設定した状態で gnome-shell を起動しても gnome-shell やその子供達には引き継がれないよという話。

はまったので雑にメモ。

きっかけ

https://github.com/lincheney/fzf-tab-completion を常に readline から使いたくて ~/pam_environment に LD_PRELOAD を書いたのだけど以下の状態になった。

  • 黒いコンソールでは使える
  • Openbox では使える
  • Gnome-Shell では LD_PRELOAD が消えている。
@willnet
willnet / rails_6_1_new_features.md
Last active October 13, 2023 01:10
「Rails 6.1で新しく入る機能について」iCARE Dev Meetup #12 の登壇内容 https://icare.connpass.com/event/183716/

Rails 6.1で新しく入る機能について

@willnet

最近のRailsリリース日

  • 6.0.0 (2019/08/06)
  • 5.2.0 (2018/04/09)
  • 5.1.0 (2017/04/27)
  • 5.0.0 (2016/06/30)
@nevans
nevans / verify_and_decrypt_session_cookie.rb
Last active June 12, 2023 03:36
Rails 5.2.4: verifying and decrypting session cookies, to be used from rails console or in a script with the rails application loaded