Skip to content

Instantly share code, notes, and snippets.

View uobikiemukot's full-sized avatar
😇
rest in peace

uobikiemukot uobikiemukot

😇
rest in peace
View GitHub Profile
@uobikiemukot
uobikiemukot / conf.h
Created March 3, 2015 02:14
solarized color theme for yaft part2
/* See LICENSE for licence details. */
/* conf.h: define custom variables */
/* color: index number of color_palette[] (see color.h) */
enum {
/*
DEFAULT_FG = 7,
DEFAULT_BG = 0,
ACTIVE_CURSOR_COLOR = 2,
PASSIVE_CURSOR_COLOR = 1,
@uobikiemukot
uobikiemukot / color.h
Last active August 29, 2015 14:16
solarized color theme for yaft part1
/* See LICENSE for licence details. */
/*
Standard VGA colors
http://en.wikipedia.org/wiki/ANSI_escape_code
xterm 256color
http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
http://pln.jonas.me/xterm-colors
byte order: (MSB) RR GG BB (LSB)
@uobikiemukot
uobikiemukot / libsixel_normalize_bitfield.patch
Last active August 29, 2015 14:07
support variable color bitfield
commit 956bd5e8ddc913ad69ccc878eb0c321ca23ae4b5
Author: uobikiemukot <uobikiemukot@gmail.com>
Date: Mon Oct 6 23:26:31 2014 +0900
add sixel_normalize_bitfield()
diff --git a/include/sixel.h.in b/include/sixel.h.in
index 1ad4c62..73f648c 100644
--- a/include/sixel.h.in
+++ b/include/sixel.h.in
@uobikiemukot
uobikiemukot / libsixel_normalize_depth.patch
Created October 6, 2014 11:49
support image 1/2 byte pel pixel image(grayscale (+ alpha)) and 4 bytes per pixel image (rgb + alpha)
diff --git a/src/dither.c b/src/dither.c
index 4f777e2..5ac4eeb 100644
--- a/src/dither.c
+++ b/src/dither.c
@@ -218,24 +218,64 @@ sixel_dither_get(int builtin_dither)
}
+void
+sixel_normalize_depth(unsigned char *dst, unsigned char *src, int width, int height, int depth)
@uobikiemukot
uobikiemukot / w3mimg-sixel-ranger.patch
Created September 26, 2014 16:43
patch of w3mimg-sixel for ranger (python filer)
--- w3mimg-sixel.c 2014-09-27 01:40:27.170056012 +0900
+++ w3mimg-sixel-ranger.c 2014-09-27 01:39:20.273542229 +0900
@@ -140,7 +140,8 @@
return;
}
img->already_drew = false;
- } else if (!img->already_drew) { /* op == W3M_REDRAW */
+ }
+ if (!img->already_drew) { /* op == W3M_REDRAW */
struct image new = *img;
@uobikiemukot
uobikiemukot / w3m-sixel.patch
Last active August 29, 2015 14:06
sixel inline image patch for w3m-0.5.3
--- terms.c.orig 2014-09-23 21:36:24.992432936 +0900
+++ terms.c 2014-09-23 21:51:16.598842197 +0900
@@ -463,6 +463,80 @@
#define MOVE(line,column) writestr(tgoto(T_cm,column,line));
+int output_sixel_fp(char *file, int x, int y)
+{
+ int length;
+ long size, rsize, count = 0;
@uobikiemukot
uobikiemukot / img2sixel.dump
Created September 22, 2014 13:18
img2sixel backtrace
$ img2sixel potaan_o_.png
*** Error in `img2sixel': double free or corruption (!prev): 0x0000000001ec1260 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x7b497)[0x7f9a21056497]
/usr/lib/libc.so.6(+0x828b9)[0x7f9a2105d8b9]
/usr/lib/libc.so.6(cfree+0x4c)[0x7f9a21061c9c]
img2sixel[0x40d61f]
img2sixel[0x4145f2]
img2sixel[0x419a8f]
img2sixel[0x402b71]
@uobikiemukot
uobikiemukot / yaft_vga16.patch
Created August 16, 2014 02:07
yaft: patch for vga16fb
diff --git a/draw.h b/draw.h
index 541688d..8a9b710 100644
--- a/draw.h
+++ b/draw.h
@@ -1,24 +1,11 @@
/* See LICENSE for licence details. */
-static inline void draw_sixel(struct framebuffer *fb, int line, int col, uint8_t *pixmap)
-{
- int h, w, src_offset, dst_offset;
- uint32_t pixel, color = 0;
@uobikiemukot
uobikiemukot / f2fs_skip_opts.patch
Created August 16, 2014 01:33
archlinux/f2fs-tools patch: skip some options specified in /usr/lib/initcpio/init_functions:200
--- fsck/main.c.orig 2014-08-16 09:58:09.660037897 +0900
+++ fsck/main.c 2014-08-16 09:58:13.410033740 +0900
@@ -42,7 +42,8 @@
char *prog = basename(argv[0]);
if (!strcmp("fsck.f2fs", prog)) {
- const char *option_string = "d:t";
+ //const char *option_string = "d:t";
+ const char *option_string = "d:tTaC:f";
@uobikiemukot
uobikiemukot / config.go.patch
Last active August 29, 2015 14:04
support bold background color to peco (https://github.com/peco/peco)
--- config.go.orig 2014-07-21 15:25:16.623568026 +0900
+++ config.go 2014-07-21 15:34:48.431977514 +0900
@@ -76,11 +76,14 @@
"on_cyan": termbox.ColorCyan,
"on_white": termbox.ColorWhite,
}
- stringToAttr = map[string]termbox.Attribute{
+ stringToFgAttr = map[string]termbox.Attribute{
"bold": termbox.AttrBold,
"underline": termbox.AttrUnderline,