Skip to content

Instantly share code, notes, and snippets.

Avatar

Keita Urashima ursm

View GitHub Profile
View 99-oneshot-modifier.rules
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"
View world
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
View docker-config.patch
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"
@ursm
ursm / len0073.patch
Last active Jan 31, 2020
Fix TrackPoint / touchpad issue on ThinkPad X1 Carbon 5th (Linux 4.12)
View len0073.patch
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
View to_utf16_le_bom.rb
module ToUTF16LEBom
BOM = "\uFEFF".encode('UTF-16LE')
refine String do
def to_utf16le_bom
encode('UTF-16LE').prepend(BOM)
end
end
end
View map.rb
_ = (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
View Gemfile
source 'https://rubygems.org'
gem 'pg'
gem 'sequel'
@ursm
ursm / parse_st.rb
Last active Mar 14, 2016 — forked from tfuji/parse_st.rb
INSDC structured comment parser
View parse_st.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'bio'
def parse_st_comment(comment)
comment.scan(/##(.+)-START##\n(.*)\n##\1-END##/m).each_with_object({}) {|(tagset, block), memo|
i = 0
memo[tagset] = block.lines.chunk {|line|
You can’t perform that action at this time.