Skip to content

Instantly share code, notes, and snippets.

@orumin
orumin / rotate.patch
Created February 2, 2014 06:18
support rotate patch for SLiM DisplayManeger
diff -Nur slim-1.3.6.orig/cfg.cpp slim-1.3.6/cfg.cpp
--- slim-1.3.6.orig/cfg.cpp 2014-02-02 15:13:01.434729372 +0900
+++ slim-1.3.6/cfg.cpp 2014-02-02 15:11:59.447111335 +0900
@@ -32,6 +32,7 @@
options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
options.insert(option("default_xserver","/usr/bin/X"));
options.insert(option("xserver_arguments",""));
+ options.insert(option("xrotate",""));
options.insert(option("numlock",""));
options.insert(option("daemon",""));
@orumin
orumin / descript
Created March 17, 2014 04:50
how to rebuild kernel on Arch
$ sudo pacman -S base-devel abs
$ sudo abs
$ cp -r /var/abs/core/linux ./
$ cd linux
$ vim PKGBUILD
->ここでPKGBUILD内の#make menuconfigとコメントされているところを#を削除しコメントアウト、保存
$ makepkg -si
->PKGBUILDに従いビルド&パッケージ作成までする。-sオプションはビルドに足りないパッケージをpacmanでインストールするようにする
-iオプションは、作成されたパッケージを自動でインストール(インストール直前にパスワード要求)
*注意*: makepkgは基本的にrootでは行わない
@orumin
orumin / rpi.patch
Created May 29, 2014 04:25
different with linux-3.12 and linux-rpi-3.12.y
This file has been truncated, but you can view the full file.
diff -Nur linux/arch/alpha/lib/csum_partial_copy.c rpi/arch/alpha/lib/csum_partial_copy.c
--- linux/arch/alpha/lib/csum_partial_copy.c 2014-05-29 12:18:16.434566267 +0900
+++ rpi/arch/alpha/lib/csum_partial_copy.c 2014-05-29 11:49:03.587970317 +0900
@@ -378,6 +378,11 @@
__wsum
csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
{
- return csum_partial_copy_from_user((__force const void __user *)src,
- dst, len, sum, NULL);
+ __wsum checksum;
@orumin
orumin / tapeboot.ini
Created June 5, 2014 15:02
boot UNIXv6 tape image on SIMH
set cpu 11/40
set tm0 locked
attach tm0 dist.tap
attach rk0 rk0
attach rk1 rk1
attach rk2 rk2
d cpu 100000 012700
d cpu 100002 172526
d cpu 100004 010040
d cpu 100006 012740
d 100000 012700
d 100002 177414
d 100004 005040
d 100006 005040
d 100010 010040
d 100012 012740
d 100014 000005
d 100016 105610
d 100020 002376
d 100022 005007
set cpu 11/40
set tto 7b
set tm0 locked
attach tm0 dist.tap
attach rk0 rk0
attach rk1 rk1
attach rk2 rk2
dep system sr 173030
boot rk0
set cpu 11/40
set cpu idle
set tto 7b
set tm0 locked
attach rk0 rk0
attach rk1 rk1
attach rk2 rk2
attach lpt printer.txt
set dci en
set dci lines=8
@orumin
orumin / Yo_reply.rb
Created June 24, 2014 08:58
YoみえたらYoするやつ
# -*- coding: utf-8 -*-
Plugin.create :Yo_reply do
on_appear do | ms |
ms.each do | m |
if m.message.to_s = ~ /Yo/
Service.primary.post(:message => "#{"@" + m.user.idname + "Yo"}", :replyto => m)
end
end
end
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.15.1-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@orumin
orumin / test.sh
Created July 6, 2014 16:01
2つ前のcommit消してremoteだけに変更を反映させた上で手元の変更は元に戻すやつ
git format-patch -1 HEAD~~ -o patch #2つ前のコミットからHEADまでをpatch/にpatchとして置く
git rebase -i HEAD~~~
#表示された中から要らないcommitの行を削除
git push -f #remoteにpush
git reset --hard HEAD~~ 消したコミットの直前まで戻る
git am patch/*.patch #patchを適用 & commit
#おわり