Skip to content

Instantly share code, notes, and snippets.

View gutenye's full-sized avatar
:octocat:
Guten tag!

Guten gutenye

:octocat:
Guten tag!
View GitHub Profile
@gutenye
gutenye / PKGBUILD
Created February 25, 2012 02:13
PKGBUILD
# just because AUR upload doesn't like ".pkg.tar.xz"
#PKGEXT=".pkg.tar.gz"
pkgname=gptsync
pkgver=0.14
pkgrel=2
pkgdesc="gptsync is a utility to maintain an MBR partition table synchronised with a GPT partition table used as reference. The resulting MBR partition table can contain up to 4 partitions; extended partitions are not supported."
arch=('i686' 'x86_64')
url=('http://packages.debian.org/sid/gptsync')
license=('custom')
@gutenye
gutenye / gist:2774210
Created May 23, 2012 09:27
ruby c extension example
# gem install ffi
require "ffi"
module Libc
extend FFI::Library
ffi_lib 'c'
attach_function "printf", [:string, :varargs], :int
end
@gutenye
gutenye / gist:3145326
Created July 19, 2012 17:02
三国杀-马腾
module("extensions.mateng", package.seeall)
extension = sgs.Package("mateng")
mateng = sgs.General(extension, "mateng", "qun", "4", true)
mtmashu = sgs.CreateDistanceSkill{
name = "mtmashu",
correct_func = function(self, from, to)
if from:hasSkill("mtmashu") then
@gutenye
gutenye / gist:3154220
Created July 21, 2012 01:50
神杀-迷当.lua
module("extensions.midang", package.seeall)
extension = sgs.Package("midang")
midang = sgs.General(extension, "midang", "qun", "4", true)
--借兵:出牌阶段,你可以指定另一角色装备区里的一张牌并弃一张与之相同花色的手牌,令目标角色对你攻击范围内一名角色(可以是你)使用一张杀,否则交给你这张装备牌。每回合限一次。
-- TODO: 少SkilCard#target_assigned Lua接口.
-- ViewAsSkill => jiebing_card
-- SkillCard
#0 0x00007fd3ea5acab0 in QString::startsWith(QChar const&, Qt::CaseSensitivity) const () from /lib/libQtCore.so.4
#1 0x0000000000466b5b in Player::setFlags(QString const&) ()
#2 0x000000000044102e in ClientPlayer::setFlags(QString const&) ()
#3 0x0000000000649b13 in RoomScene::handleGameEvent(Json::Value const&) ()
#4 0x000000000075741e in RoomScene::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#5 0x00007fd3ea676f3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
#6 0x0000000000727d03 in Client::event_received(Json::Value const&) ()
#7 0x000000000043e6f8 in Client::processServerPacket(char const*) ()
#8 0x0000000000728581 in Client::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#9 0x00007fd3ea676f3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib/libQtCore.so.4
@gutenye
gutenye / gist:3475031
Created August 26, 2012 06:30
qsgs turnOver
# player = x
local targets = room:getAllPlayers()
if targets.isEmpty() then
# ...
end
local target = room:askForPlayerChosen(player, targets, "skill")
target:turnOver()
@gutenye
gutenye / yiwu.md
Created September 1, 2012 05:14
yiwu city

Yiwu is a city located in Zhejiang province, China. It has 1.2 million people, and the city is famous for its markets. It has Yiwu International Trade Mart, Huangyuan Market, Binwang Market and so on. The International Trade Mart, also known as Futian market is the main one and the biggest. It current has more than 100,000 suppliers with 400,000 kinds of products. Beside the market, It has meihu stadium, meihu expo center, Yiwu Highschool.

You can still have fun after the market closed at 5pm. The night in yiwu is very beautiful. There are a lot of foreign friends in Binwang Night Market at night, The public square has performances and shows. If you are hungry, Bingwang shangmaoqu is the place to go, and you can also go for a stree BBQ.

@gutenye
gutenye / gist:3728926
Created September 15, 2012 17:19
font-manager PKGBUILD
# Maintainer: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
# Contributor: Guan 'kuno' Qing <neokuno(at)gmail(dot)com>
pkgname=font-manager
pkgver=0.5.7
pkgrel=1
pkgdesc="A font management application for the GNOME desktop"
url="http://code.google.com/p/font-manager/"
arch=('i686' 'x86_64')
license=('GPL')
@gutenye
gutenye / gist:3732175
Created September 16, 2012 12:08
ttf-ms-win8 PKGBUILD
# Maintainer: reflexing <reflexing@reflexing.ru>
#
# BUILD INSTRUCTIONS:
# ----------------------
# This package is based on 'ttf-win7-fonts' package with fixes,
# suggested by AUR's 'severach' user in comments.
#
# It is intended as a more up-to-date replacement for the AUR's
# 'ttf-ms-fonts', 'ttf-vista-fonts' and 'ttf-win7-fonts' packages.
# It provides newer versions of the fonts in these packages, but due
hello
2