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 / gist:3913379
Created October 18, 2012 17:11
mlterm-PKGBUILD
# Maintainer: haru <uobikiemukot at gmail dot com>
pkgname=mlterm-fb
_pkgname=mlterm
pkgver=3.1.5
pkgrel=1
pkgdesc="Multi Lingual TERMinal emulator on X"
arch=('i686' 'x86_64')
url="http://mlterm.hg.sourceforge.net/hgweb/mlterm/mlterm/"
license=('MIT')
depends=('libx11' 'fribidi' 'gdk-pixbuf')
@uobikiemukot
uobikiemukot / descramble.c
Created October 26, 2012 13:38
descramble kindle firmware
#include <stdio.h>
#include <stdlib.h>
enum {
BITS_PER_BYTE = 8,
TYPE_AUTO = 1,
TYPE_MANUAL = 2,
};
int swap_byte(int byte)
@uobikiemukot
uobikiemukot / color.h
Created November 1, 2012 16:25
solarized for yaft
/* See LICENSE for licence details. */
/*
Standard VGA colors
http://en.wikipedia.org/wiki/ANSI_escape_code
*/
const struct color_t color_list[COLORS] = {
/* system color: 16
{0x00, 0x00, 0x00}, {0xAA, 0x00, 0x00}, {0x00, 0xAA, 0x00}, {0xAA, 0x55, 0x00},
{0x00, 0x00, 0xAA}, {0xAA, 0x00, 0xAA}, {0x00, 0xAA, 0xAA}, {0xAA, 0xAA, 0xAA},
{0x55, 0x55, 0x55}, {0xFF, 0x55, 0x55}, {0x55, 0xFF, 0x55}, {0xFF, 0xFF, 0x55},
@uobikiemukot
uobikiemukot / mkarchiso.sh
Created November 18, 2012 05:27
append some files to Archlinux LiveCD
#!/bin/bash
# usage: ./mkarchiso.sh ISO_IMAGE
YAFT_32=~haru/yaft/yaft_32
YAFT_64=~haru/yaft/yaft_64
TERMINFO=~haru/yaft/info/yaft.src
KEYMAP=~haru/tmp/special/us-fix.map.gz
ISO=$1
@uobikiemukot
uobikiemukot / fav.patch
Created April 12, 2013 12:22
bitlbee 3.2 - favorite patch
--- protocols/twitter/twitter.c.orig 2013-04-12 20:33:58.236098274 +0900
+++ protocols/twitter/twitter.c 2013-04-12 20:34:09.505347769 +0900
@@ -615,7 +615,7 @@
twitter_log(ic, "Could not undo last action");
goto eof;
- } else if (g_strcasecmp(cmd[0], "favourite") == 0 && cmd[1]) {
+ } else if (g_strcasecmp(cmd[0], "fav") == 0 && cmd[1]) {
if ((id = twitter_message_id_from_command_arg(ic, cmd[1], NULL))) {
twitter_favourite_tweet(ic, id);
@uobikiemukot
uobikiemukot / framebuffer.h
Created July 10, 2013 07:19
framebuffer drawing library
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <linux/fb.h>
enum {
@uobikiemukot
uobikiemukot / kik_str.patch
Created April 24, 2014 05:27
mlterm-3.3.4 patch
--- kiklib/src/kik_str.c.orig 2014-04-24 14:08:29.656026948 +0900
+++ kiklib/src/kik_str.c 2014-04-24 14:07:43.530258598 +0900
@@ -130,6 +130,11 @@
return strcpy( dst , src) ;
}
+char *kik_str_alloca_dup(const char *src)
+{
+ return __kik_str_copy(alloca(strlen(src) + 1), src);
+}
@uobikiemukot
uobikiemukot / drm_test.c
Last active April 14, 2024 12:19
dirty and small example of libdrm
/* please refer better example: https://github.com/dvdhrm/docs/tree/master/drm-howto/ */
#define _XOPEN_SOURCE 600
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <xf86drm.h>
@uobikiemukot
uobikiemukot / idump.c
Last active August 29, 2015 14:01
broken image viewer for linux framebuffer
#define _XOPEN_SOURCE 600
#include <errno.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <stimg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@uobikiemukot
uobikiemukot / 16palette.sixel
Last active August 29, 2015 14:02
show default 16 color palette of sixel
Pq"1;1;128;36
#0!16~#1!16~#2!16~#3!16~#4!16~#5!16~#6!16~#7!16~$-
#0!16~#1!16~#2!16~#3!16~#4!16~#5!16~#6!16~#7!16~$-
#0!16~#1!16~#2!16~#3!16~#4!16~#5!16~#6!16~#7!16~$-
#8!16~#9!16~#10!16~#11!16~#12!16~#13!16~#14!16~#15!16~$-
#8!16~#9!16~#10!16~#11!16~#12!16~#13!16~#14!16~#15!16~$-
#8!16~#9!16~#10!16~#11!16~#12!16~#13!16~#14!16~#15!16~$-
\