Skip to content

Instantly share code, notes, and snippets.

View ursm's full-sized avatar

Keita Urashima ursm

View GitHub Profile
@ursm
ursm / len0073.patch
Last active January 16, 2022 06:48
Fix TrackPoint / touchpad issue on ThinkPad X1 Carbon 5th (Linux 4.12)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 16c3046..ca912ce 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = {
"LEN0046", /* X250 */
"LEN004a", /* W541 */
"LEN200f", /* T450s */
+ "LEN0073", /* X1 Carbon 5 (Elantech) */
NULL
@ursm
ursm / spec-runner.rb
Last active November 24, 2021 20:17
typeprof -v spec-runner.rb -- spec/**/*.rb
require 'rspec/core'
RSpec::Core::Runner.run ARGV.drop_while { _1 != '--' }.drop(1)
diff --git a/ecleankernel/layout/blspec.py b/ecleankernel/layout/blspec.py
index 7dcfdab..9b42c7b 100644
--- a/ecleankernel/layout/blspec.py
+++ b/ecleankernel/layout/blspec.py
@@ -46,6 +46,9 @@ class BlSpecLayout(ModuleDirLayout):
self.bootdir = root / d / machine_id
if self.bootdir.is_dir():
return
+ self.bootdir = root / d / 'Default'
+ if self.bootdir.is_dir():
ACTION=="add", ENV{ID_INPUT_KEYBOARD}=="1", ENV{DEVPATH}!="/devices/virtual/input/*", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/devices/virtual/input/%k", RUN+="/bin/systemctl --no-block start oneshot-modifier@%k.service"
app-admin/ansible
app-admin/eclean-kernel
app-admin/pwgen
app-admin/rcm
app-admin/sudo
app-editors/gedit
app-editors/vim
app-emulation/docker
app-emulation/docker-compose
app-emulation/libvirt
diff --git a/Kconfig b/Kconfig
index dd77615..a9b2380 100644
--- a/Kconfig
+++ b/Kconfig
@@ -9,5 +9,6 @@ config SRCARCH
option env="SRCARCH"
source "distro/Kconfig"
+source "Kconfig.custom"
module ToUTF16LEBom
BOM = "\uFEFF".encode('UTF-16LE')
refine String do
def to_utf16le_bom
encode('UTF-16LE').prepend(BOM)
end
end
end
some_block_begin
let var1,
var2;
some_block_end
%foo
%bar= i
@ursm
ursm / map.rb
Created October 14, 2016 10:53
_ = (0..1000000).to_a.map {|i| i * 2 }
# _ = (0..1000000).to_a.map! {|i| i * 2 }
puts File.read("/proc/#{Process.pid}/status").lines.grep(/^VmHWM:/)
# map => VmHWM: 25408 kB
# map! => VmHWM: 17544 kB