Skip to content

Instantly share code, notes, and snippets.

@waltarix
waltarix / httpstatus.zsh
Created February 24, 2013 09:20
implementation of httpstatus in zsh
function httpstatus {
local -A statuscode
statuscode=(
100 'Continue'
101 'Switching Protocols'
102 'Processing' # RFC 2518 (WebDAV)
200 'OK'
201 'Created'
202 'Accepted'
203 'Non-Authoritative Information'
@waltarix
waltarix / use-mouse-in-screen.patch
Created May 23, 2012 09:48
w3m: Use mouse in TERM=screen*
diff --git a/terms.c b/terms.c
index 7a3c987..6542d9f 100644
--- a/terms.c
+++ b/terms.c
@@ -494,7 +494,7 @@ static struct w3m_term_info {
{W3M_TERM_INFO("rxvt", XTERM_TITLE, (NEED_XTERM_ON|NEED_XTERM_OFF))},
{W3M_TERM_INFO("Eterm", XTERM_TITLE, (NEED_XTERM_ON|NEED_XTERM_OFF))},
{W3M_TERM_INFO("mlterm", XTERM_TITLE, (NEED_XTERM_ON|NEED_XTERM_OFF))},
- {W3M_TERM_INFO("screen", SCREEN_TITLE, 0)},
+ {W3M_TERM_INFO("screen", SCREEN_TITLE, (NEED_XTERM_ON|NEED_XTERM_OFF))},
@waltarix
waltarix / hahhah.patch
Created April 11, 2012 09:10
PowerLine meets HahHah
diff --git a/autoload/Powerline/Colorschemes/default.vim b/autoload/Powerline/Colorschemes/default.vim
index eacf147..a271f39 100644
--- a/autoload/Powerline/Colorschemes/default.vim
+++ b/autoload/Powerline/Colorschemes/default.vim
@@ -84,7 +84,7 @@ let g:Powerline#Colorschemes#default#colorscheme = Pl#Colorscheme#Init([
\ 'i': ['brightestred', ['bold']],
\ }),
\
- \ Pl#Hi#Segments(['current_function', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
+ \ Pl#Hi#Segments(['current_function', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup', 'hahhah'], {
@waltarix
waltarix / fix-build-with-apache24.patch
Created March 27, 2012 08:48
subversion: Fix building issue with Apache 2.4
--- a/subversion/mod_dav_svn/util.c 2012-02-03 01:13:30.000000000 +0900
+++ b/subversion/mod_dav_svn/util.c 2012-03-27 16:30:43.806155945 +0900
@@ -627,8 +627,8 @@
if (errscan->desc == NULL)
continue;
- if (errscan->save_errno != 0) {
- errno = errscan->save_errno;
+ if (errscan->aprerr != 0) {
+ errno = errscan->aprerr;
@waltarix
waltarix / htop-fix-curses-location.patch
Created March 23, 2012 09:15
htop: Fix "curses.h" location.
diff --git a/CPUMeter.c b/CPUMeter.c
index 90555ff..b6afea6 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -12,7 +12,7 @@ in the source distribution for its full text.
#include <assert.h>
#include <stdlib.h>
-#include <curses.h>
+#include <ncursesw/curses.h>
@waltarix
waltarix / konsole_cjk_width.patch
Created March 23, 2012 02:29
konsole: Fix Ambiguous-width CJK treating problem.
diff --git a/src/konsole_wcwidth.cpp b/src/konsole_wcwidth.cpp
index 8613632..fcb8076 100644
--- a/src/konsole_wcwidth.cpp
+++ b/src/konsole_wcwidth.cpp
@@ -35,6 +35,12 @@ static int bisearch(quint16 ucs, const struct interval *table, int max) {
}
+int konsole_wcwidth(quint16 ucs)
+{
@waltarix
waltarix / nekoken-mingwpack-fix-uri.patch
Created March 9, 2012 02:18
Fix URI for Nekoken's MinGW pack.
diff --git a/_felidlabo/list/mingw.txt b/_felidlabo/list/mingw.txt
index fc2c757..c6fdb24 100644
--- a/_felidlabo/list/mingw.txt
+++ b/_felidlabo/list/mingw.txt
@@ -3,33 +3,33 @@
# GCC
http://jaist.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%204.5%20series/4.5.2-tdm-1%20SJLJ/gcc-4.5.2-tdm-1-core.tar.lzma gcc-4.5.2-tdm-1-core.tar.lzma _felidlabo\gcc\gcc-4.5.2-tdm-1
http://jaist.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%204.5%20series/4.5.2-tdm-1%20SJLJ/gcc-4.5.2-tdm-1-c++.tar.lzma gcc-4.5.2-tdm-1-c++.tar.lzma _felidlabo\gcc\gcc-4.5.2-tdm-1
-#http://jaist.dl.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version3/Current%20Release_%20gcc-3.4.5-20060117-3/gcc-core-3.4.5-20060117-3.tar.gz gcc-core-3.4.5-20060117-3.tar.gz _felidlabo\gcc\gcc-3.4.5-20060117-3
-#http://jaist.dl.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version3/Current%20Release_%20gcc-3.4.5-20060117-3/gcc-g++-3.4.5-20060117-3.tar.gz gcc-g++-3.4.5-20060117-3.tar.gz _felidlabo\gcc\gcc-3.4.5-20060117-3
@waltarix
waltarix / bonnie.patch
Created February 23, 2012 08:41
bonnie++: Fix MinTime
diff --git a/bonnie.h b/bonnie.h
index dea2c12..38d69c2 100644
--- a/bonnie.h
+++ b/bonnie.h
@@ -22,7 +22,7 @@ typedef FILE *PFILE;
// data includes index to which directory (6 bytes) and terminating '\0' for
// the name and pointer to file name
#define MaxDataPerFile (MaxNameLen + 6 + 1 + sizeof(void *))
-#define MinTime (0.5)
+#define MinTime (0.01)
@waltarix
waltarix / danbooru.patch
Created February 9, 2012 08:30
danbooru: for local
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..645da62
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,16 @@
+source 'http://rubygems.org'
+
+gem 'rails', '2.3.14'
+
@waltarix
waltarix / google-ssl.xml
Created December 9, 2011 06:11
Firefox: Google(SSL) search plugin.
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Google SSL</os:ShortName>
<os:Description>Google SSL</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKMWlDQ1BJQ0MgUHJvZmlsZQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOI