Skip to content

Instantly share code, notes, and snippets.

View iberianpig's full-sized avatar

Kohei Yamada iberianpig

View GitHub Profile
@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 December 2, 2024 09:46
「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 November 22, 2024 13:40
Rails 5.2.4: verifying and decrypting session cookies, to be used from rails console or in a script with the rails application loaded
@rbreaves
rbreaves / WaylandUbuntu19.10-AppTitle
Last active October 10, 2024 09:00
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x
# Escaped so you can copy and paste into terminal directly
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2
# Unescaped version, will not run
# Broken down into 2 commands.
# Call to Gnome to get the array location of the active Application
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \
require 'pathname'
require 'fileutils'
LOG_PATH = Pathname('/tmp/vimbench.log')
RE = /(\d+\.\d+)\s*\d+\.\d+:\s*--- N?VIM STARTED ---/
N = 10
def prepare
FileUtils.rm LOG_PATH if LOG_PATH.exist?
@voluntas
voluntas / loadtest.rst
Last active April 4, 2025 05:26
負荷試験コトハジメ
@Samffy
Samffy / xps13.md
Last active October 31, 2024 16:13
Dell XPS 13 9360 : Ubuntu Wifi disconnection

I encounter wifi disonnection problem on a Dell XPS 13 9360. Here is the solution I used to fix this bad behavior.

Which wifi card version is installed ?

lspci | grep -i net

3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

@kazuho
kazuho / git-blame-pr.pl
Last active June 28, 2022 07:15
git-blame by PR #
#! /usr/bin/perl
#
# Written in 2017 by Kazuho Oku
#
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
#
use strict;
use warnings;
@Showfom
Showfom / Analyticus
Created September 10, 2017 12:47
InstantClick with Google Analytic Integration
// Google Analytic
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-54138102-1', 'auto');
ga('send', 'pageview');
// Disqus Comment
var disqus_shortname = "riespandi";
@phansch
phansch / yardoc_cheatsheet.md
Last active April 22, 2025 12:15 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet