Skip to content

Instantly share code, notes, and snippets.

@iori-yja
iori-yja / mikutter-ruby2.0.howto
Last active December 15, 2015 09:59
mikutter (http://mikutter.hachune.net/) won't work after update of Ruby to 2.0 on Arch linux (or others), then update libraries with gem. For specific, read this article.
Mikutter, the moest twitter client wasn't launched with such error after I updated my Arch repositories.
11:32% ruby mikutter.rb
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': /usr/lib/ruby/vendor_ruby/2.0.0/x86_64-linux/pango.so: undefined symbol: rb_cCairo_Context - /usr/lib/ruby/vendor_ruby/2.0.0/x86_64-linux/pango.so (LoadError)
from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/lib/ruby/vendor_ruby/2.0.0/pango.rb:28:in `rescue in <top (required)>'
from /usr/lib/ruby/vendor_ruby/2.0.0/pango.rb:24:in `<top (required)>'
:
:
:
:
@iori-yja
iori-yja / svn diff of common.c
Created December 25, 2012 18:00
Solution of https://gist.github.com/4374324. It could happen to make it compiled with more strict option. This svn diff was taken under src/lib.
Index: libfetch/common.c
===================================================================
--- libfetch/common.c (revision 244684)
+++ libfetch/common.c (working copy)
@@ -327,6 +327,8 @@
#ifdef WITH_SSL
int ret, ssl_err;
+ SSL_METHOD*meth;
+
bind-key z run pane-maximize
メロスは激怒した。必ず、かの邪智暴虐のRISCを除かなければならぬと決意した。
メロスには論理回路がわからぬ。メロスは理論数学の村人である。mapを作り、集合論と遊んで暮してきた。
けれども直交性に対しては、人一倍に敏感であった。
きょう未明メロスは村を出発し、野を越え山越え、十里はなれた此のDECの市にやって来た。
メロスにはMIPSも、SPARCも無い。Alphaも無い。十一の、内気なPDPと二人暮しだ。
このPDPは、村の或る律気な一Unixを、近々、OSとして迎える事になっていた。
インストールも間近かなのである。メロスは、それゆえ、PDP-11のフロントパネルやらプログラムのカードやらを買いに、
はるばる市にやって来たのだ。
先ず、その品々を買い集め、それから都のプログラムリストをぐだぐだ眺めた。
@iori-yja
iori-yja / xmonad.hs
Created May 21, 2012 15:46
xmonad.hs
{- xmonad.hs
- Author: Jelle van der Waa ( jelly12gen ) and iori-yja
-}
-- Import stuff
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import XMonad.Util.EZConfig(additionalKeysP,additionalKeys)
import System.Exit
#!/bin/zsh
datetime=`date "+%y-%m-%d_%H:%M:%S"`
basedir=~/coinssnap/$datetime
mkdir $basedir
for p in acacia burnet cosmos ; do
for i in {1..50} ; do
ssh -o ConnectTimeout=1 $p`printf %02d $i` "coinssnap_sub $basedir 10" &
@iori-yja
iori-yja / arm.vim
Created January 15, 2012 10:53
ARM Assembly syntax hilighting. put on $vim/syntax/
" Vim syntax file
" >Language: MCS-51 intel Mnemonics (armA)
" >Maintainer: Thomas Langewouters <[email protected]>
" Inherit his script: iori yja
" Language: ARMv5-v7 Mnemonics.
" Last Change:
" Vim URL: http://www.vim.org/lang.html
" arm Home: ---
" arm Version: 2.00
@iori-yja
iori-yja / mnemonic.sh
Created January 15, 2012 10:43
Get mnemonics from instruction table.
cat temp|awk '{print $1}'|sed -e 's/(.*)//g'|sed -e s/表//g |sed -e 's/A4.*//' |sed -e s/v4//g |sed -e s/Copyright// |sed -e s/ARM//g |sed -e s/命令//g| sed '/^ *$/d' | tr '\n' ' '>temp
@iori-yja
iori-yja / irq_handler.s
Created January 11, 2012 07:53
IRQ handler for LPC23xx ARM microcontroller
.section .text, "ax"
.arm
IRQ_Handler:
SUB LR, LR, #4 @ Adjust LR_irq and push it
STMFD SP!, {LR}
MRS LR, SPSR @ Save SPSR need to be saved for nested interrupt
STMFD SP!, {R0-R3,IP,LR} @ Push scratch/used registers and SPSR
LDR R0, =LPC_BASE_VIC @ Get the ISR address pointed by VIC_VectAddr
LDR R0, [R0, #VIC_Address]
@iori-yja
iori-yja / installing-ghc7.2-linux.md
Created January 8, 2012 16:58 — forked from beastaugh/installing-ghc7.2-osx10.7.md
Easy install way of ghc7.2 and cabal on linux.

Installing GHC 7.2 on Linux

This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install tool (the two basic things you'll need to do Haskell development) up and running on a new Linux install.

The instructions given here worked for me, but YMMV. My environment is Debian GNU/Linux, sid(unstable).