Skip to content

Instantly share code, notes, and snippets.

View penk's full-sized avatar

Penk Chen penk

View GitHub Profile
import QtQuick 2.0
import QtWebKit 3.0
import QtWebKit.experimental 1.0
import QtQuick.Window 2.0
import Ubuntu.Components 0.1
MainView {
width: Screen.width
height: Screen.height
@penk
penk / TempleRunabout.md
Last active December 21, 2015 18:39
《宮廟人生 / Temple Runabout》 紙牌遊戲設計草稿

##遊戲玩法 輪流抽取「問事」事件牌, 對手玩家回應「問神/解籤」

  • 成功 - 獲取資源 (例:『隨喜功德』)
  • 失敗 - 上社會新聞, 失去特定資源 (例:『搬去南投貨櫃屋, 損失財產 30 萬』)

###遊戲道具: 筊杯一組、角色卡、事件牌、資源卡

###角色卡? 按照不同派別有技能加成 (感覺可以一次得罪所有宗教團體)

# fetch Oxide WebView repo
bzr branch lp:oxide
# install gclient
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:`pwd`/depot_tools
# get Chromium source and dependencies (~7.8G)
cd oxide/chromium/
gclient sync --gclientfile=../gclient.conf
@penk
penk / README.md
Last active January 3, 2016 05:19
Project DuckyMomo

NAME

Ducky Momo - tool to query results from launchpad crawler

SCREENSHOT

Screenshot

USAGE

--- /usr/lib/python3/dist-packages/click/install.py.old 2016-01-12 19:05:39.000000000 +0000
+++ /usr/lib/python3/dist-packages/click/install.py 2016-01-12 19:07:08.000000000 +0000
@@ -418,7 +418,8 @@
for dirpath, dirnames, filenames in os.walk(inst_dir):
for entry in dirnames + filenames:
entry_path = os.path.join(dirpath, entry)
- entry_mode = os.stat(entry_path).st_mode
+ if os.path.exists(entry_path):
+ entry_mode = os.stat(entry_path).st_mode
new_entry_mode = entry_mode | stat.S_IRGRP | stat.S_IROTH
@penk
penk / ubuntu_ui_toolkit_for_mac_osx.patch
Created June 3, 2013 22:23
Ported Ubuntu Components to Mac OSX and Qt 5.0.2
=== modified file 'modules/Ubuntu/Components/plugin/plugin.cpp'
--- modules/Ubuntu/Components/plugin/plugin.cpp 2013-05-21 11:06:55 +0000
+++ modules/Ubuntu/Components/plugin/plugin.cpp 2013-06-03 21:51:32 +0000
@@ -18,7 +18,7 @@
#include <QtQml>
#include <QtQuick/private/qquickimagebase_p.h>
-#include <QDBusConnection>
+//#include <QDBusConnection>
#include <QtGui/QGuiApplication>
#include <fstream>
#include <jpeglib.h>
#include <setjmp.h>
#include <QDebug>
#include <QtQml/qqml.h>
#include <QtQml/QQmlExtensionPlugin>
#include <QDir>
#include <tensorflow/core/framework/graph.pb.h>
#include <tensorflow/core/framework/tensor.h>
import QtQuick 2.0
import QtWebKit 3.0
import QtQuick.Window 2.2
// DISPLAY=:0.0 qmlscene webview.qml
Window {
width: Screen.width
height: Screen.height
TextInput {
@penk
penk / init-volatile-log.patch
Created December 16, 2016 12:47
Add volatile-log boot parameter for mounting /var/log as tmpfs
commit 8f43fd71173f6da79b5029343e35285c8800a1de
Author: Penk Chen <penkia@gmail.com>
Date: Fri Dec 16 11:47:03 2016 +0000
Add volatile-log boot param
diff --git a/init b/init
index 43f1571..bb7f995 100755
--- a/init
+++ b/init

Size of Oxide 1.19.6-0ubuntu0.16.04.1+overlay1

penk@abulafia:~/armhf-rootfs$ du -h ./usr/lib/arm-linux-gnueabihf/libOxideQtCore.so.0 
51M	./usr/lib/arm-linux-gnueabihf/libOxideQtCore.so.0

penk@abulafia:~/armhf-rootfs$ du -h ./usr/lib/arm-linux-gnueabihf/oxide-qt
420K	./usr/lib/arm-linux-gnueabihf/oxide-qt/chromium_l10n
23M	./usr/lib/arm-linux-gnueabihf/oxide-qt

Size of QtWebEngine 5.7.1