Skip to content

Instantly share code, notes, and snippets.

View iberianpig's full-sized avatar

Kohei Yamada iberianpig

View GitHub Profile
@brianjbayer
brianjbayer / gist-unlocking-the-secrets-of-rails-secrets-and-credentials.md
Last active April 8, 2025 10:05
A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base

Unlocking the Secrets of Rails Secrets and Credentials

Interurban Tunnel at Blackhand Gorge- Brian J Bayer


If you are like many (most?) of us, you have encountered Rails Credentials/Secrets and secret_key_base and may have been left a bit (or more) confused.

This post is an attempt to remove some of that confusion by

@crispyricepc
crispyricepc / install-instructions.md
Last active February 21, 2025 02:03
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@iberianpig
iberianpig / change_finger_count.sh
Last active December 11, 2024 06:35
Change finger count for default gestures in Gnome Wayland (require login/logout after executing this script.)
function gnome-wayland-change-finger-count() {
local finger_count=$1
case "${finger_count}" in
3|4|5)
echo "changing finger count to ${finger_count}"
# check if the file we want to customize is in the gresource list
if gresource list /usr/lib/gnome-shell/libgnome-shell.so | grep -q 'swipetracker.js'; then
# create a folder to hold your custom overlays
mkdir -p ~/.gnome-shell-custom-overlays/ui
@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 April 6, 2025 14: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