Skip to content

Instantly share code, notes, and snippets.

View 0312birdzhang's full-sized avatar
🎯
Focusing

BirdZhang 0312birdzhang

🎯
Focusing
View GitHub Profile
{
"return": [
{
"20150702154151014503": {
"Function": "cmd.run",
"Target": "unknown-target",
"Target-type": [],
"Arguments": [],
"StartTime": "2015, Jul 02 15:41:51.014503",
"User": "root"
[mersdk@SailfishSDK fingerterm]$ mb2 -t SailfishOS-armv7hl qmake
Building target platforms: armv7hl-meego-linux
Building for target armv7hl-meego-linux
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.3eWvdR
sh: /home/mersdk/share/fingerterm/updateversion.sh: /bin/bash^M: bad interpreter: No such file or directory
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_FEEDBACK_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I. -I/usr/include/nemonotifications-qt5 -I/usr/include/qt5 -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtFeedback -I/usr/include/qt5/QtCore -I. -o main.o main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_DBUS_LIB -DQT_FEEDBACK_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I. -I/usr/include/nemonotificati
@0312birdzhang
0312birdzhang / gist:7dc7b8fde43b64ecd004
Created August 7, 2015 07:18
300行python代码的轻量级HTTPServer实现文件上传下载(Python3版本)
#!/usr/bin/env python
#coding=utf-8
# modifyDate: 20120808 ~ 20120810
# 原作者为:bones7456, http://li2z.cn/
# 修改者为:decli@qq.com
# v1.2,changeLog:
# +: 文件日期/时间/颜色显示、多线程支持、主页跳转
# -: 解决不同浏览器下上传文件名乱码问题:仅IE,其它浏览器暂时没处理。
# -: 一些路径显示的bug,主要是 cgi.escape() 转义问题
# ?: notepad++ 下直接编译的server路径问题
@0312birdzhang
0312birdzhang / gist:a56566e6395d14f10c96
Created August 7, 2015 08:34
300行代码实现文件下载上传(转)[python3]
#!/usr/bin/env python
#coding=utf-8
# modifyDate: 20120808 ~ 20120810
# 原作者为:bones7456, http://li2z.cn/
# 修改者为:decli@qq.com
# v1.2,changeLog:
# +: 文件日期/时间/颜色显示、多线程支持、主页跳转
# -: 解决不同浏览器下上传文件名乱码问题:仅IE,其它浏览器暂时没处理。
# -: 一些路径显示的bug,主要是 cgi.escape() 转义问题
# ?: notepad++ 下直接编译的server路径问题
https://openrepos.net/sites/default/files/packages/1/harbour-warehouse-0.3-30.armv7hl.rpm
@0312birdzhang
0312birdzhang / gist:2c65bbe7a9b78e11be11
Created September 18, 2015 16:04
org.nemomobile.notifications
import QtQuick 2.0
import Sailfish.Silica 1.0
import io.thp.pyotherside 1.3
import "pages"
import "pages/Setting.js" as Settings
import org.nemomobile.dbus 2.0
import org.nemomobile.notifications 1.0
ApplicationWindow
{
@0312birdzhang
0312birdzhang / gist:9491d64a7696b5015f54
Created October 21, 2015 11:31
sailfish 编译librime手记
在sailfish 1.1.9.28上编译
安装依赖等:
pkcon install doxygen
pkcon install cmake
pkcon install make
pkcon install libstdc++-devel
pkcon install gcc-c++
pkcon install automake
@0312birdzhang
0312birdzhang / sailfishsdkrepos.md
Last active January 16, 2018 02:18 — forked from skvark/sailfishsdkrepos.md
Describes how to add repositories to Sailfish OS SDK (emulator and targets) and how to install them so that they can be used straight from the SDK.

This guide uses my own repos from Mer Obs. I found it very hard to find information about this so hopefully someone sees this useful. This short guide was created as a side product while I was creating these RPM packages (which wasn't so clear to me either).

  1. Add the repositories to the Mer SDK armv7hl and i486 targets (you'll have to ssh to the Mer SDK):

    • sb2 -t SailfishOS-2.1.3.7-armv7hl -m sdk-install -R zypper ar -f https://sailfish.openrepos.net/birdzhang/personal-main.repo

    • sb2 -t SailfishOS-2.1.3.7-i486 -m sdk-install -R zypper ar -f https://sailfish.openrepos.net/birdzhang/personal-main.repo

  2. Refresh sb2 -t SailfishOS-2.1.3.7-i486 -m sdk-install -R zypper ref and sb2 -t SailfishOS-2.1.3.7-armv7hl -m sdk-install -R zypper ref

  3. Install packages:

Working with ssu and pkcon.
Adding repositories via ssu:
# ssu addrepo openrepos_username http://sailfish.openrepos.net/birdzhang/personal/main
Replace the openrepos_username with the developer’s username.
Update the local repository index:
# ssu updaterepos
@0312birdzhang
0312birdzhang / gist:38546d2bb6433be3f3f6
Created January 26, 2016 04:57
sailfish刷机包拆包打包教程
```
simg2img fimage.img001 fimage.raw
sudo mount -t ext4 -o loop fimage.raw test/
sudo make_ext4fs -s -l 685768704 new.img001 test/
```
Use tune2fs -l sys.raw and "Block count" * "Block size" for make_ext4fs -s parameter.