Skip to content

Instantly share code, notes, and snippets.

Zhihao Yuan lichray

Block or report user

Report or block lichray

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lichray
lichray / mplayer_4.patch
Created Nov 13, 2011
A combined patch to multimedia/mplayer in FreeBSD ports
View mplayer_4.patch
diff -ruN --exclude=CVS /usr/ports/multimedia/mplayer.orig/Makefile /usr/ports/multimedia/mplayer/Makefile
--- /usr/ports/multimedia/mplayer.orig/Makefile 2011-08-21 03:11:55.000000000 -0500
+++ /usr/ports/multimedia/mplayer/Makefile 2011-11-13 06:34:11.657281955 -0600
@@ -7,7 +7,7 @@
PORTNAME= mplayer
PORTVERSION= ${MPLAYER_PORT_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
COMMENT= High performance media player supporting many formats
@lichray
lichray / 13widechar_horrors.dpatch
Created Dec 2, 2011
The Debian way to fix v_increment
View 13widechar_horrors.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run
## 13widechar_horrors.dpatch by <hesso@pool.math.tu-berlin.de>
##
## DP: This patch tries to cope with the fact that widechar support
## DP: in nvi is at best rudimentary.
## DP: Hunk 1)
## DP: * Due to "ch = *t", this code is not wide-char aware, so
## DP: cast the value to a proper type so the KEY_ macros make
## DP: the right choice.
## DP: Hunk 2)
@lichray
lichray / netbsd_r1.4.patch
Created Dec 2, 2011
The NetBSD way to fix v_increment
View netbsd_r1.4.patch
Index: src/dist/nvi/vi/v_increment.c
diff -u src/dist/nvi/vi/v_increment.c:1.3 src/dist/nvi/vi/v_increment.c:1.4
--- src/dist/nvi/vi/v_increment.c:1.3 Sun Jan 18 03:45:50 2009
+++ src/dist/nvi/vi/v_increment.c Tue Aug 11 21:28:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: v_increment.c,v 1.3 2009/01/18 03:45:50 lukem Exp $ */
+/* $NetBSD: v_increment.c,v 1.4 2009/08/11 21:28:02 aymeric Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
View pure_all_in_one_0.51.patch
diff -ruN --exclude=CVS /usr/ports/lang/pure.orig/Makefile /usr/ports/lang/pure/Makefile
--- /usr/ports/lang/pure.orig/Makefile 2012-01-20 14:12:38.000000000 -0600
+++ /usr/ports/lang/pure/Makefile 2012-01-22 14:06:22.574870368 -0600
@@ -2,32 +2,31 @@
# Date created: 2011-03-17
# Whom: Zhihao Yuan <lichray@gmail.com>
#
-# $FreeBSD: ports/lang/pure/Makefile,v 1.3 2012/01/20 20:12:38 brooks Exp $
+# $FreeBSD: ports/lang/pure/Makefile,v 1.2 2011/04/09 19:21:47 makc Exp $
#
@lichray
lichray / pure_new_addons.shar
Created Dec 6, 2011
New ports after pure-0.51
View pure_new_addons.shar
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# pure-mpfr
# pure-mpfr/pkg-descr
# pure-mpfr/distinfo
View fcitx_all_in_one_4.2.0.patch
diff -ruN --exclude=CVS /usr/ports/chinese/fcitx.orig/Makefile /usr/ports/chinese/fcitx/Makefile
--- /usr/ports/chinese/fcitx.orig/Makefile 2011-11-11 00:36:12.000000000 -0600
+++ /usr/ports/chinese/fcitx/Makefile 2012-02-06 02:43:35.582174787 -0600
@@ -6,7 +6,7 @@
#
PORTNAME= fcitx
-PORTVERSION= 4.1.2
+PORTVERSION= 4.2.0
CATEGORIES= chinese x11
@lichray
lichray / gnumeric_all_in_one.patch
Created Feb 17, 2012
Upgrade Gnumeric to 1.11.1
View gnumeric_all_in_one.patch
diff -ruN --exclude=CVS /usr/ports/devel/libgsf.orig/Makefile /usr/ports/devel/libgsf/Makefile
--- /usr/ports/devel/libgsf.orig/Makefile 2011-11-06 22:24:51.000000000 -0600
+++ /usr/ports/devel/libgsf/Makefile 2012-02-16 09:57:40.190157000 -0600
@@ -7,7 +7,7 @@
#
PORTNAME= libgsf
-PORTVERSION= 1.14.21
+PORTVERSION= 1.14.22
PORTREVISION?= 0
@lichray
lichray / sc.py
Created Mar 3, 2012
A simple screenshoter (python + ImageMagick)
View sc.py
#!/usr/bin/env python
# Zhihao Yuan <lichray at gmail.com>
SSCMD = 'import -quality 04 -border -frame png:-'
SSCMD_ALT = 'import -quality 04 png:-'
from cStringIO import StringIO
import sys, os
from getopt import getopt
import pygtk
View fcitx_4.2.2_all_in_one.patch
diff -ruN --exclude=CVS ../fcitx.orig/Makefile ./Makefile
--- ../fcitx.orig/Makefile 2012-02-07 14:57:07.000000000 -0600
+++ ./Makefile 2012-04-26 15:43:23.803360889 -0500
@@ -6,7 +6,7 @@
#
PORTNAME= fcitx
-PORTVERSION= 4.2.0
+PORTVERSION= 4.2.2
CATEGORIES= chinese x11
@lichray
lichray / quote.c
Created Apr 13, 2012
Reliably quote a string as a single argument for /bin/sh.
View quote.c
#include <sys/param.h>
#include <sys/wait.h>
#include <ctype.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
You can’t perform that action at this time.