Skip to content

Instantly share code, notes, and snippets.

View lichray's full-sized avatar

Zhihao Yuan lichray

View GitHub Profile
@lichray
lichray / rsynclib.h
Last active August 29, 2015 14:16
librsync job reader & writer
/*
* Copyright 2015 Rackspace, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lichray
lichray / mplayer_4.patch
Created November 13, 2011 13:09
A combined patch to multimedia/mplayer in FreeBSD ports
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 December 2, 2011 07:28
The Debian way to fix v_increment
#! /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 December 2, 2011 07:29
The NetBSD way to fix v_increment
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
@lichray
lichray / pure_all_in_one_0.51.patch
Created December 6, 2011 06:22
Upgrade pure to 0.51
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 December 6, 2011 06:23
New ports after pure-0.51
# 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
@lichray
lichray / fcitx_all_in_one_4.2.0.patch
Created February 6, 2012 10:23
Upgrade fcitx to 4.2.0
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 February 17, 2012 02:14
Upgrade Gnumeric to 1.11.1
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 March 3, 2012 16:18
A simple screenshoter (python + ImageMagick)
#!/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
@lichray
lichray / fcitx_4.2.2_all_in_one.patch
Created April 6, 2012 07:30
Upgrade fcitx to 4.2.2
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