This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a.gemspec | |
require "bundler" | |
Gem::Specification.new do |s| | |
s.name = "hello" | |
.... | |
s.add_bundler_dependencies | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original Source: https://github.com/chneukirchen/styleguide | |
= Christian Neukirchen's Ruby Style Guide | |
You may not like all rules presented here, but they work very well for | |
me and have helped producing high quality code. Everyone is free to | |
code however they want, write and follow their own style guides, but | |
when you contribute to my code, please follow these rules: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in spec_helper.rb | |
module Kernel | |
private | |
def xdescribe(*args, &blk) | |
describe *args do | |
pending "xxxxxxxxx" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(process:9963): Gtk-WARNING **: Locale not supported by C library. | |
Using the fallback 'C' locale. | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_add_alpha: assertion `GDK_IS_PIXBUF (pixbuf)' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed | |
(qq:9963): GdkPixbuf-CRITICAL **: gdk_pixbuf_copy_area: assertion `src_pixbuf != NULL' failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
def download(url) | |
Thread.new do | |
thread = Thread.current | |
thread[:body] = [] | |
thread[:done] = 0 | |
url = URI(url) | |
Net::HTTP.new(url.host, url.port).get2(url.path) do |res| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install ffi | |
require "ffi" | |
module Libc | |
extend FFI::Library | |
ffi_lib 'c' | |
attach_function "printf", [:string, :varargs], :int | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
OlderNewer