Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / zsh-ambiguous-width-cjk.patch
Last active December 5, 2015 05:36
zsh: Fix Ambiguous-width CJK treating problem.
diff --git a/Src/compat.c b/Src/compat.c
index 9041c0b..4d2b320 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -860,6 +860,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n)
return width;
}
+#endif /* 0 */
@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 / nacci.php
Created February 25, 2013 06:53
Fibo, Tribo and Tetra nacci number, Lucas number in PHP
<?php
const CALC_LIMIT = 1000;
// fibo
var_dump(implode(', ', nacci(CALC_LIMIT, [0, 1])));
// tribo
var_dump(implode(', ', nacci(CALC_LIMIT, [0, 0, 1])));
@waltarix
waltarix / ssssss.txt
Created March 27, 2013 15:17
ssssssss....
                
                
                
              
@waltarix
waltarix / runemacs.bat
Created February 25, 2013 10:59
emacs launcher for windows
@ECHO OFF
SET HOME=%~dp0
START /B %HOME%/bin/runemacs.exe
@waltarix
waltarix / pandoc-fix-textile-writer-for-redmine.patch
Created October 13, 2016 12:44
pandoc: Fix textile writer for Redmine.
diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs
index 98f9157..8e086e1 100644
--- a/src/Text/Pandoc/Writers/Textile.hs
+++ b/src/Text/Pandoc/Writers/Textile.hs
@@ -40,13 +40,13 @@ import Text.Pandoc.Templates (renderTemplate')
import Text.Pandoc.XML ( escapeStringForXML )
import Data.List ( intercalate )
import Control.Monad.State
-import Data.Char ( isSpace )
@waltarix
waltarix / migemo.c
Created March 4, 2017 05:40
migemo function for sqlite3
/*
* Written by Alexey Tourbin <at@altlinux.org>.
*
* The author has dedicated the code to the public domain. Anyone is free
* to copy, modify, publish, use, compile, sell, or distribute the original
* code, either in source code form or as a compiled binary, for any purpose,
* commercial or non-commercial, and by any means.
*/
#include <assert.h>
#include <stdlib.h>
@waltarix
waltarix / coreutils-ls-utf8mac.patch
Last active January 6, 2018 05:14
coreutils: "ls" learned -M, --normalize-utf8mac options to normalize MacOSX's hfs encoding.
diff --git a/Makefile.in b/Makefile.in
index 60bb1ed..d8cba0d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4609,7 +4609,7 @@ src_logname_LDADD = $(LDADD)
# for cap_get_file
src_ls_LDADD = $(LDADD) $(LIB_SELINUX) $(LIB_SMACK) \
- $(LIB_CLOCK_GETTIME) $(LIB_CAP) $(LIB_HAS_ACL)
+ $(LIB_CLOCK_GETTIME) $(LIB_CAP) $(LIB_HAS_ACL) $(LIBICONV)